Forum

Thread tagged as: Shop

problem with

Hi,

I want to put the cart item identifier on to a div tag ID. but it doesn't work :/

this bit just does not put cart item identify into the ID

<div id="<perch:cartitem id="identifier" />" class="myCart_item">

this works:

<perch:input id="qty_<perch:cartitem id="identifier" />" value="<perch:cartitem id="quantity" />" type="number" min="0" style="width:4em;"/>

and this works: <button id="<perch:cartitem id="identifier" />" type="submit" >remove</button>

tony

<perch:if id="product_count" match="gt" value="0">
    <div id="<perch:cartitem id="identifier" />" class="myCart_item">

        <perch:cartitems>
            <perch:form id="cart" app="perch_shop">
            <perch:input id="qty_<perch:cartitem id="identifier" />" value="<perch:cartitem id="quantity" />" type="number" min="0" style="width:4em;"/>

            <button id="<perch:cartitem id="identifier" />" type="submit" >remove</button>
        </perch:cartitems>
    </div>
</perch:if>
Tony Monckton

Tony Monckton 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

A <perch:cartitem /> tag needs to exist within (as a child of) the <perch:cartitems> tag pair.

cool... it works now!

many thanks

tony