Cart Error

TLCAndy
New Member
4 0 0

Hi

We are running a Shopify site with the Debut theme which we've customised.  https://littlecashmerecompany.co.uk/

Users can add and checkout single products fine.

When a user goes to the cart and updates a single product to multiples (doesn't matter from what number to what number) then leaves the box.  The contents of the cart disappear then the cart error message appears at the bottom of the screen:

" There was an error while updating your basket. Please try again."

The cart seems to update OK and the user can continue otherwise, but obviously a big problem on the journey. 

Happens on both mobile and desktop.

Any help would be greatly appreciated, even just to point to a starting place.

Andy

Replies 5 (5)
Don
Shopify Staff
Shopify Staff
2027 140 268

Hi there @TLCAndy!

As you've mentioned you have customised your theme here, I'd check to see if any coding customisations or apps that have been added to the store might be at play here.

Could you clarify if you have edited the code of your Debut theme yourself or added an app that might have done so?

Especially of relevance obviously would be edits of files pertaining to your cart, but let us know what, if any coding changes you have made.

It's possible to roll back the '.liquid' code files that have been edited to a previous version

This may help you to undo any changes that could be affecting the functionality of your cart.

Let me know as much as you can about what's happening here so we can work this out together! 

Don | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

TLCAndy
New Member
4 0 0

Hi Don

I've rolled back to the earliest version of cart-template.liquid.

I've customised the product page to accept a custom value (a personalised note), which functions elsewhere as expected.  I did follow the article you referenced but there is one line around the cart updates which was unclear.  Line 6 doesn't seem to make sense:

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, and then click Actions > Edit code.
  3. In the Sections directory, click cart-template.liquid. If your theme doesn't have a cart-template.liquid, then open the Templates directory and click cart.liquid.
  4. Find any input tag that has a name value of updates[{{ item.id }}].
  5. Change the full name value to name="updates[]".
  6. Repeat these steps for any input tag in cart-template.liquid that has a name value of updates[].
  7. Click Save.

As an example I have the input field below:

<input id="updates_large_{{ item.key }}" class="cart__qty-input" type="number"
name="updates[]" value="{{ item.quantity }}" min="0" pattern="[0-9]*"
data-quantity-input data-quantity-item="{{ forloop.index }}" data-quantity-input-desktop>

Line 6 implies this should be updated to:  name="name="updates[]"". But its not clear what I should do with the name field.  Could you give me an example if there are changes to be made?

Andy

TLCAndy
New Member
4 0 0

Hi @Don 

Also I reverted the cart-template.liquid file back to the original and I'm still having the problem.

Andy

TLCAndy
New Member
4 0 0
Don
Shopify Staff
Shopify Staff
2027 140 268

Hi again @TLCAndy!

I'm not seeing those specific steps you're referring to here in the guide to editing your theme code to revert changes I shared here

Could you let me know which guide you're referring to and what you've been using it for in this context so we can check this out to see if it's something we can support you with?

You mentioned here you had reverted all changes made to the cart template file, would you have reverted all changes made since you downloaded this theme, or do you still have some custom coding present?

As we're not able to help with (third-party) custom coding added here ourselves, my best advice would be to ensure you have rolled back all edits made to the theme file, or to consider downloading a fresh copy from our theme store.

Let me know if you can confirm you've reverted all changes made to all of your theme files or if you see this behaviour occuring with a fresh, unedited copy of a free theme.

Don | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog