VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: BaidareW on July 17, 2012, 23:53:59 PM

Title: Can't set price
Post by: BaidareW on July 17, 2012, 23:53:59 PM
For some products I can't set price in 2.0.8d and e

I get "cost Price empty, if child, everything okey, this is just a dev note" - and no price is saved :(
Title: Re: Can't set price
Post by: Milbo on July 18, 2012, 11:51:30 AM
looks like you enter the final price and dont check the box.

vm is only storing the costprice
Title: Re: Can't set price
Post by: BaidareW on July 18, 2012, 12:31:53 PM
Well everything is checked. I have many products entered before. I just write price, check calculate field and then click save.
Title: Re: Can't set price
Post by: lipes on July 19, 2012, 22:58:38 PM
Milbo: I've already reported that problem many time ago.......
in 2 Posts in different Months! :-|

http://forum.virtuemart.net/index.php?topic=104960.0
http://forum.virtuemart.net/index.php?topic=104585.0

I've already reported another problems about las VM "stable" version here:
http://forum.virtuemart.net/index.php?topic=105377.msg351366#msg351366
Title: Re: Can't set price
Post by: boumy on July 22, 2012, 00:38:47 AM
same for me. It's the first time I use VM  :(

And I don't see the "add to cart" button on front page.

Any Idea ? Thank You.

my config :
VM 2.0.8e
Linux
Mysql    5.0.77
utf8_general_ci
PHP    5.2.17
Apache/2.2.3 (CentOS)
Joomla! 2.5.6 Stable [ Ember ] 19-June-2012 14:00 GMT
Navigateur    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Title: Re: Can't set price
Post by: boumy on July 22, 2012, 17:12:41 PM
Maybe I have found a clue for us.

I have opened the table virtuemart_product_price_id joomla! data base. There I can set a price without being ignored by virtuemart admin pages. After that the "add to cart" button appeared !  :)
This is not a good solution of course but at least I can now try VM.

I hope it will help you and encourage people to seek what is causing trouble.

Edit : I set the price to 1. I didn't tried with 0. One thing is sure: after I updated the database via mysql, the admin pages now works fine, I can set the price to another price via the admin pages of virtuemart !
Title: Re: Can't set price
Post by: lipes on July 22, 2012, 23:11:16 PM
boumy: we're talking here about different things
Title: Re: Can't set price
Post by: boumy on July 22, 2012, 23:55:49 PM
@lipes
Are you sure? I have had exactly the same message as BaidareW had  and our version of VM are the same.
But it is not mandatory to thank.
Title: Re: Can't set price
Post by: lipes on July 23, 2012, 02:57:04 AM
you're talking about "add to cart" button... and i cant find that on BaidareW msg (You can do the quote for me..)

Even in the Topic we could read "set price" (it's in Back End) ... not about the "add to cart" button (that's a different thing -> Front end)

so i cant understand your logical / Solution way to solve the problem here.... for Set the final Price with the check the box On... and hitting the SAVE button.. in Back End...
Title: Re: Can't set price
Post by: boumy on July 23, 2012, 05:35:19 AM
I'am sad that we can't understand each other.
Here is my workflow when I encountered the error:
I was in the joomla! Back-end -> added a product in vm admin pages-> set its name and reference but didn't set the price -> then I hit the save button -> and got this string on top of the Tabs of virtuemart. This message encouraged me to have a look at the font end -> there I can see my new product but there is no "add to cart" button -> I go in back-end again and type a price (with or without the checkbox on "calculate...). But every time I click save I get de same message : "cost Price empty, if child, everything okey, this is just a dev note" and the price is not saved at all. The fields remain as default.

When I add a price directly via phpmyamin, then I can see it in vm back-end and  front-end (even the "add to cart" is visible). And for now on I can set a different price via the back-end and save it.


Quote from: BaidareW on July 17, 2012, 23:53:59 PM
For some products I can't set price in 2.0.8d and e

