News:

Looking for documentation? Take a look on our wiki

Main Menu

Manufacturer Title in detail page not showing

Started by hotrod, April 24, 2020, 14:03:14 PM

Previous topic - Next topic

hotrod

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
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

pinochico

#1
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.)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

hotrod

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..
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

pinochico

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
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

hotrod

Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

hotrod

A simpler way would be to add Part Manufactured BY: in there name..   That will work ;D
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

pinochico

QuoteOr am I created a template over ride? and placing it where?

yes
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

pinochico

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
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

hotrod

Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0