Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
Bigcommerce: Can_modify field in Cart.yml

In bigcommerce we have this content.html we have this code for the x(close) button in the cart page:


{{#or can_modify (if type '==' 'GiftCertificate')}}
                        <button class="cart-remove icon"
                                data-cart-itemid="{{id}}"
                                data-confirm-delete="{{lang 'cart.confirm_delete'}}"
                                aria-label="{{lang 'cart.remove_item' name=name}}"
                        >
                            <svg><use xlink:href="#icon-close"></use></svg>
                        </button>
                    {{/or}}

Some products doesnt have the close button in it and I wonder where can I set the can_modify variable as it seems it is the reason. Any thoughts?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The can_modify conditional was added to Cornerstone 7 years ago in a commit titled "Hide modify buttons for child products". However, I have worked on hundreds of BigCommerce sites, and I have no idea what it means by "child products". As far as I know, any line item should be removable from the cart, at least in the new products V3 setup. Looking at the can_modify property in the cart stencil object doc, it appears there is no info on this.

I would argue that the can_modify property is deprecated, and can essentially be ignored. There is no way to control it from the admin, and it is not a property that can be adjusted via the cart API.

In conclusion, I would say if you want the remove button to appear on every item in the cart, simply delete the conditional altogether.

I will separately open an issue on the Cornerstone repository to ask about this item!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!