Cart permalink do not work!?

Solved
Excursionist
41 0 6

Hi,

I'm trying to use cart premerlinks on a website but they simply do not work

Here is a sample cart premerlink that I tried using: https://www.supremelighting.com/cart/777607053422:1

Here is more information on cart premerlinks: https://help.shopify.com/en/themes/customization/cart/use-permalinks-to-preload-cart 

Thanks in advance, Martin

Martin Schwartz - Coding your dream to life - iconstudiosny.com
0 Likes

Success.

Shopify Expert
9807 92 1560

I'd make the assumption that you're using the product ID and not the variant ID.
Can you link to the product on your store?

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
1 Like
Excursionist
41 0 6

That was the issue, thank you for your help!

Martin Schwartz - Coding your dream to life - iconstudiosny.com
0 Likes
Tourist
4 0 1

I came here to ask about the same issue. It seems to imply that even if a product has no variants, the permalink has to be based on the variant ID anyway. Is that correct? Thx!

0 Likes
Excursionist
41 0 6

@Troy Yes, that is correct.

Martin Schwartz - Coding your dream to life - iconstudiosny.com
0 Likes
Tourist
4 0 1

Thanks for confirming, Martin. I plan to experiment with this some more this week.

1 Like
Tourist
4 0 1

Confirmed, this works fine with a variant ID.

The unfortunate part to this process is that the cart that is created is pretty much locked. The user can't change quatities, add more items, or do anything except check out. Because of this I'm probably going to link to the product page instead of using the direct-to-cart method.

0 Likes
Shopify Expert
9807 92 1560

That's how a permalink is by design. You can just link to something like this instead if you still want a basic url, but landing on the cart page instead of checkout.

https://www.your-shopify-shop.com/cart/add/777607053422

 

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Tourist
4 0 1

 if you still want a basic url, but landing on the cart page instead of checkout.

Yep, that's the functionality I was looking for. Seems to work quite well. Thanks for the response.

0 Likes
New Member
5 0 0

Do you know of anyway to call to the variant id of a product? I am trying to put a "buy now" button in the header, since it's not in the form the submit link is broken. I was thinking about doing it as a permalink but to do that I need to call to the variant id of the product. I was thinking about something like this: https://www.url.com/cart/add/{{ product.variant.id }} but I can't find the code to pull that number.

0 Likes