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

TOPIC: Tutorial 1: To show manufacturer LOGOs

Tutorial 1: To show manufacturer LOGOs 9 years 9 months ago #10205

Hi,

With StyleMart, it is possible to show Manufacturer LOGOs in the category browse page and product details page.

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 2014th, 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 with a Virtuemart update; every PHP file in /administrator/components/com_virtuemart/ refreshes itself and all modifications are gone.


Regards.
Flexible Support Team.
The administrator has disabled public write access.

Tutorial 1: To show manufacturer LOGOs 9 years 7 months ago #10880

I like to mention that the place to look for the text is not around the 2014 line, but around line 1026.

Cheers
The administrator has disabled public write access.

Tutorial 1: To show manufacturer LOGOs 9 years 6 months ago #10907

Since this is a core VM file and highly changing in every single VM release; the line number might also change respectively. It is better to use CTRL+F to find the line number.

regards.
The administrator has disabled public write access.

Tutorial 1: To show manufacturer LOGOs 8 years 1 week ago #14051

I have Joomla 3.5+Virtuemart 3.0.12.

This workaround doesnt work in my test domain.

Please sugest.

Thank you!
The administrator has disabled public write access.

Tutorial 1: To show manufacturer LOGOs 8 years 1 week ago #14070

Hi,

Starting from VM3.0.12+, this patch doesn't work anymore. But we figured out an alternative method to display manufacturer logos though (which doesn't require any patch).. It has been included in the newest release of SportMart. The new version was released today.

SportMart v3.1 Release Notes:
___________________________v3.1 (April 13th 2016)___________________________
 
	- SportMart is now fully compatible with VM3.0.16 — If you are planing to upgrade to VM3.0.16, you must get this new SportMart version. Do not upgrade the Virtuemart to 3.0.16 if you are planing to use any older SportMart version.
	- The looping problem on Shopping Cart page has been fixed. Everything is now loaded via AJAX on shopping cart page, there is no unnecessary 2nd page loading for ORDER CONFIRMATION during checkout process.
	- SportMart is now fully compatible with Joomla 3.5.1
	- QuickStart package comes with pre-installed Joomla3.5.1 + Virtuemart3.0.16
	- Displaying manufacturer logos on category and product pages was broken. This problem has been fixed. Furthermore, there is no need to modify any core VM file to enable the SHOW MANUFACTURER LOGOS. Everything is good to go once you install this new version
	- While using Mozilla Firefox, there was a problem with login-form and coupon-form on shopping cart page. These minor problems have been fixed.
 

To install the latest version of SportMart to your existing SportMart website, follow these steps (with the same order):

1- Upgrade Joomla to J3.5.1 via Joomla Backend >> Components >> Joomla!Update
2- Upgrade Virtuemart to VM3.0.16 via Joomla Backend >> Extensions >> Manage >> Update
3- Upgrade Virtuemart AIO to VM AIO 3.0.16 via Joomla Backend >> Extensions >> Manage >> Update
4- Download latest version of SportMart from our server and UNZIP it.
5- Install One-by One >> pkg_sportmart.zip via Joomla Backend >> Extensions >> Manage >> Install

The problem you currently have (not being able to display manufacturer logos) and many other problems will be resolved. Beside, both your Virtuemart and Joomla will be updated to latest.

Regards.
Support
The administrator has disabled public write access.
Time to create page: 0.136 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