I am trying to get a cart link that I can apply to a button that contains a mix of 2 qty of a subscription product and 2 qty of a non-subscription product.
Does anyone know the right URL sequence that I should use for this?
Many thanks in advance!
I am trying to get a cart link that I can apply to a button that contains a mix of 2 qty of a subscription product and 2 qty of a non-subscription product.
Does anyone know the right URL sequence that I should use for this?
Many thanks in advance!
Hi @GHTlorna
This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
Here’s an example URL for a pre-filled cart link in Shopify:
[https://your-store.myshopify.com/cart/{product-handle}:{variant-id},{quantity](https://your-store.myshopify.com/cart/{product-handle}:{variant-id},{quantity)}
So, for your specific case of adding 2 qty of a subscription product and 2 qty of a non-subscription product to the cart, the URL would look something like this:
[https://your-store.myshopify.com/cart/subscription-product-handle:variant-id,2&non-subscription-product-handle:variant-id,2](https://your-store.myshopify.com/cart/subscription-product-handle:variant-id,2&non-subscription-product-handle:variant-id,2)
Note: Replace your-store.myshopify.com with your actual store URL, and replace subscription-product-handle and non-subscription-product-handle with the actual handle of the products, and variant-id with the actual variant IDs of the products.
Hope my answer will help you
Hi Kate, I’ve tried this and I get a 404 Not found error.
https://simply-sensitivity-checks-ie.myshopify.com/cart/the-meal-planners: 43181506134241,2&/ultimate-health: 43564443959521,2 - my structure was this.
Hi @GHTlorna ,
This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
Sorry that my answer can’t help you yet. You can try again with a URL structured like this:
https://{your-shop-name}.myshopify.com/cart/{variant_id_1}:{quantity_1},{variant_id_2}:{quantity_2}
For example:
https://your-shop.myshopify.com/cart/123456:2,789012:2
Thanks for coming back to me - I still get a 404 error on this. 1 of the products is a non-subscription and one a subscription item. Not sure if this is the issue.
The 404 error could be due to a number of reasons. Here are a few potential causes:
Incorrect product ID: Make sure that you have the correct product ID for each product you are trying to add to the cart. You can find the product ID in the URL of the product page on your Shopify store.
Incorrect Shopify store name: Double check that you have entered the correct name for your Shopify store in the pre-loaded cart link.
Products not published: If either of the products are not published, they will not be available for adding to the cart. Make sure that both products are published in your Shopify store.
Products out of stock: If either of the products are out of stock, they cannot be added to the cart. Make sure that both products are in stock and available for purchase.
Incorrect URL structure: Make sure that you have used the correct syntax and structure for the pre-loaded cart link, as described in my previous answer.
If none of these potential causes seem to be the problem, you may want to try reaching out to Shopify support for further assistance. They will be able to help you determine the cause of the 404 error and assist you in resolving the issue.