VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: squalogu on September 30, 2021, 13:13:11 PM

Title: virtuemart specifies below price in product list
Post by: squalogu on September 30, 2021, 13:13:11 PM
hello, attached example file where I find price and below info kg to the price, another attached screenshot site created with virtuemart, represents a product page list. Is it possible with virtuemart to be able to indicate an info that appears under the price in that position, in a product list? like?


Thank you
Title: Re: virtuemart specifies below price in product list
Post by: sirius on September 30, 2021, 14:15:57 PM
Hi
So you should use unit price on the product size & weight tab in the backend.

this topic can help you : https://forum.virtuemart.net/index.php?topic=121438.0

And if your template is ok with this option it should appear on the product page, but not as a range like you show in your example.
Title: Re: virtuemart specifies below price in product list
Post by: squalogu on September 30, 2021, 15:36:17 PM
hi, thanks for you answers
i nee to do the same this attachment
Title: Re: virtuemart specifies below price in product list
Post by: sirius on September 30, 2021, 17:11:08 PM
Ok so you must use a dedicated custom field to do that.
then you'll be able to set what you want inside it on each of your product, then you can call it in your template.
So use an override, because if you upgrade VM you'll lost all your modification.
First Create your custom field with the position name of your choice, "your_position_name" in the example below, and  with type of text nor string as you need.

Here you are an example of what I use to call a custom filed with a dedicated position name for it in my default product template :
<?php if(!empty($this->product->customfieldsSorted['your_position_name'])) : ?>
<div class="col-lg-4">
<?php echo shopFunctionsF::renderVmSubLayout('customfields', array('product' => $this->product'position' => 'your_position_name')); ?>
</div>
<?php endif; ?>
Title: Re: virtuemart specifies below price in product list
Post by: squalogu on October 01, 2021, 12:03:34 PM
Thanks for the reply. I created the new custom field. but now how can I place it next to the price?

this field can only be seen in the detail of the product, I must also show it in the product list. here: https://fudy.it/formato-famiglia/tutti-i-piatti-multiporzione.html (https://fudy.it/formato-famiglia/tutti-i-piatti-multiporzione.html)