News:

Support the VirtueMart project and become a member

Main Menu

CanonCat missing

Started by Rune Rasmussen, August 16, 2022, 11:18:23 AM

Previous topic - Next topic

Rune Rasmussen

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>
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

Rune Rasmussen

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"
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team