Developer forum

Forum » CMS - Standard features » If certain group is in cart

If certain group is in cart

Sofia Soje
Reply

Hello, again!

I would like to show a text on my checkout page if a product from a group with etc. ID GROUP1 is in the cart. How could I write that in code?

<!--@LoopStart(ProductCategories)-->
  <!--@If(@Ecom:Product.Category.ID == GROUP1 is in cart)-->
     My text
  <!--EndIf-->
<!--@LoopEnd(ProductCategories)-->

Replies

 
Nicolai Pedersen
Reply

Hi Sofia

ProductCategories loop is handling which fields is available on the product.

You need to use the ProductGroups loop instead:

http://doc.dynamicweb.com/template-tags/ecommerce/product-catalog/product/productgroups

BR Nicolai

 
Sofia Soje
Reply

It does not seem to work. Am I implementing it wrong? Does this loop need to be inside another sort of loop?

issue01.jpg
 
Nicolai Pedersen
Reply

You have an orderlines loop - in that include this loop.

 

You must be logged in to post in the forum