Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

142
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda