Author Topic: BUG: Cannot hide price of customfileds in catalogue functionality  (Read 2009 times)

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Pricing -> Show Following Prices -> Show Prices -> UNCHECKED
Shop -> Use only as catalogue -> CHECKED

In this way it hides only main price, but shows all prices in dropdown custom fields.

I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #1 on: April 08, 2016, 16:45:52 pm »
No one of VM team comment this?

Hack by me:
http://forum.virtuemart.net/index.php?topic=133755.0
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4022
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #2 on: April 09, 2016, 21:05:32 pm »
HI servlet,
why you set price when you don't want display it ?

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #3 on: April 09, 2016, 23:52:59 pm »
Hello
Thank you for replay.
this is the idea of catalogue functionality... hide prices...
At this time is "half backed" - it hides only Product price. You can use this if you have simple shop without customfileds with prices....
I have a situation where there are 2 web sites - one is e-shop, other is catalogue. I am using same database for products for both sites. If I do what you say I must build new database for catalogue website - but why? This is not smart... I think about this before start this topic, but this is not simple shop.
Just now I have idea - is it possible to hide price for different shopper groups or for logged and nonlogged users? I may be is possible but for main price of product again, not for dropdown customfields. I am not sure but there is no option to control customfield price like this.
The easiest way is to use hack like as described before.
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4022
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #4 on: April 10, 2016, 00:53:37 am »
I know, it's easier to use hacks, but this need to be reapplied each time when you update.
For shopper groups price in custom fields this is not possible.
I have do a test plugin for this for some month, but had no time to finish.
But you should dump your variables for customfield carts. Perhaps you can find a trick to remove the price ?
I don't need it currently and have no time to play with this for now. But i think, in your template, you can do an overide in the layout and not hack the model. So it's not a real hack and get not removed on Update.

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #5 on: April 10, 2016, 02:02:48 am »
Yes, we have no time for everything. I need 30 hours per day :) If you need this plugin you will find time :)

I dont know how to dump customfield_price if you mean to dell content of this column in PHPmyAdmin. This is a good idea. Thank you. May be I will fine instruction about this. But if I do it I will loose option ASK A QUESTION instead price with my hack. :) But my be is better if I update VM.
I dont know is it possible to override /administrator/components/com_virtuemart/models/customfields.php
There is no option (or I cant find) in "view" directory...

If I was a coding master I will share codes to improve VM, but at this time I can only to hack and share ;) Before 4-5 hour ago I started to study PHP with reading and testing. Very slow steps... :( one day may be I will run ;)

Thank you for your time :)
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #6 on: April 10, 2016, 02:12:55 am »
function is: UPDATE table_name SET column_name = ''
Your idea works. Now I have to decide hack with ASK A QUESTION instead price in custom filed dropdown or easier updates with empty customfield_price column

I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4022
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #7 on: April 10, 2016, 16:26:16 pm »
WHen i said dump, is use var_dump or print_r to display all values in your customfields.
eg.
in productdetails
Code: [Select]
var_dump ($this->product->customfieldsSorted);
or in category view product loop
Code: [Select]
var_dump ($product->customfieldsSorted);
YOu can activate VM debug in config and use
in productdetails
Code: [Select]
vmdebug('Debug message in productdetails customfieldsSorted',$this->product->customfieldsSorted);
or in category product loop
Code: [Select]
vmdebug('Debug message in product loop customfieldsSorted',$product->customfieldsSorted);

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Cannot hide price of customfileds in catalogue functionality
« Reply #8 on: April 12, 2016, 08:28:14 am »
I am not ready for this codes... :) I will try after little learning of coding.
Thank you :)
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com