News:

Looking for documentation? Take a look on our wiki

Main Menu

Discount amount showing as a positive number

Started by rayge, April 10, 2017, 23:01:44 PM

Previous topic - Next topic

rayge

I have set a calculation rule to take 10% off all products except for special offers.
ALL of those products in this rile shows the discount as a positive number EXCEPT for
special offers which have an override discount. THOSE items show the discount as a negative number as expected.
What can i do to fix this? it is making invoices look bad and the website look bad too.

THANKS for any help!

Joomla! 3.6.5   
VM 3.2.1
I Use: Joomla 3.4.1 & VM 3.0.9

jenkinhill

Using a commercial template/template overrides? What happens with Protostar?
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

rayge

#2
I checked using prostar.. it didn't change anything.
Trying to track this down to make it right is driving me NUTS!
I Use: Joomla 3.4.1 & VM 3.0.9

jenkinhill

Sounds like you used a quickstart template? Is there a URL to see this issue?
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


jenkinhill

On that page I see:
Market Price: $699.07
VIP Price: $629.16
Discount: $69.91

Nothing strange with that.
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

rayge

#6
Right... it should show
Market Price: $699.07
Discount: $-69.91
VIP Price: $629.16

the MINUS is missing... which makes things look wrong in the cart and the invoice.
the settings in the admin are correct though.
so for example go to
http://www.seslaundry.com/special-offers/part-432-184302-gasket-door-180h-330-liter-washer-black-detail
NOTE that it shows
Discount: $-7.05 this product is using an override price.

add it to the cart

THEN goto
http://www.seslaundry.com/parts/american-dryer/part-100021-7-1-2-hp-3ph-575v-60hz-motor-detail
NOTE that it shows
Discount: $171.82 THIS is using the tax and calculation rules of 10% off.

add it to the cart and go to the cart.
IN the total for DISCOUNT i get $164.77 when it should be $-178.87 because of this issue.

now there is definitely something strange with that and i cant find where to fix it. :/

side note i now realize this might have been better suited in the Product pricing forum.
I Use: Joomla 3.4.1 & VM 3.0.9

rayge

There HAS to be a way to do linear troubleshooting to figure out what needs modified for this.
THANKS again for any help!
I Use: Joomla 3.4.1 & VM 3.0.9

jenkinhill

OK
Set discount rule as Price modifier after tax, Math Operation -% and Value as 5.0000 shows discount as -XX
Set discount rule as Price modifier before tax, Math Operation -% and Value as 5.0000 shows discount as XX
Also
Set discount rule as Price modifier before tax, Math Operation -% and Value as -5.0000 shows discount as -XX

Personally I like a discount to be shown as a number without a minus sign, as the discount is a positive figure which is subracted from the original price.
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

rayge

I wouldn't mind if it all showed without the minus.
I tested your modifiers and it didnt fix the issue.
maybe instead of trying to get the minus on the price modifiers
what if we figured out how to get the MINUS off of the special offers section?
I Use: Joomla 3.4.1 & VM 3.0.9

jenkinhill

Assuming that you use a category for your special offers use Set discount rule as Price modifier before tax, Math Operation -% and Value as 5.0000 shows discount as XX and assign the rule to that category.
https://docs.virtuemart.net/manual/general-concepts/204-tax-and-calculation-rules-overview.html
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

rayge

Unfortunatly all special offer products use the pricing override to handle its discounts.
This is why i think it is displayed differently.
I Use: Joomla 3.4.1 & VM 3.0.9

GJC Web Design

but at the end of the day it is just a display thing -- over ride the template of what ever displays your special offers to remove the " - "
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rayge

#13
Well its not just a display thing. i can make it display as poistive but when i go to the cart it is still functioning wrong.
Under discount if i have an item from specials and another item from another area with a discount it doesnt ADD up.. one ends up subtracting from another making the total discount wrong.

JUST to re iterrate. DISCOUNT using tax and Calculation rules uses a POSITIVE number for its discount number
Product OVERRRIDE price uses a NEGATIVE number for its discount number
I just need them to be the SAME so it calculates its total discount properly.

That is ALL
Why is this so difficult for me to figure out?

Follow?
I Use: Joomla 3.4.1 & VM 3.0.9

GJC Web Design

QuoteProduct OVERRRIDE price

if u mean in the product pricing it has been mentioned that this is  an old legacy method that isn't recommended to be used and will be removed afaik in the future as it isn't fully integrated into VM any more

With calc and unpublished cats etc etc you can come up with just about any discount scenario.
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation