Private cart attributes issue on Debut theme

Solved
Jose_Samper
Shopify Partner
29 2 17

Hello,

We have found an error with any private line item attribute or cart attribute on the latest version of the Debut theme.

We have prepared a demo store to show the issue, brand new store with no apps or any special configuration. You can check it at https://cart-attribute-issue.myshopify.com/ (password 12345), where we have simply set a private attribute by adding the following HTML to the product form, as documented at https://shopify.dev/docs/themes/liquid/reference/objects/line_item/#line_item-properties

<input type="hidden" name="properties[_private_attribute]" value="test" />


If you add a product to the cart and go to the cart page, you will see the attribute there (by the way, it is displayed against the convention explained at https://shopify.dev/docs/themes/ajax-api/reference/cart#private-properties-and-attributes

Screenshot_20201004_195952.png


The problem happens when you try to modify the product quantity or remove the product from the cart. In either case, the following error is displayed:

Screenshot_20201004_200156.png


You can also see the following video recording of the issue:



We hope the Debut team could take a look at this as it is causing some problems to some of our customers. Thanks in advance.

Kind regards,
  Jose Samper
  Code Black Belt

 

0 Likes
Jose_Samper
Shopify Partner
29 2 17

This is an accepted solution.

Shopify Support has told us that they have forwarded the issue details to the theme developers to take a look at it.

0 Likes
Noel_Young
New Member
3 0 0

@Jose_Samper Did you get a follow-up from the theme devs on this? We're currently building a theme on Debut 17.4.1 and we're still seeing this issue.

0 Likes
Noel_Young
New Member
3 0 0

I imagine this affects a very small set of people, but for anyone stumbling upon this who is on a newer, but not the newest, version of Debut, I applied the following changes to theme.js made in 17.6.1 to the version I'm working with (17.4.1) and it has fixed the issue:

Screen Shot 2020-11-16 at 1.11.59 PM.png

0 Likes
Jose_Samper
Shopify Partner
29 2 17

Hi Noel,

No, we have not received any updated from Shopify on this. As far as we know, the issue is not fixed yet.

Kind regards,
  Jose

0 Likes
Noel_Young
New Member
3 0 0

@Jose_Samper Not sure what version of Debut you're using, but if you can find the relevant sections of theme.js in your theme using the screenshot of the diff I posted above, it should fix the issue.

I just grabbed these changes from the newest version of Debut, in which the theme devs have corrected the cart error.

0 Likes
Jose_Samper
Shopify Partner
29 2 17

Hi Noel,

Yes, you are totally right. I've just tested it with a fresh development store (which comes with Debut 17.6.1) and it works smoothly.

Thanks for the update!