Classic Theme - Line Item Properties - Remove does not work?

Shopify Partner
28 0 3

One of the "products" on my shop is to signup girls for basketball so I need the products listed by individual student names not just 2 items.  I was following the documentation in the Advanced section: Line Item Properties.

After I added my field as in the Implementation section the product page showed up correctly:

<div> <!-- calt42 Added Student Name to Sports Signup product page -->
    <p><label for="studentname">Enter the Student's Name below:</label></p> 
    <p><input type="text" id="studentname" name="properties[Student Name]" placeholder="Enter Name"/></p> 
</div>

In the theme cart.liquid template the two sections from the documentation were already there - Classic theme seemed to already have this support implemented: Displaying Line Item Properties on the cart page (which worked fine) and the code for Removing Items From The Cart also seems to already be in the cart.liquid template. So if I signup Sandra and Mary for the same camp, the cart page shows two items just as it should. But if Sandra decides not to go and I do a Remove for the Sandra item, both go away and the cart goes empty.  This is not what happens on the demo page.

Any direction you can provide would be a big help.

 

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
298 0 156

Hey Cal,

I worked with my buddy Nathan on this one, and it turns out the issue is the AJAX cart. With AJAX turned on, it disregards the 'remove' line of code from the tutorial and removes both items.

We tested your store with the AJAX cart turned off and it works as intended. We've turned that off in Customize Theme > Cart Page. If you want to enable it, you definitely can, but this customization will not work.

Hope that helps!

0 Likes
Shopify Partner
28 0 3

Received reply from Alex Missett that if I did not use the Ajaxify Cart the remove would work as advertised and it did.  Thanks.

I would like to use the modal cart, so if anyone can help figure out why the Ajaxify cart doesn't work that would be great!!

 

0 Likes
New Member
5 0 0

For some reason Classic Theme - Line Item Properties does not work for me even in page mode?

I have a custom field on product page and I am not able to view it on cart page, any ideas?

0 Likes