Author Topic: Display Field name in product view  (Read 878 times)

mratki

  • Beginner
  • *
  • Posts: 27
  • A beginner
Display Field name in product view
« on: October 07, 2021, 11:29:03 am »
Hello, how to display text "Price" before cost price? For example PRICE: 15.670,98 kn
Same question with manufacturers, example MANUFACTURER: Bartscher

Regards,
M

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4608
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Display Field name in product view
« Reply #1 on: October 07, 2021, 11:43:32 am »
IN Virtuemart >Configuration
Price tab, you can select if you want see the label or not.
For "manufacturer" this need to be changed in the PHP file
See /components/com_virtuemart/views/productdetails/tmpl/default_manufacturer.php
You should create an overide in your template to not loose changes on Virtuemart update

mratki

  • Beginner
  • *
  • Posts: 27
  • A beginner
Re: Display Field name in product view
« Reply #2 on: October 07, 2021, 11:59:03 am »
Thanks for a quick reply.
I have enabled all labels but the price label is still not displaying, I quess it's hided somewhere else...
So what exactly should be changed in manufacturers php file? I'm kinda new with php and all that stuff...

Regards,
M

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4608
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Display Field name in product view
« Reply #3 on: October 07, 2021, 13:35:32 pm »
replace
echo implode(', ',$mans);
with
echo 'manufacturer :  '.implode(', ',$mans);

Or with Joomla language support
echo jText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL').implode(', ',$mans);

mratki

  • Beginner
  • *
  • Posts: 27
  • A beginner
Re: Display Field name in product view
« Reply #4 on: October 08, 2021, 08:28:57 am »
It's working, thank you so much!

Regards,
M