Author Topic: Eliminate additional cost  (Read 195 times)

giriga

  • Jr. Member
  • **
  • Posts: 84
  • A beginner
Eliminate additional cost
« on: December 07, 2017, 12:56:47 pm »
I do not want the price see picture

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Eliminate additional cost
« Reply #1 on: December 07, 2017, 15:18:57 pm »
What kind of custom field do you use? A plugin, image or other ?

giriga

  • Jr. Member
  • **
  • Posts: 84
  • A beginner
Re: Eliminate additional cost
« Reply #2 on: December 07, 2017, 17:50:56 pm »
I'm using the image plugin, before updating virtuemart I had done so:
If you want to do this you must replace
/administrator/components/com_virtuemart/models/customfields.php

It usable if the price of the custom field is> 0 If it is = 0 you will see

Line 874
Code: [Select]

$ price = "+". $ price;


with

Code: [Select]

$ price = "- Ask for price";


or

If you do not want to display anything use this:

Code: [Select]

$ price = "";

after upgrading to virtuemart VirtueMart 3.2.8 no longer works

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Eliminate additional cost
« Reply #3 on: December 07, 2017, 22:04:42 pm »
Have you many products with this option ? i think you should use a plugin, so you have not to hack the code.
Another solution is to add a CSS rule, bit you should provide a link to your shop, so i can check the rule to use.

giriga

  • Jr. Member
  • **
  • Posts: 84
  • A beginner
Re: Eliminate additional cost
« Reply #4 on: December 08, 2017, 09:18:12 am »
Yes I have many products with this option, I am attaching links https://arredamentionline.giriga.com/en/extending-tables/table-artistic-160x90-extensible-detail

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Eliminate additional cost
« Reply #5 on: December 08, 2017, 12:25:17 pm »
Search this line in file /components/com_virtuemart/sublayouts/customfield.php line 517
$productCustom->text = VirtueMartModelCustomfields::displayCustomMedia ($productCustom->customfield_value,'product',$customfield->width,$customfield->height).' '.$price;
And remove .' '.$price

Best is to copy file in your template /templates/YOURTEMPLATE/html/com_virtuemart/sublayouts/customfield.php and do the change here

giriga

  • Jr. Member
  • **
  • Posts: 84
  • A beginner
Re: Eliminate additional cost
« Reply #6 on: December 08, 2017, 15:33:34 pm »
Thank you very much  ;D