Author Topic: [HACK Solved]How to hide or replace prices in customfields?  (Read 1593 times)

servlet

  • Jr. Member
  • **
  • Posts: 347
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
[HACK Solved]How to hide or replace prices in customfields?
« on: April 06, 2016, 08:05:17 am »
Hello
Is it possible to hide prices in customfields for non logged users or catalog view? OR how to replace prices with ASK FOR PRICE. Catalog view is not correct as I described here http://forum.virtuemart.net/index.php?topic=133748.0 No bode mark it as a BUG.... so I am looking for way to solve this problem.
Thank you
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

  • Jr. Member
  • **
  • Posts: 347
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: How to hide or replace prices in customfields?
« Reply #1 on: April 08, 2016, 16:39:33 pm »
NOTE: If you update VM dont forget to change again. To this moment this is a hack, and it is not improved by VM team. I hope to add option in configuration section shop hide price in custom field or hide in catalogue mode

If you want to do this you must replace
/administrator/components/com_virtuemart/models/customfields.php

It usable if price of custom field is >0 If it is =0 you will see No additional charge (you can edit language file to change it)

Line 874
Code: [Select]
$price ="+".$price;
with

Code: [Select]
$price ="- Ask for price";
or

If you dont want to display anything use this:

Code: [Select]
$price ="";
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

misholini

  • Beginner
  • *
  • Posts: 29
  • VirtueMart Version: 3.2.14
Re: [HACK Solved]How to hide or replace prices in customfields?
« Reply #2 on: December 14, 2017, 04:06:34 am »
$price =""; -> This used to work for me, but ever since I updated Virtuemart to ver. 3.2.8 it does not work anymore and I see variants price additions showing in the drop down. (e.g product variant +/- price difference).
Any suggestions how to remove +/- price difference?

servlet

  • Jr. Member
  • **
  • Posts: 347
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: [HACK Solved]How to hide or replace prices in customfields?
« Reply #3 on: December 14, 2017, 11:59:41 am »
Hack it again ;)
You have to hack the core every time when you update VM
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3522
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: [HACK Solved]How to hide or replace prices in customfields?
« Reply #4 on: December 14, 2017, 15:43:10 pm »
You can use https://shop.st42.fr/en/products/shortcodes.htm see Cart Dropdown list
In the plugin, you have an option to hide price.
See http://pro.st42.fr/en/shortcodes/test-product-no4.html OPTION LIST for eg.

servlet

  • Jr. Member
  • **
  • Posts: 347
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: [HACK Solved]How to hide or replace prices in customfields?
« Reply #5 on: December 16, 2017, 10:52:44 am »
Sounds good :)
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com