News:

Looking for documentation? Take a look on our wiki

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 - [url="https://www.syntaxerror.no/"]https://www.syntaxerror.no/[/url]

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 - [url="https://www.syntaxerror.no/"]https://www.syntaxerror.no/[/url]

Norwegian Translation Team