hi,
I am using React, Next.js and Snipcarts default theme. I have problems with displaying custom data in the shopping cart elements.
i have a button that adds the product to the cart:
data-item-id={product.id}
data-item-price={product.price}
data-item-url={'/'}
data-item-description={product.maker}
data-item-image={product.image.url}
data-item-name={product.title}
data-item-quantity={quantity}
data-item-custom1-value={product.delivery}
now i want to display the id, price of a single item and deliverytime in the cart. see comments:
<item-line>
<li class="snipcart__item__line snipcart__box">
<div class="snipcart__item__line__product">
<div class="snipcart__item__line__header">
<item-image alt="product image"> </item-image>
<div>
<h1>custom data</h1>
{/* description works */}
<item-description> </item-description>
{/* cant to display id and price of single item like descrition */}
<item-id> </item-id>
<item-price> </item-price>
{/* are custom fields also possible to display just the text like description? */}
<item-custom-fields> </item-custom-fields>
</div>
<item-quantity
class="snipcart__item__line__quantity"
v-if="!adding"
></item-quantity>
<div class="snipcart__item__line__header__actions">
{/* remove item don't work */}
<remove-item-action class="snipcart__button--icon">
<icon name="trash" class="icon--red" alt="item.remove_item"></icon>
</remove-item-action>
</div>
</div>
</div>
</li>
</item-line>
Thanks!