Author Topic: Coupon Ceases to effect order on backend alteration  (Read 643 times)

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Coupon Ceases to effect order on backend alteration
« on: April 03, 2018, 22:48:07 pm »
 In another Topic I posted
Quote
Okay, so recently we've discovered some add behavior from virtuemart when cancelling line items that coupons have been applied to The total no longer reflects the fact that coupons were used and instead displays the full price they would have paid instead. You can see an example attached to this topic, is there anything that can be done here to ensure that the total still reflects what was actually paid by the consumer for accurate bookkeeping?

This is the specific Issue we are having, when the total is recalculated after a line item cancellation the coupon is not taken into account.  Specifically Something is wrong with the coupon calculation when one is doing a item by item cancel and as a result the coupon is not being applied properly when individual order items have been cancelled. This means if you got a coupon or gift certificate that gave you the whole thing off, cancelling by the item would result in the cert or coupon being reflected in the recalculation on the order total
.I've seen variations of this complaint I've made regarding various alterations to backend orders causing coupons to stop being counted on the forum without any response. Has this been fixed in any newer versions of virtuemart?  I'm using joomla 3.7.2 and virtuemart 3.0.18. According to the AWOdev people this issue is with your system and they tested it on a virtuemart 3.2.13 test site and ran into the same issue using a virtuemart standard coupon system rather than the awocoupon extension for virtuemart.  This problem occurs when an item on the order is cancelled it doesn't even have to be more than one, and that throws off the calculation and causes it to forget the discount in turn resulting in the calculation being for more than the shopper actually billed. Is there anything we or you can do to make sure that we can get it to stop losing the discount when we cancel items on orders or will this have to be done by hand by us? It's odd because the coupon discount is still on record It's just not being applied anymore.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26921
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM.3.2.15.9866 on Joomla 3.8.10 PHP 7.0.30

Testing VM.3.2.15.9898 on J3.8.10

aka.deton

  • Beginner
  • *
  • Posts: 9
Re: Coupon Ceases to effect order on backend alteration
« Reply #2 on: April 10, 2018, 15:35:41 pm »
del

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9607
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Coupon Ceases to effect order on backend alteration
« Reply #3 on: April 13, 2018, 21:50:14 pm »
Never heard about that problem. Is new for me.  is on the list now
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: Coupon Ceases to effect order on backend alteration
« Reply #4 on: April 16, 2018, 14:32:48 pm »
Thank you, It's caused on line 653 of the orders.php model under the virtuemart component directory located in administrator. When doing calculating the order_total in the sql the coupon discount is not added when doing individual item updates. 

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9607
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Coupon Ceases to effect order on backend alteration
« Reply #5 on: April 20, 2018, 00:17:34 am »
Thank you. Good to know. I know the function, sounds very reasonable.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: Coupon Ceases to effect order on backend alteration
« Reply #6 on: April 20, 2018, 21:08:40 pm »
good to hear.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9607
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Coupon Ceases to effect order on backend alteration
« Reply #7 on: May 29, 2018, 15:45:05 pm »
hmmm not soo easy as I thought before. Coupons use often percentages, so we must recalculate the whole thing, or? We can add/substract the value only, when the coupon was not a percentual one. So maybe it is easier to add a sql, which handles it.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: Coupon Ceases to effect order on backend alteration
« Reply #8 on: June 01, 2018, 14:52:51 pm »
Thanks for the update.