PhocaCz / PhocaCart

Phoca Cart is Joomla! CMS extension. Component - e-commerce solution for Joomla! CMS
http://www.phoca.cz/phocacart
Other
30 stars 10 forks source link

[Feature Request] Possible session data after order is made and user is returning back from payment method website #46

Open PhocaCz opened 3 years ago

PhocaCz commented 3 years ago

Possible session data after order is made and user is returning back from payment method website

Additional info: https://www.phoca.cz/forum/viewtopic.php?f=44&t=62208&p=165162#p165276

Werbegams commented 3 years ago

At the moment I am testing a solution for the infoscreen. I decided to use a separate Session which is created during the checkout in the default_address.php (override in template folder) and get finally destroyed at the info screen page. I create a random string and enter it into a hidden form field at the default_address.php.

The tricky part was, to allways update the form field, also if you are a logged in user and address data is allready filled out. But with a javascript reload function to compulsary "check" the address data it works. The reload is only triggered, if a Session entry "erstes_mal" has the value 1. This value gets set at the popup window "add_to_cart.php" in the layouts.

If you are redirected from paypal to infoscreen, the Session variables are still there and I use it, to get some information from the database like amount, bank informations and so on. At the end of the script, I destroy the sessions.