One Page Checkout with AWO Coupon Pro

One Page Checkout with AWO Coupon Pro

Postby maurizio.urbani@.....com » Tue Nov 12, 2013 4:08 pm

Hello Stan,

I hope you're doing great. I am using your OPC since more than an year on two sites (VM 1.1) and I am very happy with it. A couple of days ago I bought AWO Coupon Pro (to use it mainly as Gift Certificate) but I am encountering a problem with OPC. (with OPC disabled it works fine). I am testing the comonent on a trial site of coure not on a production one :-)

The problem is the following:
I created a product of a value of 100 €, associated to a gift certificate and placed the order. When I switched to 'confirmed' I got the certificate as expected and then I tried to use it as a customer would do.
Well if I add to cart an item of a value +100 € (so the same or more than the value of the gift card) it works perfectly and the amount has deducted fom the grand total but, if add to cart an item priced, let's say 80 € (or any other value less than 100 €), if I do select in-store pickup (so grand total without shipping charges) it works correctly while if I do select the delivery to my address (so including shipping charges) only a discount of € 4,92 is applied to the grand total (instead 'erasing' the whole amount since it is less that the Gift Card Value). I would simply need that it deducts the amount from the grand total (so item + shipping charges) as well as it does in case of items priced 100 € or more.

Here are an image containing 3 examples of what I am talking about:

http://movingnoise.com/awo_coupon.jpg

I noticed that the discount applied in case of wrong calculation corresponds to the shipping amount without VAT. In fact the coupon apply a discount of € 4,92, shipping is € 6 - 22% (italian VAT) = € 4.92 while what we need os the discount on grand total (including items + shipping) as happens in case of a purchase of +100 € (when the gift certificate is 100 €).

I first wrote to Seyi (the developer of AWO Coupon Pro) and he suggested me to contact you because actually without OPC the AWO Coupon Pro component does work correctly. If you need to take a look into the trial site just let me know and I will email you the url as well as user and password.

Thank you.

Regards,
Maurizio
maurizio.urbani@.....com
 
Posts: 1
Joined: Tue Nov 12, 2013 4:00 pm

Re: One Page Checkout with AWO Coupon Pro

Postby admin » Mon Nov 18, 2013 1:32 pm

Hello, the issue seems to be caused when using "substract paymet discount before tax" within VM settings which is improperly translated by AWO on these lines:
Code: Select all
foreach($coupon_row->cart_items as $row) {
                  $total_to_use += $row['qty'] * ($row['product_price'] - (PAYMENT_DISCOUNT_BEFORE == '1' ? $row['product_tax'] : 0));
                  $usedproductids[$row['product_id']] = $row['product_id'];
                  $qty += $row['qty'];
               }


at
\administrator\components\com_awocoupon\helpers\vm_coupon.php

where the product tax is not proper and thus it's causing issue with the gift certificates.

you may want to try to solve this (when PAYMENT_DISCOUNT_BEFORE enabled by deleting the rest of the line:
Code: Select all
foreach($coupon_row->cart_items as $row) {
                  $total_to_use += $row['qty'] * $row['product_price'];
                  $usedproductids[$row['product_id']] = $row['product_id'];
                  $qty += $row['qty'];
               }






Best Regards,
Stan
admin
Site Admin
 
Posts: 2591
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 1.1.x

cron