[BUG - VM 2.0.0] shipment and payment method are empty

Started by osexcel, January 06, 2012, 23:51:05 PM

Previous topic - Next topic

osexcel

Hi there,

This is OSE team (Open Source Excellence) and we now report a bug when we help our client to build his VM 2.0.0 stable powered website, we will try to find out the solution later as well, but for the time-being, we would like to report the bug, please see the following detail:

****************************************************************************************************

Issue:

In the cart section, the Shipment and Payment part are showing as

No shipment selected
Select shipment

No payment selected
Select payment

Even if the payment and shipment are selected already.

How  to reproduce it?

*. (Shop as a guest): After choosing the products and click the 'select Shipping method' from this page:

index.php?option=com_virtuemart&view=cart

1. Open this file: /components/com_virtuemart/views/cart/view.html.php

2. In line 50, change it from

$cart = VirtueMartCart::getCart(false);

to

$cart = VirtueMartCart::getCart(false);;
print_r($cart); exit;

Then refresh this page:

index.php?option=com_virtuemart&view=cart

Then search

virtuemart_shipmentmethod_id

You will find the following results

[virtuemart_shipmentmethod_id] => 1

3. Now, revert line 50 to

$cart = VirtueMartCart::getCart(false);

4. In line 98, change the code from

$cart->prepareCartViewData();

to

$cart->prepareCartViewData();
print_r($cart); exit;

5. Search the code 'virtuemart_shipmentmethod_id' in this page again:

index.php?option=com_virtuemart&view=cart

6. You will find its value is

[virtuemart_shipmentmethod_id] =>0

You can re-produce this for the payment method.

Therefore, there are bugs in this function: prepareCartViewData() in the virtuemart cart helper class, WHERE the function sets the shipment method id to be 0 and payment method_id to be 0, which caused the problem.

****************************************************************************************************

We have tried to disable OSE plugin to avoid any influence, and the issue still can be re-produced. Therefore we can confirm this is a bug in Virtuemart. However, as we said, we are also investigating the issue and will report solutions again later.

Best wishes
OSE Team
Development of OSE Google Checkout module