I'm trying to exclude a product from the product array / foreach iterator by targeting the product code using miva_array_filter_ref.
This example is on the PLST page but I would assume it can be adjusted to work for SRCH as well.
When I try the below code no products are displayed:
My Goal:
I'm working on migrating our product reviews module from the Easy Review Module by Phosphor Media to the Product Reviews Module by Tess.
I have set up a "dummy product" with the product code of "_store_" that I will be utilizing for general Store Reviews (Easy Review had this feature).
I still want the product to be an accesible page using an Alternate Display Page template but I need the product to not show up on PLST and SRCH. It is not assigned to any categories so CTGY is no issue.
I also can't make the product inactive because the module will not display reviews for inactive products as far as I can tell.
I have already excluded the product using a product custom field checkbox and it does indeed stop it from displaying but it is still included in the array.
PLST Scenario:
Product List Layout is set to display 36 products per page. When that product is within the list of products, it displays 35 products instead of 36. This isn't the worst but I would prefer it to be excluded from the array entirely.
Any help would be greatly appreciated.
Thanks.
This example is on the PLST page but I would assume it can be adjusted to work for SRCH as well.
When I try the below code no products are displayed:
Code:
<mvt:assign name="l.result" value="miva_array_filter_ref( l.settings:all_products:products, 1, l.settings:product, 'l.settings:product:code EQ _store_', l.settings:all_products:products )" /> <mvt:foreach iterator="product" array="all_products:products">
I'm working on migrating our product reviews module from the Easy Review Module by Phosphor Media to the Product Reviews Module by Tess.
I have set up a "dummy product" with the product code of "_store_" that I will be utilizing for general Store Reviews (Easy Review had this feature).
I still want the product to be an accesible page using an Alternate Display Page template but I need the product to not show up on PLST and SRCH. It is not assigned to any categories so CTGY is no issue.
I also can't make the product inactive because the module will not display reviews for inactive products as far as I can tell.
I have already excluded the product using a product custom field checkbox and it does indeed stop it from displaying but it is still included in the array.
PLST Scenario:
Product List Layout is set to display 36 products per page. When that product is within the list of products, it displays 35 products instead of 36. This isn't the worst but I would prefer it to be excluded from the array entirely.
Any help would be greatly appreciated.
Thanks.
Comment