Code: Select all
<?php if ($product['quantity']==0) { ?>
<span class="preorder-label">Pre Order</span>
<?php } ?>
Now I want same in related products under any product page. The issue is that generates undefined index when the above code is used in product.tpl.
I know variables are defines in product.php so I have tried this on top of product.php to import preorder.php
Code: Select all
$this->load->controller('product/preorder');
In short, I need to be able to check if product quantity is zero and then apply relevant class in product.tpl`