VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Peterkrk on May 18, 2020, 20:31:43 PM

Title: Display manufacturer name in chart
Post by: Peterkrk on May 18, 2020, 20:31:43 PM
Hi,
I would like to add in chart another field with manufacturer name.
I already add in /templates/template-name/html/com_virtuemart/cart/default_pricelist.php

<th><?php echo JText::_ ('COM_VIRTUEMART_SEF_MANUFACTURER') ?></th> and I have another field in chart.

Now I would like to add
<?php echo $item->mf_name; ?> but is not working...

Any suggestions?

Regards,Peter
Title: Re: Display manufacturer name in chart
Post by: pinochico on May 19, 2020, 00:16:49 AM
Yes,

try this in default_pricelist.php:

<?php echo print_r ($item); ?>

and you can see all info from item.


If mf_name is missing (and I think yes, because for add to cart is used function from product model - getProduct, then you can try call another function or add model for manufacturer.
Try find function in model product - getProductSingle.

Or waiting for answer from VM DEV :)
Title: Re: Display manufacturer name in chart
Post by: Peterkrk on May 19, 2020, 20:13:16 PM
<?php echo print_r ($item); ?> is not working...

I have no idea how to solve this.
Title: Re: Display manufacturer name in chart
Post by: Jörgen on May 20, 2020, 00:11:12 AM
What is not working ? Try:
<?php
echo '<pre>';
print_r($item);
echo 
'</pre>';
?>


If you do Still not see any relevant info, you may Nerf professional help with this.

Jörgen