I want to display a li
on product-page
, if the product got upsell products.
What is the condition that I need to check for this?
Thanks!
productproduct-pageup-sells
I want to display a li
on product-page
, if the product got upsell products.
What is the condition that I need to check for this?
Thanks!
Best Answer
You can try this.
If you have a valid product object on
$_product
, thengetUpSellProductIds()
will provides you an array of upsell product ids related to the product which holds by$_product
. So what we are doing here is checking whether the array count is greater than zero. If it is yes, then shows the list.Hope you get the concept.