Joomla SupportVirtueMart SupportPHP Development

Latest News

Bundled Extensions for Virtuemart 1.1.4

VM Turbo 1.1 is a bundle of fixes and extensions developed by EXPS for Virtuemart 1.1.4. The bundle contains:

Read more...

Wildcard SSL Certificates
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.

 

Scenario

Store is selling taxable items, prices do not include tax, shipping is being charged and PayPal method is used.

 

Issues

1 - PayPal order detail does not display correct amounts.
2 - Order total displays in the checkout process is a little confusing

 

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:

paypal
Where Order is for:

- a single product
- quantity one (1)
- price $15.00
- HST tax of 13% on the product
- shipping $16.08
- GST tax of 5% on shipping (Canada Post)

 

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:

 

paypal-fixed

 

Product price is correct and tax displays combined values of GST on shipping and HST on product.

 

warning

 

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

 

order-info

 

 

After Shipping Charges Applied


order-info-ship

 

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:

 

  • Change “Subtotal” header to “Amounts”
  • Remove “Tax Total contains:$1.95000 (13% Tax)” message
  • Display net shipping before tax
  • Move “Tax Total” above “Total”
  • Change “Tax Total” label to “Tax”

 

The Result:

 

Nice clean display of prices and taxes.

 

Before Shipping Charges


order-info-fixed

 

 

After Shipping Charges Applied

 

order-info-ship-fixed

 

 

warning

 

To apply this fix copy the attached files to replace the following files:

  • basket.php
  • ro_basket.php
  • basket_b2b.html.php
  • ro_basket_b2b.html.php

 

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