Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - PureMart (SKU# FLEX-00010)

TOPIC: TUTORIAL: How to Show manufacturer LOGOs

TUTORIAL: How to Show manufacturer LOGOs 11 years 4 months ago #1001

Hi,

With our VM Template, it is possible to show Manufacturer LOGOs in the category browse page and product details page.
You set the parameters; "Display Manufacturer Logo" to "YES", but still don't see any manufacturer logos?

You might know, this feature doesn't included to Virtuemart by default, and it comes with our VM Template. Therefore some lines need to be inserted to a Core Virtuemart PHP file in order to load the manufacturer logo in the category browse page and product details page.

The PHP file you need to make edits is located here:
/administrator/components/com_virtuemart/models/product.php

Look at the lines around 812th, and find these lines:
if (!empty($product->virtuemart_manufacturer_id)) {
	$mfTable = $this->getTable ('manufacturers');
	$mfTable->load ((int)$product->virtuemart_manufacturer_id);
	$product = (object)array_merge ((array)$mfTable, (array)$product);
}

replace them with these:
if (!empty($product->virtuemart_manufacturer_id)) {
	$mfTable = $this->getTable ('manufacturers');
	$mfTable->load ((int)$product->virtuemart_manufacturer_id);
	$xrefTable = $this->getTable('manufacturer_medias');
	$mfImages = $xrefTable->load($product->virtuemart_manufacturer_id);
	if(!empty($mfImages)) {$mfTable->mf_image_id = $mfImages[0];
		$mediaModel = VmModel::getModel('Media');
		$product->mf_images = $mediaModel->createMediaByIds($mfImages[0],'','image');		
	}
	$product = (object)array_merge ((array)$mfTable, (array)$product);
}


And that's it. You will be good to go.
If Official VM Developers decide to include this feature to Virtuemart by default in one of next releases, than Wohooo, you won't need any coding modifications, Otherwise you will have to repeat this Coding modifications every time you update your Virtuemart. Since after every single Virtuemart update; every PHP file in /administrator/components/com_virtuemart/ refreshes itself back to stock and all modifications will be gone.


Regards.
Flexible Support Team.
Last Edit: 10 years 6 months ago by Support.
The administrator has disabled public write access.

TUTORIAL: How to Show manufacturer LOGOs 10 years 11 months ago #3885

/templates/YOUR_TEMPLATE/html/com_virtuemart/assets/css/flexibleVM2Global.css line 2158

change the max-height
.FlexibleProductDetailsManufacturerLogoList img {
  display: block;
  list-style: circle outside none;
  margin: 5px 0;
  max-height: 20px;
  max-width: 50%;
}
 
 
The administrator has disabled public write access.

TUTORIAL: How to Show manufacturer LOGOs 9 years 8 months ago #10479

ok that's great! but how do you echo it on the product page?
The administrator has disabled public write access.

TUTORIAL: How to Show manufacturer LOGOs 9 years 7 months ago #10509

Hi,

If you were using one of our VM templates, you wouldn't ask this question.

Our VM Templates (almost all of them) automatically echo the manufacturer logo to category&product pages. There is just a plugin parameter in the Joomla backend to ENABLE/DISABLE this feature.

This coding edit only for those who are using our VM templates.

Regards,
Support
The administrator has disabled public write access.
Time to create page: 0.131 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo