News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Display all Manufacturers not only one

Started by ExSpirit, May 01, 2015, 11:38:18 AM

Previous topic - Next topic

ExSpirit

If I use $product->mf_name only one manufacturer is shown, even though I have 5 of them. How can I display all 5 of them?

PRO



create a module  "Manufacturer module"
publish it


in the template you want it to show.


<?php jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule( 'mod_virtueMart_manufacturer');
$attribs['style'] = 'xhtml';
echo JModuleHelper::renderModule( $module, $attribs );
?>

ExSpirit

#2
Sorry, I didn't write that correctly. I don't want to display all Manufacturers which are in VM, I want to display all Manufacturers which product has.

ExSpirit

For start I can get IDs of those by using $product->virtuemart_manufacturer_id, but how do I get their names/links?

GJC Web Design

guess you have to do a query to find the names from the manu lang tables by id
I see no function for this in the manu model (name by id)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ExSpirit

Could you please write some sample which I can use at my template files for that?

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ExSpirit

OK, I will try that today.

p.s.: Is there any way to modify the URL /component/virtuemart/manufacturers/manufacturer-name so that it would only be /man/manufacturer-name?

PRO

Quote from: ExSpirit on May 04, 2015, 18:24:28 PM
OK, I will try that today.

p.s.: Is there any way to modify the URL /component/virtuemart/manufacturers/manufacturer-name so that it would only be /man/manufacturer-name?

make a joomla link to the manufacturers page

make the alias    "man"




ExSpirit

I did that but it always gives me "/man/manufacturer/manufacturer-name" on all next links. I don't know why middle "manufacturer" is there.