News:

Support the VirtueMart project and become a member

Main Menu

BUG: Cannot hide price of customfileds in catalogue functionality

Started by servlet, April 05, 2016, 12:43:18 PM

Previous topic - Next topic

servlet

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.

Он-лайн магазин за фототапети http://mishelfoster.com

servlet

Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

HI servlet,
why you set price when you don't want display it ?

servlet

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.
Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

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

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 :)
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

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

Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

WHen i said dump, is use var_dump or print_r to display all values in your customfields.
eg.
in productdetails
var_dump ($this->product->customfieldsSorted);

or in category view product loop
var_dump ($product->customfieldsSorted);

YOu can activate VM debug in config and use
in productdetails
vmdebug('Debug message in productdetails customfieldsSorted',$this->product->customfieldsSorted);

or in category product loop
vmdebug('Debug message in product loop customfieldsSorted',$product->customfieldsSorted);

servlet

I am not ready for this codes... :) I will try after little learning of coding.
Thank you :)
Он-лайн магазин за фототапети http://mishelfoster.com