I get "cost Price empty, if child, everything okey, this is just a dev note" - and no price is saved :(
Title: Re: Can't set price
Post by: Milbo on July 23, 2012, 12:17:32 PM
Thank you very much boumy, your description is quite well and I understood you directly.

Maybe it is somehow connected to your old mysql and php version.
Title: Re: Can't set price
Post by: boumy on July 23, 2012, 14:07:59 PM
Thank you Milbo. Good idea to lead me to the versions of php or mysql. I didn't thought at this eventuality.
Title: Re: Can't set price
Post by: lipes on July 23, 2012, 15:10:33 PM
For me: Cost Price / Base price -> it's working by hit the 'Save' button or Save & Close;
Final Price -> it's not working whit the hiting of the checkbox (to calculate the costprice) and Save & Close button;
Title: Re: Can't set price
Post by: boumy on July 23, 2012, 19:30:08 PM
@lipes
As I wrote, I'am total newbee in VM. But...
I have tried this :

New product -> Coste price set to "2" -> checked Calculate cost price  save and close -> Reopen the product form :
cost price = 1.00000
base price = 1
final price = 1
:(

I can make a test for you on my DB. Tell me what values you want and where (the 4 fields: cost, base, final and surcharge). I'll check it out.
I there is a bug, we all need to see to solved ;-)
Title: Re: Can't set price
Post by: lipes on July 23, 2012, 20:11:40 PM
well.. if you enter in the Cost Price the value 2... and then you save and close..
and then you get the value 1 ... it's a really crazy bug :|

In my localhost the cost price it's working normal...
the problem (here) it's about set the final price + check calculate value and isnt saving too with the correct value...

I cant reproduce your problem because (maybe) it's a different problem but similar in the "price" system topic ...

But it's quite strange...
if you dont have a Product Price in the Back end ... why you dont get instead of the "Add to Cart" button (FE) a "Call for a Price" or "ask for price" link ?

In VM2 we're all newbee's (it's a recent project)
Title: Re: Can't set price
Post by: boumy on July 23, 2012, 21:04:53 PM
I wonder if "call for a price" is not an option one can deactivate. Maybe I deactivated it because my first purpose was to make an e-shop with no price: only to facilitate ordering photos prints by clients I already know.

I have made a new test:
add a product -> set no price and check no checkbox -> Save and close -> the product price is saved at 1 (€) ! (cost, base and final are all set to 1)
So now I can't set to price to empty or zero 8-|
Title: Re: Can't set price
Post by: PeterG on September 06, 2012, 19:03:11 PM
I also struggled with this issue. For me it happened with some products (not all) while others are still editable the regular way

Tried millions combinations :-) , this worked for me:
I entered final price and checked calculate and  Save. Problem solved. From now on I can alter prices just like before also starting from costprice.
Title: Re: Can't set price
Post by: bpluijms on September 07, 2012, 16:26:19 PM
I have got exactly the same issue.

I am working with VM 2.0.10 on J.2.5.6.

Method 1:
The following occurs:
- I make a new product.
- I choose a title and category
- I press "SAVE"
- I set "Final price", for example 23,95
- I check the box at "Calculate cost price"
- I didn't set the base price / cost price, because I want to calculate it.
- I press "Save" (or "Save & Close" = same result)

Result: All price fields are empty.
I got the notice: "cost Price empty, if child, everything okey, this is just a dev note"
But I don't think this is OK?

Method 2:
- I make a new product.
- I choose a title and category
- I don't press "SAVE"
- I set "Final price", for example 23,95
- I check the box at "Calculate cost price"
- I didn't set the base price / cost price, because I want to calculate it.
- I press "Save"

Result: Cost price is perfectly calculated.



More information:
I've got a standard Tax rule which is:
"BTW per artikel" (something as : Tax per product???) and "+%"



I have tested above several times.
As far as I can see the problem is:
Once a product is saved without a price, the cost price can't been calculated from the final price.

I hope someone comes with a fix, because prices are one of the major features of an e-commerce system.
Title: Re: Can't set price
Post by: Sabika on November 25, 2016, 21:18:39 PM
Just starting with VirtueMart 3.0.18, I have the same issue and am somewhat surprised that this is not fixed yet.
Thank you for the workaround, though.

Is there any other solution yet?

My environment is Joomla! 3.6.4, PHP 5.6.28, MySQL 5.7.16