Something has changed.
this solution:
So you will have to edit the view "product / listing_price" and replace:
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>';
By:
if($this->row->product_id == 'XX'){ // Replace XX by the product id
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_SQUARE_FOOT').'</span>';
}else{
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>';
}
works for this page:
testpatiodrape.dependentmedia.com/products-listing
but it did not change text on this page:
testpatiodrape.dependentmedia.com/produc...product/127-curtains
and now these modifications to make the "per square foot" show on both pages do not work:
if($this->row->product_id == 'XX'){
to:
if($this->row->product_id == 'XX' || $this->element->product_id == 'XX'){
and
if($this->row->product_id == 'XX' || $this->element->main->product_id == 'XX'){
all this did work for about a month. Specifically this one
if($this->row->product_id == 'XX' || $this->element->main->product_id == 'XX'){
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_SQUARE_FOOT').'</span>';
}else{
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>';
}
now the text following the product price is this message:
Notice: Undefined property: stdClass::$main in /var/www/vhosts/testpatiodrape.dependentmedia.com/httpdocs/templates/rt_chimera/html/com_hikashop/product/listing_price.php on line 170 Notice: Trying to get property of non-object in /var/www/vhosts/testpatiodrape.dependentmedia.com/httpdocs/templates/rt_chimera/html/com_hikashop/product/listing_price.php on line 170 each