Use cart permalink to get to cart and not checkout

Highlighted
New Member
11 0 0

Hi there,

I try to use the update path to erase some products from the cart. I simply put 0 in for quantity, but the quantities shown in the cart is 1 

Why ist that?


@aldrien wrote:

Hi, try to use /update path instead of /add e.g.  `/cart/update?updates[13071991767103]=1&updates[13825481048127]=1`

 

Hope it helps :)


 

0 Likes
Highlighted
Shopify Partner
10 0 1

Hi, i think it's normal, because in cart page it cached the previous added items. So you have to have script that clears or empty the `cart` cookies.
e.g. setCookie('cart', '') // make a function `setCookie` || `clearCookie` that clears/empty.
For testing, you can clear the application cache in browser and try to re-enter the url for updating items `/cart/update?......`

0 Likes
Highlighted
Pathfinder
102 8 21

To change the contents you need to use Change.js

 

https://help.shopify.com/en/themes/development/getting-started/using-ajax-api#change-cart

if your looking to clear it, you can use /cart/clear url as well (same doc)

0 Likes
Highlighted
New Member
2 0 0

@Misfit_Code_Dev wrote:

Hey there.

 

https://littlekoha.co.nz/cart/update?updates[13071991767103]=1&updates[13825481048127]=1&updates[139...

That is the link you want.  Tested it and it works.

domain.com/cart/update?updates[Variant_id_Here]=Quantity_here......

Best Regards, 
Duncan

Shopify Partner





Thanks for posting these links Duncan. I am looking to also add an attribute tag but doesn't appear to update the order. Haven't found anything that can quite define the attribute correctly so presume this is wrong: cart/update?updates[30123701862478]=1?attributes?consultant_id=34153700

0 Likes
Highlighted
Excursionist
33 0 3

Hello - I'm trying to give users a URL so that it first clears any existing items from cart & then adds the items given in the URL to their cart. 

 

I'm able to do both of these separately by using /cart/clear & /cart/update but can't seem to find out how to do both at the same time.

 

I'm trying to send this URL to customers in a message so that they simply click this & their cart will now only contain these items. Also, in my use case, I dont want them to head to checkout directly but it should land on the cart page.

 

any help would be much appreciated!

0 Likes
Highlighted
New Member
1 0 0

So the question is if this still works At this point in time?
I tried running this: https://vidshop.lt/cart/update?updates[241483]=1 and that add version, both seem to only return with errors.

This one says that Variant ID is not present, but it is for a fact good ID.

Best regards,
Eimantas

0 Likes
Highlighted
New Member
3 0 0

Hi Aldrien,

 

This does not appear to work anymore. Is there another way to have quantities specific to variants for the cart? Not skipping straight to checkout. 

 

Thanks!

0 Likes
Highlighted
Shopify Expert
71 0 38

Hi there. I recently launched an app called ZipLinks that helps merchants with all the features around preloaded carts and checkouts. ZipLinks will allow you to create a simple link that preloads the cart with multiple variants, each having a quantity you specify. It does this and more!   

Check it out as I'd love the feedback! https://apps.shopify.com/permalinks

0 Likes
Highlighted
New Member
3 0 0

Is there a way to add products to cart (not checkout) AND also apply a discount? Appears to be that you have to choose one or the other:

1. Send customer to checkout, prefill discount, but don't retain items in cart if user navigates away

2. Send customer to cart, no discount prefill, and retain items in cart if user navigates away

0 Likes
Highlighted
Shopify Expert
71 0 38

Yes. Absolutely! We've wrapped this type of functionality up into a nice app called ZipLinks. You can configure a link to preload the customer's cart AND set a discount to be utilized. Example link here: https://zplnks.co/cart-with-discount

Check it out and would love to hear what you think. 

0 Likes