AwoDevelopment - Unleash the power of promotions!
AwoDevelopment
- Unleash the power of promotions!
awocoupon pro aworeferral awocoupon affiliate awocoupon email plugin
  • home
  • products
  • documentation
  • forum
  • contact us
  • faqs
Home » Blogs » seyi's blog

Virtuemart Coupon Tax Error in Initial Basket

seyi — Thu, 10/28/2010 - 10:55

Introduction

In Virtuemart, there is a tax error on the initial basket page after entering a coupon. In a fresh installation of Virtuemart (in this case 1.1.5), I enter a product as below


Then I add a coupon that gives me 80% off.


As you can see, the tax total is the same, which only confuses the user. If you click to checkout, this error fixes itself, but from a customer point of view it is confusing and incorrect.

The Solution

The solution is actually very simple, so simple that I almost missed it. There is a variable scoping problem within the code. A parent file calls a class file. Within the class file, a global variable ($vars) is edited and passed back to the parent file which is then used to calculate the tax. The problem is the edit within the class is not saved. This happens because the variable is not defined as a global variable in the parent file. To fix this:

In www/administrator/components/com_virtuemart/html/basket.php
On or around line 28 is this
<?php
mm_showMyFileName
( __FILE__ );
?>

Right after that declaration, add the following code to make $vars global
<?php
mm_showMyFileName
( __FILE__ );
global
$vars;
?>

You are done. Now your initial basket should contain the correct thax.


  • seyi's blog

Post new comment

The content of this field is kept private and will not be shown publicly.
Input format
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

RESOLVED TAX ERROR: I

James Stratos (not verified) — Mon, 10/24/2011 - 16:44

RESOLVED TAX ERROR:

I researched further and found a solution on your forum. I CHECKED-OFF subtract payment discount before tax in the VM configuration and that did the trick.

Thanks for the support.

  • reply

This does not seem to fix the

James Stratos (not verified) — Mon, 10/24/2011 - 15:49

This does not seem to fix the error in VM 1.1.7? Same tax is being calculated on the retail cost and ignores the discount.

There are a set of variables listed as:

[code]
global $weight_total, $total, $tax_total, $order_tax_details, $discount_factor, $order_total;
[/code]

Perhaps your variable for AWO needs to be added here? Please advise.

  • reply

Use of coupon shows incorrect

Anonymous (not verified) — Mon, 12/13/2010 - 18:26

Use of coupon shows incorrect price until very end of checkout

I bought the awo pro, i made a coupon for my site but now all my coupons, even the originals from the standard virtuemart coupon area are broke. I made a coupon for 40% off all products. But during checkout it calculates the prices as 80% off. very confusing to customers. at the final checkout the price shows right but all the steps leading up to it are wrong. What could this be????

Thanks

  • reply

Please take a look at this

seyi — Tue, 12/14/2010 - 09:23

Please take a look at this thread:
http://dev.awofadeju.com/forum/awocoupon-virtuemart/help-section/coupon-...

  • reply

Great, my problem is

john71 — Sat, 10/30/2010 - 10:24

Great, my problem is solved!
Good job, thank you, John
www.gezondehuidwinkel.nl

  • reply

Shopping cart

Loading cart

User login

  • Create new account
  • Request new password

Recent blog posts

  • Virtuemart Coupon Tax Error in Initial Basket
  • Sell Gift Certificates online in your Virtuemart Store
  • How to Improve Virtuemart Coupon Capabilities
  • Drupal/PhpMailer - Wrong "From" Name via Contact Form
  • CCNewsletter Runtime Error in Internet Explorer
  • Virtuemart Coupon Error with Discount Before Tax
  • Isapi Filter for Drupal Clean Urls
more
  • home
  • products
  • documentation
  • forum
  • contact us
  • faqs
© AwoDev.com All Rights Reserved     Privacy Policy · Terms and Conditions
payment methods