Hi,
This is the code i use and it works fine however i have 2 more small issues and i need help to resolve it as better as possible.
<!-- product characteristics values -->
<span class="listing-char listing-show-characteristics">
<?php
$database = JFactory::getDBO();
$query="SELECT group_concat(product_id) as product_ids from `ozi8g_hikashop_product` WHERE (`product_id` = ".$this->row->product_id ." OR product_parent_id=".$this->row->product_id.") and product_quantity>0 ";
$database->setQuery($query);
$parent_product_ids=$database->loadResult();
$query = 'select * from ozi8g_hikashop_variant as v left join ozi8g_hikashop_characteristic as c on v.variant_characteristic_id=c.characteristic_id where characteristic_parent_id=21 and variant_product_id in ('.$parent_product_ids.') group by characteristic_id ORDER BY `c`.`characteristic_ordering` ASC';
$database->setQuery($query);
$rows = $database->loadObjectList();
foreach($rows as $row){
echo $row->characteristic_value." ";;
}
?>
</span>
<!-- end -->
1. As you can see if quantity is 0 size characteristic will be hidden. How can i add another check so if it is unpublished it would be hidden too? I have tried to add something like "and product_published>0" but it doesnt work...
2. There is some clothes categories like pantyhose which has sizes 2, 3, 4 so i had to create different characteristic for it and ofcouse it has different ID. Should i create same query with that ID and exclude it based on category or this somehow can be connected in one?
Thanks