Developer forum

Forum » PIM » Unpublished products is visible in shop

Unpublished products is visible in shop

Andreas Pettersson
Reply

Hi,

We have some problems with the relatedproducts loop. It render products that are not published to Ecommerce from PIM.

Is there anyway to see if a product is published to Ecommerce from that loop? Because we have related products to products that are not published to ecom and we will not show unpublished products for the user. 


Replies

 
Nicolai Pedersen
Reply

Can you share some code from your template? Is it a loop? And what is the name of the loop.

 
Andreas Pettersson
Reply

 

We have many different related products that we need to seperate. 

But here is a code for one of the related products groups.

 
Nicolai Pedersen
Reply

You can set that up on the relation it self - use the filters icon to set where the relation should be active.

 
Andreas Pettersson
Reply

Thank you! 
It seems to not render that product when I selected as you show, so i guess it works correct. 
But is there anyway so it's always checked as "selected" when you add a new related product? So we don't need to go in for every related product and select this. 
Or someway to automatically change "ProductRelatedLimitShop" on every row in EcomProductsRelated table in databse.

 

You must be logged in to post in the forum