Hello,
How can I check if the "current" article is in the cart?
Thank you.
Article in cart?
Re: Article in cart?
Found a solution
Code: Alles auswählen
<we:repeatShopItem shopname="shop">
<?php $oid = $GLOBALS['oid']; $wedoc_ID = $lv->f("wedoc_ID"); ?>
</we:repeatShopItem>
<we:condition name="productInCartBool">
<we:conditionAdd field="ID" value="$oid" var="WE_ID" compare="="/>
<we:conditionAnd to="top" />
<we:conditionAdd field="WE_ID" value="$wedoc_ID" compare="="/>
</we:condition>
<we:listview type="object" classid="1" condition="$productInCartBool">
<we:ifFound>
Product is in cart
</we:ifFound>
<we:ifNotFound>
Product is not in cart
</we:ifNotFound>
</we:listview>
Re: Article in cart?
... your code more simple
Code: Alles auswählen
<we:DID to="global" nameto="currentDocID"/>
<we:repeatShopItem shopname="shop">
<we:field type="text" name="WE_ID" to="global" nameto="actCartArticleID"/>
<we:ifVar type="global" name="actCartArticleID" match="\$currentDocID" operator="equal">
Product is in cart
<we:else/>
Product is not in cart
</we:ifVar>
</we:repeatShopItem>
Wer ist online?
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast