Search

Guys, how do you deal with the clearing of the basket if the user doesn't action any purchase after a while?

Just concious that the cart data stays until it is cleared.. is there a timeout method so the cart gets cleared after a period of time that you guys use?

Nope, there is no special timeout because we are using the Symphony (PHP) session to store data. With the latest changes, I think that a session will last for 2 weeks from the latest visit, so maybe forever.

However, there are ways to "manually" clear the Storage.

Any use case?

After successful purchase in cart and sending users back to the site, the cart/session storage may still contain the items they have just purchased..

I guess appending a GET param for cart empty on the return success url is the best option... but I was wondering if there could be a date/time node on the cart array itself and conditionally check for a elapsed time period.. may need a custom event to do this though right.

@moonoo2 I would clear the cart after a purchase manually not wait... you don't want clients to think they have not yet completed their purchase with their credit cards charged...

I second this. You should drop the cart after a successful purchase. At the moment the GET param is the best option, but I also developed another idea which I sent to Nils, still waiting for evaluation.

Thanks chaps.. GET param implemented! woop ;)

That is a flaw with Sessions in Symphony. They only clear after two weeks.

Thinking about sessions further, is there a way to check a timestamp for a duration of 30mins or something? and if the timestamp compared to current timestamp is greater than a set time, wipe the session data from the event on page load?

Use case is multiple users on same machine each accessing the same site to purchase/register for an event/activity. If they don't complete their session, that data persists until someone changes it no?

Question regarding auto submit of form on change of selection in a drop down:

I currently have a form that I wish to change the payment choice upon drop down, which in turn adds different fields to the form on submit and refresh. I'd like to clean up the UI so that the form updates/submits when the change happens on the select item. If I do this using:

<form action="" method="post" name="paytype" onchange="this.form.submit();">

But It doesn't seem to want to update the storage array with the info from this input:

<input name="storage-action[set]" type="submit" value="submit" />

Any ideas?

Submit buttons are not submitted with javascript submits. Use a hidden input instead!

<input name="storage-action[set]" type=“hidden" value=“1" />

Good call! That's implemented and working like a dream.cheers Pat

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details