Author Topic: Discount amount showing as a positive number  (Read 1094 times)

rayge

  • Jr. Member
  • **
  • Posts: 189
Discount amount showing as a positive number
« on: April 10, 2017, 23:01:44 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Discount amount showing as a positive number
« Reply #1 on: April 10, 2017, 23:56:23 pm »
Using a commercial template/template overrides? What happens with Protostar?
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

rayge

  • Jr. Member
  • **
  • Posts: 189
Re: Discount amount showing as a positive number
« Reply #2 on: April 11, 2017, 17:57:17 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Discount amount showing as a positive number
« Reply #3 on: April 11, 2017, 18:28:05 pm »
Sounds like you used a quickstart template? Is there a URL to see this issue?
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

rayge

  • Jr. Member
  • **
  • Posts: 189
I Use: Joomla 3.4.1 & VM 3.0.9

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Discount amount showing as a positive number
« Reply #5 on: April 11, 2017, 21:13:58 pm »
On that page I see:
Market Price: $699.07
VIP Price: $629.16
Discount: $69.91

Nothing strange with that.
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

rayge

  • Jr. Member
  • **
  • Posts: 189
Re: Discount amount showing as a positive number
« Reply #6 on: April 11, 2017, 21:28:34 pm »
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

  • Jr. Member
  • **
  • Posts: 189
Re: Discount amount showing as a positive number
« Reply #7 on: April 12, 2017, 18:11:02 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Discount amount showing as a positive number
« Reply #8 on: April 12, 2017, 19:11:50 pm »
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

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

rayge

  • Jr. Member
  • **
  • Posts: 189
Re: Discount amount showing as a positive number
« Reply #9 on: April 20, 2017, 00:29:58 am »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26314
  • Always on vacation
    • Jenkin Hill Internet
Re: Discount amount showing as a positive number
« Reply #10 on: April 20, 2017, 10:26:43 am »
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

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.4 on Joomla 3.8 PHP 7.0.23

Testing VM3.2.5.9653 on J!3.8

rayge

  • Jr. Member
  • **
  • Posts: 189
Re: Discount amount showing as a positive number
« Reply #11 on: April 20, 2017, 21:23:34 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7590
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Discount amount showing as a positive number
« Reply #12 on: April 21, 2017, 23:27:35 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rayge

  • Jr. Member
  • **
  • Posts: 189
Re: Discount amount showing as a positive number
« Reply #13 on: May 04, 2017, 20:16:24 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7590
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Discount amount showing as a positive number
« Reply #14 on: May 05, 2017, 11:18:53 am »
Quote
Product 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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation