| Virtuemart 1.1.4 Paypal Fix |
|
This article describes a modification to the standard VirtueMart display for PayPal and cart order details. It is a targeted fix for a specific scenario and may not work out of the box in your set up (e.g. "show_price_including_tax" = 1).
Please note the code for this fix is only available to EXPS clients.
ScenarioStore is selling taxable items, prices do not include tax, shipping is being charged and PayPal method is used.
Issues1 - PayPal order detail does not display correct amounts.
PayPal Order Detail
Virtuemart uses the Standard Web PayPal method that allows payment via credit card or through a PayPal account. The code included in the VM 1.1.4 release in the “Extra Information” textbox contains variables that are passed to PayPal. This code does not include a variable for “tax” and calculates “amount” incorrectly. The result is that although the total amount is correct the details are messed up creating potential confusion for the shopper.
Example for “as is” PayPal output: Where Order is for: - a single product
What's wrong? The Unit price, Unit Amount and Item Total should be $15.00 and tax amounts are not shown. Shipping and Total are correct.
The Fix: Modify PHP file embedded in PayPal method configuration tab to calculate “amount” correctly and add variable “tax”.
The Result:
Product price is correct and tax displays combined values of GST on shipping and HST on product.
To apply this fix replace embedded PHP in PayPal configuration tab with the attached file, paypal-mod.php.
Order Detail
The in the checkout amounts for orders display as follows:
Before Shipping Charges
After Shipping Charges Applied
Although the total is correct the formatting is confusing (at least to me). Traditionally, the total should be at the bottom and if taxes are shown separately they are separated for all prices. Here shipping and handling include tax, while product does not and tax total does not match the tax message. Also the “subtotal” heading is meaningless.
The Fix:
The Result:
Nice clean display of prices and taxes.
Before Shipping Charges
After Shipping Charges Applied
To apply this fix copy the attached files to replace the following files:
AND modify ..administrator\components\com_virtuemart\languages\common\english.php
BY ADDING (around line 53)
'PHPSHOP_CART_AMOUNT' => 'Amount',
AND CHANGING
'PHPSHOP_ORDER_PRINT_TOTAL_TAX' => 'Tax Total',
TO
'PHPSHOP_ORDER_PRINT_TOTAL_TAX' => 'Tax',
If you need additional modifications or have questions about Joomla or VirtueMart please contact us |







