VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: Rune Rasmussen on August 16, 2022, 11:18:23 AM

Title: CanonCat missing
Post by: Rune Rasmussen on August 16, 2022, 11:18:23 AM
CanonCat seems to be missing in language files, and can't be translated.


It's displayed in BE product listing, when 'Force Canonical Category' is selected.


BE/views/product/tmpl/default.php L180-187:
<!-- Category name -->
<td><?php
echo $product->categoriesList;
//  show canonical category if set
if(!empty($product->product_canon_category_id)  && $product->product_canon_category_id 0){
echo '<p style = "color:#ff0000;">CanonCat: ' $product->canonCatIdname.'</p>';
}
?>
</td>
Title: Re: CanonCat missing
Post by: Rune Rasmussen on August 16, 2022, 11:33:46 AM
And the fix:

            <!-- Category name -->
            <td><?php
               
echo $product->categoriesList;
               
//  show canonical category if set
               
if(!empty($product->product_canon_category_id)  && $product->product_canon_category_id 0){
                  echo 
'<p style = "color:#ff0000;">' vmText::_('COM_VIRTUEMART_CANONCAT') . ': ' $product->canonCatIdname.'</p>';
               }
            
?>
</td>



COM_VIRTUEMART_CANONCAT = "Canonical"