Edit line item properties from cart

New Member
3 0 0

Hi there,

Is it possible to edit line item properties for individual products from the cart?

My product pages include several custom text fields for customers to enter personalised information. At the moment, when a customer enters their information and clicks add to cart, the information is displayed in the cart. However, there is no option for them to edit it and I am concerned that they will have to start all over if they notice errors (e.g. spelling mistakes). Currently, if they click the back button on the browser it will take them to the product page and will retain the completed text fields, however this option isn't suitable if they have submitted multiple products.

I would really like for the text fields to be editable within the cart (see this website for an example: https://shipyourenemiesglitter.com/product/The-OG-Glitter-Bomb-54). However, I would also be happy if there was an edit button available for each item in the cart that would go back to the product page with the text fields still complete.

My website (www.littlenote.com.au) is currently password protected and is not ready to take orders, however the password is woodlands24

Any assistance in this would be great!

Thanks in advance,

Jessica

 

0 Likes
Shopify Staff
Shopify Staff
1 0 0

Hey Jessica,

Currently the only option within the cart to edit would be the quantity. Customers can also click directly on the product image in the cart to return to the product, but this won't have the information already entered into those fields.

Adding the ability to edit those fields within the cart page is going to be something that needs some custom development. Because of this, we would suggest looking into hiring a Shopify Expert who can design this for you. You can browse Experts or simply post your job here:

https://experts.shopify.com/

I wish I had a super simple solution for this, but ultimately it is going to require more than just a little bit of coding. An Expert should be able to accomplish something custom like this for you. :)

Cheers,

Chris

0 Likes
Shopify Partner
37 0 1

late to the party but looking for a similar solution.

as a shopify expert, I was under the impression that we cannot edit line item properties in the cart at all. is there a way to do it after all?

0 Likes
Shopify Partner
1305 14 167

On the cart page you can change the line proprieties via JavaScript using XHR/Ajax

https://sections.design tips, tricks & Shopify sections
0 Likes
Tourist
7 0 2

How exactly?  I've tried using the AJAX API for change.js and update.js and neither allow me to change properties of a cart item.

1 Like
Tourist
8 0 1

 I know it's a quite old thread, but the change.js works for updating line_item's properties but only if you use line as an identifier rather than id. So the posted object should look like that:

{
  line: 1,
  properties: {
    foo: 'bar'
  }
}

 

 

1 Like
Highlighted
Shopify Partner
28 0 1

with jquery 
 

jQuery.post('/cart/change.js', {
  line: 1,
  properties: {
    'department': 'sales'
  }
});


 

0 Likes