News:

Looking for documentation? Take a look on our wiki

Main Menu

Pricing Override ignores Custom Field Calculation

Started by crashtackle, July 03, 2014, 15:57:30 PM

Previous topic - Next topic

crashtackle

Hello,

I have a product valued at 3000

I override the final price to 2500

All works fine in the front end. Product is given a 500 discount and displays at 2500.

I also have custom fields for that product to allow an upgrade, but when I choose and upgrade (which costs and additional 500) the final cost remains 2500 and the discount jumps up to 1000 - basically the system is giving the upgrade away for free!!!

Surely it should add the upgrade price to the already discounted price?

Any ideas?

Thanks in advance.

balai

Hi

Thats the meaning of price override.
It means that this is the final price of the product and overrides any other parameter.

Your discount is not applied as well. What you get is just the overriden price

crashtackle

Thanks a mil for the fast response!

I can understand it overrides the price on the main product - but when someone then adds an additional upgrade via a custom field surely it should not include that in the final override price? You are then effectively giving all upgrade away for free.

If that is the case how should I be achieving my desired result?


jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

crashtackle

Thanks jenkinhill,

I tried that, but it seems to apply the discount to every single product.

I see you suggest creating a discount category and assigning them to that category. What if I have 2 items with different discounts? Must I create 2 different discount rules and then create 2 different discount categories?

balai

In the price area, you can select the which rules will be applied or if no rule will be used

crashtackle

Thanks eeryone, I will try it out...

It just seems so much more practical if the overide price applied only to the main product price and not the 'add ons' . I just can't see any reason why anyone would want someone to apply and addon to a product and still have it remain at the overide price...

But that is just my opinion.

crashtackle

OK, so after much fiddling and playing around I am sad to say the result is the same...

Attachment 1
I set up the Discount in the Calculations Rule. I assigned that to a category that made earlier called 'Discount (10%)'

Attachment 2
I create the product and assign it to the 'Discount (10%)' category.

Attachment 3
At this point the discount is applied to the product correctly

Attachment 4
The moment I select a product to add-on from the custom-fields it applies the discount to that as well... which is clear something you would not want to do...

It appears that there is no way to discount the base product but still allow a 'sell up' on the product add-ons...

Am I doing something wrong?

Regards
Bevan



[attachment cleanup by admin]

iwanna

Yes, I have the exactly same problem!

Can somebody help ?

crashtackle

The calculation virtuemart is currently doing is...

(Price + Custom Fields Price) + Calculation Rule

It should be...

(Price + Calculation Rule) + Custom Fields Price

AH

crashtackle

in your opinion, that is the way you would like it to work

However, it works the way it is coded

discounts tend to apply to the toal cost of products, not to specific elements

Imagine buying a t-shirt
The base price is for the small item
large is the base price + 10

Now I apply a discount - of 10%

Your approach would result in the large shirt not having a 10% discount - not really what a customer would expect.

Whichever way it was coded, the approach would not work for some users
Regards
A

Joomla 3.10.11
php 8.0

crashtackle

Using you example...

Attachment 1
Product priced 1000 (with 10% discount) = 900

Shopper selects additional item (lets pretend its you 'Large Shirt' from your example) the additional price 'HE IS EXPECTING TO PAY' is clearly visible in the drop down.

So we have 900 + 9648.25 = 10548.25 (That is price he is expecting to pay. Correct?)

Attachment 2
Once selected the additional item is added...

The total price is now 9583.43??? (NOT what he was expecting to pay - a nice surprise for him yes, but not technically accurate is it?)

So basically it doesn't work your way either...








[attachment cleanup by admin]

AH

crashtackle,

Use phpstorm or some other ide to look into the array variables and see what values are being processed

From what you show it looks odd but unfortunately I do not have time to test this for you. (I am not part of the project)

Regards
A

Joomla 3.10.11
php 8.0

illPhever

Hey crashtackle,

I just came across the same situation you were having.  I also don't want to apply calculation rules to custom field prices. Did you ever figure out a way to do this?

crashtackle

Nope. I am afraid the folks at virtuemart don't seem to see the problem with the way they have set it up. To me it makes no sense whatsoever.

I am really glad there is someone else out there that has the same issue.