VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mrmysterious on July 11, 2016, 23:15:16 PM

Title: Manufacturer needs to be displayed in cart
Post by: mrmysterious on July 11, 2016, 23:15:16 PM
Hello world,

is there any known way or plugin to get the manufacturer (assigned to the product) of a product shown in cart?

Example:

ProductA
Manufacturer:
Macrosoft

Update: If any php-editing has to be done - I got some basic knowledge. Just need a hint where to find the file and the lines to edit.
I can imagine that somewhere in cart.php a function has to get the manufacturer id and display the name in cart.... 

cheers
mrm
Title: Re: Manufacturer needs to be displayed in cart
Post by: MagikCommerce on July 12, 2016, 12:22:24 PM
Hello,

You can display manufacturer name of product with its url as below in file - /templates/selected_template/html/com_virtuemart/cart/default_pricelist.php after line of code <?php echo JHTML::link($productrow->url, $productrow->product_name); ?>


<?php 
....

echo 
JHTML::link($productrow->url$productrow->product_name); 
?>


Manufacturer : <a href="<?php echo $productrow->mf_url;?>" title="<?php echo $productrow->mf_name;?>" ><?php echo $productrow->mf_name;?></a>

<?php
....
?>


Title: Re: Manufacturer needs to be displayed in cart
Post by: mrmysterious on July 12, 2016, 16:20:20 PM
Thank you.

I'll try that.

cheers,
mrm