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?
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 );
?>
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.
For start I can get IDs of those by using $product->virtuemart_manufacturer_id, but how do I get their names/links?
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)
Could you please write some sample which I can use at my template files for that?
standard Joomla db query
https://docs.joomla.org/Selecting_data_using_JDatabase
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?
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"
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.