VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: johndenver on September 29, 2020, 05:15:17 AM

Title: Finding these words and editing them
Post by: johndenver on September 29, 2020, 05:15:17 AM
I can't seem to find where the words "Manufacturer" and "Product Info" are located in the language files on the product details page. Attached are those two words on the product details page and every language file located in /components/com_virtuemart/language/en-GB
None of those files contain these words on this page.

I also checked this location: /templates/flex/html/com_virtuemart/productdetails/default.php and every folder in /templates/flex/html/com_virtuemart/productdetails/
and there are no language files there.

Where else might these words be?

This is (I think) where this information is being called to display from the default.php file:

-------------------------------

         <?php
            // Manufacturer of the Product
            if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
                echo '<div class="clear"></div><span class="product-manufacturer">' . vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') . ':' . $this->loadTemplate('manufacturer') . '</span><div class="clear"></div>';   
            }
         ?>

-------------------------------

But this is referencing a language file somewhere right?
Title: Re: Finding these words and editing them
Post by: jenkinhill on September 29, 2020, 10:42:10 AM
In my default VM the constant COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL  is in components/com_virtuemart/language/en-GB/en-GB.com_virtuemart.ini

I don't have a constant for product info, which could be made up frpm product+info or as the 2 word string.

To search for language constants use Joomla's Extensions/language(s)/overrides facility.  Or use a search tool such as Agent Ransack
Title: Re: Finding these words and editing them
Post by: johndenver on September 29, 2020, 11:19:39 AM
Mine is in the same place (attached) and I have renamed it to "Photographer" but it still says "Manufacturer".
Title: Re: Finding these words and editing them
Post by: jenkinhill on September 29, 2020, 11:38:27 AM
Do not edit the original file, but set up an override.  If you don't know how to do that see  https://www.joomlashack.com/blog/joomla/languge-manager/

Did you clear caches after making the edit?
Title: Re: Finding these words and editing them
Post by: johndenver on September 29, 2020, 11:56:54 AM
 ;D I found it, it was that same file except under "administrator/components/com_virtuemart"
Title: Re: Finding these words and editing them
Post by: Jörgen on September 29, 2020, 12:14:11 PM
You should NOT edit the original file. This WILL be overwritten in the next update. Use the JOOMLA language tools.

Jörgen @ Kreativ Fotografi
Title: Re: Finding these words and editing them
Post by: johndenver on September 29, 2020, 14:06:34 PM
Oh, wow I never thought of that! Thank you for the information!