AJAX rate limit and a question about cart discounts

Solved
Highlighted
New Member
11 0 0

I'm working on a "bundles" script and it is working as intended (used a variation of this approach: http://www.codeshopify.com/blog_posts/how-to-add-multiple-products-with-an-ajax-cart)

Now I'm wondering whether it'll be fine to use that or it will get throttled with high traffic?

 

Also, I need advice on how to dynamically change the price of the complimentary bundle product(s) to $0.00 on the cart page, but at the same time, they (bundled products) need to have their standard price (not free) if added through their product page.

The idea is that a user will see all the bundled products on the cart page, but only the main product will have a visible price and other items will be FREE due to bundle conditions.

It doesn't have to be a solution based on code, maybe there's a way to create products that are not directly accessible by visitors but available in AJAX API.

 

Thanks.

0 Likes
Highlighted
Shopify Partner
594 41 118

This is an accepted solution.

I think as long as you aren't directly hitting the API's the scenario of modifying the user cart shouldn't be impacted by rate limiting. At least based on the docs --> https://shopify.dev/concepts/about-apis/rate-limits

As for bundled items, you can create Shopify products and leave them unpublished on all sales channels. So they wouldn't appear for sale on the site. But by referencing their product variant ID's you can still automatically add them to the user cart as needed. At least that's the way I surmise it would work.  

0 Likes
Highlighted
New Member
11 0 0

I tried that before creating this post and it didn't work so I thought it's not meant to work this way.

It now seems that I had an issue in my code and now it works as intended.

Thanks!

0 Likes