Author Topic: CanonCat missing  (Read 178 times)

Rune Rasmussen

  • Jr. Member
  • **
  • Posts: 192
  • Is the stable release stable?
    • SYNTAX ERROR
  • VirtueMart Version: Latest ;)
CanonCat missing
« 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:
Code: [Select]
<!-- 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

  • Jr. Member
  • **
  • Posts: 192
  • Is the stable release stable?
    • SYNTAX ERROR
  • VirtueMart Version: Latest ;)
Re: CanonCat missing
« Reply #1 on: August 16, 2022, 11:33:46 am »
And the fix:

Code: [Select]
            <!-- 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>


Code: [Select]
COM_VIRTUEMART_CANONCAT = "Canonical"
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team