Hello,
I can’t remove item from the cart by clicking on the trash button.
This is my cart template:
<div id="snipcart" data-config-modal-style="side" data-api-key="MyKey" hidden>
<item-line>
<li class="snipcart__item__line snipcart__box">
<div class="snipcart__item__line__product">
<div class="snipcart__item__line__header">
<item-image alt=""> </item-image><div class="ItemLine">
<h2 class="snipcart__item__line__header__title">
<span class="ItemQty">{{ item.quantity }} x</span>
<b>{{ item.name }}<br>
<span class="Gramm">{{ item.customFields.find(field => field.name === \'Weight\').value }}g</span>
<span class="Gramm">{{ item.customFields.find(field => field.name === \'Capacity\').value }}oz</span>
</b>
</h2>
<div :class="item.customFields.find(field => field.name === \'Conditionnement\').value"></div>
<item-quantity class="snipcart__item__line__quantity" v-if="!adding">{{ $localize("item.quantity_short") }}: {{ item.quantity }}</item-quantity>
<div class="snipcart__item__line__header__actions">
<remove-item-action class="snipcart__button--icon">
<icon name="trash" class="icon--red" alt="item.remove_item"></icon>
</remove-item-action>
</div>
</div>
</div>
<div class="InfoItem">{{ item.customFields.find(field => field.name === \'Label\').value }}</div>
</div>
</li>
</item-line>
</div>
When i look at the console, i have errors. Three times the same:
TypeError: Cannot read properties of undefined (reading 'value')
at a.eval (eval at $u (snipcart.js:16:93332), <anonymous>:3:1267)
at a.e.renderRootOverridable (snipcart.js:36:87652)
at a.e.render (snipcart.js:36:86310)
at a.On.t._render (snipcart.js:16:23870)
at a.r (snipcart.js:16:27961)
at or.get (snipcart.js:16:30821)
at new or (snipcart.js:16:30739)
at zn (snipcart.js:16:27975)
at a.Cr.$mount (snipcart.js:16:71271)
at a.Cr.$mount (snipcart.js:16:95196)
I’m working on local machine.
Thank you for your support.