session destroyed

Please post your issues and questions about One Page Checkout for Virtuemart 2 to this forum.

session destroyed

Postby acortes@.....es » Fri May 25, 2012 12:00 pm

joomla 2.5 vM 2.0.6 opc 2.0.53
my shipment system is very easy: only 3 options (pickup in place A, pickup in place B, send by mail) and all the 3 have 0 price. There is one as default (pickup on place A). IN OPC configuration I selected don't use ajax on shipment tab. Very easy on shipment specs: no price variation in any case and all the countries are allowed to buy.
The shop is very easy as well: 1 product only reserved for not-registered users and another one only for registered users.

opc flags: Log out shopper before and after purchase marked; Do NOT check agreement checkbox by default marked; E-mail As Username marked; Do not use AJAX marked; Don't show 'Continue shopping' in the template marked; remaining unmarked.

the process runs ok: I'm a guest, I select my product, add to cart, basket on screen, fill bill data and shipment address if selected send by mail and address different than the bill one, ..., checkout button, pos gateway (spanish redsys), transaction made. After the purchase is done I have shopper and joomla accounts and I'm not logged on. All right

But I wish to buy now, in the same session, one more product as a guest as well (I'm not logged) and start again. In basket all right, In bill to data appears my bill to info corresponding to the previous pruchase I just made, right, In shipment disappears the options and a message appears instead of it ="We are sorry, no shipment method matches the characteristics of your order.", corresponding to COM_VIRTUEMART_CART_NO_SHIPPING_METHOD_PUBLIC, problem.

I tried to find the problem and started to debug and found that the session is destroyed. I add echo for sessions data (ID, NAME, STATE, TOKEN) in vm product detail page, vm addtocart page, opc basket, opc unlogged template, payment gateway.

For the first purchase all is right, all have the same info and returns ok from payment gateway.
In the next purchase (without leaving browser - same session): vm product detail page, vm addtocart page (both the same of the first round . same session, right). opc basket, opc unlogged template no ID, no NAME, STATE desyoed, token in basket different than the previous, token in checkout page different than the previous and different of the basket one as well. The session is destroyed.

Please, I'm going to production next monday and I'm not able to proceed. Help
acortes@.....es
 
Posts: 2
Joined: Fri May 25, 2012 10:37 am

Re: session destroyed

Postby admin » Tue May 29, 2012 6:55 pm

Hello,
first of all i would like to help you directly over my skype support and please write me an email and i will send you my skype contact back.

Using no ajax may be one reason why you get some problems with the shipping handler - the shipping is loaded after any address change (state, country, zip) - these are the only fields which are saved into session while the shipping is loaded. Right at the end of the process the session is retored to it's original state because otherwise your mini cart module and flypage would count taxes or shipping for the address stored in the session. (example: you enter a basket select your country and state for which the tax is applied and leave the checkout page - if the session is not restored to the original state your minicart would show you total for automatically selected shipping for the stored address and flypage would show the taxes). OPC deletes all payment and shipping info after the single thread is finished (either main thread of the ajax thread). After submitting order the data are purely fetched from the POST regardless the session data (customer address of unlogged or his id for logged).

If there is delayed shipping turned on this will lead to shipping be loaded purely with the ajax thread and will not load the shipping during the main thread - so it does not slow down the checkout loading.

The shipping strongly depends on the default address which is used for missing fields especially for country or zip code.

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


Return to One Page Checkout for Virtuemart 2