It was working before, but now it isn't anymore
This is the code I used:
$displayValue = "";
// Check if the categories is setted :
if (isset($this->row->categories) ) {
// Read all categories IF the product have several categories setted
foreach ($this->row->categories as $key => $value)
{
// Required category found, display your price :
if ($value->category_id == '13' )
$YourPrice="Marge product";
else $YourPrice="Incl. BTW";
$displayValue = '<span>' . $YourPrice . "</span>";
}
echo $displayValue;
The 'problem' is, that the products are assigned to 2 categories, in this case "Jura Occasions" AND the parent category "Coffeemachines".
For the php folks among us, it's very simple to solve I think
In my code, it's checking if there's another category, if it is, he uses the ELSE value (or am I wrong?)
Wouldn't it be simpler to just check 1 category and if the product is member of it, it will apply the condition.