VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: hotrod on April 24, 2020, 14:03:14 PM

Title: Manufacturer Title in detail page not showing
Post by: hotrod on April 24, 2020, 14:03:14 PM
On my old site I was about to use a language over ride to have it say Part Manufactured By :  On the new site I'm not getting that title next to Manufacturer
Title: Re: Manufacturer Title in detail page not showing
Post by: pinochico on April 24, 2020, 14:14:33 PM
You must find the right code on detail page and add new constant language :)

I use template override:

templates/[my custom template]/html/com_virtuemart/productdetails/default.php

then code is

<?php
                            
// Manufacturer of the Product
                            
if (VmConfig::get('show_manufacturers'1) && !empty($this->product->virtuemart_manufacturer_id)) {
                                echo 
$this->loadTemplate('manufacturer');
                            }
                            
?>



Ok, i go to manufacturer template:

templates/[my custom template]/html/com_virtuemart/productdetails/default_manufacturer.php

and voialá :)

I see line, where can I add language constat:

Quote$mans[] = '<a class="manuModal" rel="{handler: \'iframe\', size: {x: 700, y: 850}}" href="'.$link .'">'.$name.'</a>';

But I see in code is some if

// Avoid JavaScript on PDF Output
if (!$this->writeJs) {


then I must check VirtueMart setup

Is very easy and for me (non-programmer) only 45 seconds.

And How do I add language constant?

Check some another php code from default view (on line 171):

<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?>

(change to your own constant and add to language INI file.)
Title: Re: Manufacturer Title in detail page not showing
Post by: hotrod on April 24, 2020, 14:24:38 PM
Where is the template file located.. and I just add that code..   Or am I created a template over ride? and placing it where?..  lol   I'm lost.  seems like there should be a simple setting to show the word manufacturer  wondering why it was removed..
Title: Re: Manufacturer Title in detail page not showing
Post by: pinochico on April 24, 2020, 14:27:44 PM
Quoteseems like there should be a simple setting to show the word manufacturer  wondering why it was removed..

Yep, it was be better, but not exist.

QuoteWhere is the template file located

I think you must learn about documentation how can you use template override:

https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Title: Re: Manufacturer Title in detail page not showing
Post by: hotrod on April 24, 2020, 14:31:49 PM
 :-\ ;D
Title: Re: Manufacturer Title in detail page not showing
Post by: hotrod on April 24, 2020, 14:33:51 PM
A simpler way would be to add Part Manufactured BY: in there name..   That will work ;D
Title: Re: Manufacturer Title in detail page not showing
Post by: pinochico on April 24, 2020, 14:34:00 PM
QuoteOr am I created a template over ride? and placing it where?

yes
Title: Re: Manufacturer Title in detail page not showing
Post by: pinochico on April 24, 2020, 14:35:17 PM
QuoteA simpler way would be to add Part Manufactured BY: in there name..   That will work

work everything, but than you see in dropdown with manufacture name on products list every product name with this text :D
Title: Re: Manufacturer Title in detail page not showing
Post by: hotrod on April 24, 2020, 14:35:56 PM
yes..