Author Topic: virtuemart specifies below price in product list  (Read 433 times)

squalogu

  • Beginner
  • *
  • Posts: 3
  • A beginner
virtuemart specifies below price in product list
« 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

sirius

  • Jr. Member
  • **
  • Posts: 132
    • OCTeam
  • VirtueMart Version: 3.8.6
Re: virtuemart specifies below price in product list
« Reply #1 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.
J3.10.2 | PHP 7.4.24 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 3.8.9

squalogu

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: virtuemart specifies below price in product list
« Reply #2 on: September 30, 2021, 15:36:17 pm »
hi, thanks for you answers
i nee to do the same this attachment

sirius

  • Jr. Member
  • **
  • Posts: 132
    • OCTeam
  • VirtueMart Version: 3.8.6
Re: virtuemart specifies below price in product list
« Reply #3 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 :
Code: [Select]
<?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; ?>
J3.10.2 | PHP 7.4.24 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 3.8.9

squalogu

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: virtuemart specifies below price in product list
« Reply #4 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