-- HikaShop version -- : 2.3.4
-- Joomla version -- : 2.5.27
Hi,
How can I get the product quantity for the main product that has variants.
I'm in PRODUCT / SHOW_DEFAULT and I want to hide
<?php echo JText::_('PRODUCT_QUANTITY'); ?>
Otherwise you get the following on the site:
Quantity
No stock
I just want to show NO STOCK which resides in QUANTITY view if I'm not mistaken.
So I tried to use $this->row->product_quantity but this doesn't give the right quantity.
I think this has to do with the fact that the product has variants.
When I do var_dump($this->element->main) I can see the
object(stdClass)#831 (58) { ["product_id"]=> string(4) "4469" ["product_parent_id"]=> string(1) "0" ["product_name"]=> string(23) "Geschenkpapier RF12000F" ["product_description"]=> string(26) "Geschenkpapier test" ["product_quantity"]=> string(1) "0" ["product_code"]=> string(8) "RF12000F" ["product_published"]=> string(1) "1"
I just don't know how to access product_quantity.
When I try with $this->element->main->product_quantity my page isn't loaded well and the layout disapears so there seams to be an error.
So my question is:
How to get the product quantity of the main product so I can hide <?php echo JText::_('PRODUCT_QUANTITY'); ?> under <div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"> in the product view.
Thanks in advance