Guest ElBonzi Posted September 5, 2010 Share Posted September 5, 2010 I'm using a popup window on my page that opens when someone tries to click "view cart". The popup calls a php script that checks if theyre in a deliverable radius (shows them a message otherwise) and I then want to store a flag like inDeliveryZone that persists in cubecarts session or in a cookie. So the question is - how would i store a variable in the session or in a cookie so I can reference it in shoppingCart.inc.php? Quote Link to comment Share on other sites More sharing options...
vokf Posted September 5, 2010 Share Posted September 5, 2010 I'm using a popup window on my page that opens when someone tries to click "view cart". The popup calls a php script that checks if theyre in a deliverable radius (shows them a message otherwise) and I then want to store a flag like inDeliveryZone that persists in cubecarts session or in a cookie. So the question is - how would i store a variable in the session or in a cookie so I can reference it in shoppingCart.inc.php? Cubecart uses the database for sessions, so you could add an extra field in the Sessions table. If you then read the /includes/global/switch.inc.php, you'll see how CubeCart uses the sessions table to retain the currency/langage settings. The above, does not require cookies, and so may be cleaner. With this set, you can then attempt to read it back in the shoppingCart.inc.php code, and manipulate the template output to suit. If you actually need help implementing this, then hop over to CubeCartForums.org for help. Jason Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.