Passing list of variants on cart permalink

afallas
New Member
3 0 0

Hi, I have created a dropdown in my cart page to get the city of a person before going to checkout page.

I have added the attribute in a permalink button 

<a type="submit" name="checkout" href="/cart/{{ line_item.variant_id }}:{{ line_item.quantity }}?checkout[shipping_address][city]={{cart.attributes["City"]}}">Continue</a>
 
the problem is that I am the variants and quantities are not being populated, is this syntax correct? {{ line_item.variant_id }}:{{ line_item.quantity }}
 
or is there another way of getting a list of all variants and quantities present in the cart.
 
 
 

 

0 Likes
frst_10
Tourist
8 0 4

you could give this app a try https://apps.shopify.com/permalinks/ - pretty easy way to generate a permalink to /cart page

afallas
New Member
3 0 0

Thanks, just checked and this doesn't work for me since I need to get the variant ids depending on the products currently in the cart.

0 Likes