1

This is my first time working with Expresso Store, so forgive me if this question is extremely basic, but...

How do I show in my {exp:store:product} tag pair do a test like:

if product is in cart, show 'Product is in your cart', with option to add another

Make sense?

Thanks for any help. Alex

2

A similar question is here:
https://expressionengine.stackexchange.com/a/271/28

That answer may help in your situation... Not sure if it works inside the tag where you are trying to set the conditional.

Store: In_Cart Conditionals
http://devot-ee.com/add-ons/store-in_cart-conditionals

"This extension adds certain "in_cart" conditionals within Exp:resso Store Cart and Checkout tags.

Available variables: {store:entry_id_in_cart:XX} and {store:sku_in_cart:XX}

| improve this answer | |
  • 1
    You shouldn't have a problem adding the code within your products tag to show if the item is in the cart. – Justin Long Dec 12 '12 at 5:11
3

As of Store 1.6.2 there is a {qty_in_cart} variable which allows you to do this on a per-entry basis (though not if your entries contain multiple SKUs).

{exp:store:product entry_id="{entry_id}"}
    {qty_in_cart}
{/exp:store:product}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.