Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Session variables - Tricky problem Rate Topic   - - - - -

 
  • quaxinvn
  • Junior Member
  • Members
  • Join Date: 22-Feb 11
  • 16 posts

Posted 10 March 2011 - 05:21 PM #1

Hi,

I would like to create some session variables to capture these product options (delivery to, delivery date) values when user click on 'Add to Cart' button. (Attached screenshot)

After that, whenever user opens another product page, these sessions variables will either display in place of those options or, in case session variable is not part of this product's delivery to, displays 'this product cannot be delivered to this city'.

Anyone knows how I can do this. If you think this mod requires major programming and can refer me to a good and affordable cs cart programmer, I'd appreciate it.

Thank you.

Attached Thumbnails

  • session_variables.jpg


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11492 posts

Posted 11 March 2011 - 04:54 AM #2

I would like to create some session variables to capture these product options (delivery to, delivery date) values when user click on 'Add to Cart' button. (Attached screenshot)

Is the goal to prevent the user from having to re-enter information once they have done so?

This type of thing (delivery date and location) is usually established during checkout. We have an addon product called Checkout Summary Fields which is intended to address just this kind of issue. You can read the documentation from the attachments tab of the product details page at: http://www.ez-ms.com...elds-addon.html

Not clear why you want to do this at the cart level versus the checkout level...

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • quaxinvn
  • Junior Member
  • Members
  • Join Date: 22-Feb 11
  • 16 posts

Posted 11 March 2011 - 05:13 AM #3

Thank you for your reply. The main goal is: because each product has different allowable delivery destination and delivery date (for example, some products require ordering 2 days in advance, while others require only 1), once user adds to cart one product with their delivery destination/date, he cannot add to cart another product that cannot be delivered to that specific destination/on that date. Doing this also prevents user from entering delivery date and destination again during checkout.

A working example of this feature is on www.vyshop.com.

I have taken a look at your addon and, while it provides delivery date, it doesn't really satisfy my requirement above.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11492 posts

Posted 11 March 2011 - 05:17 AM #4

No problem on the addon. Many times it's easier than typing....
I don't know what you mean by:

The global prevents user from entering delivery date

What global? You don't have the php setting "register globals" on do you? That would be reallly bad.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • quaxinvn
  • Junior Member
  • Members
  • Join Date: 22-Feb 11
  • 16 posts

Posted 11 March 2011 - 05:25 AM #5

No problem on the addon. Many times it's easier than typing....
I don't know what you mean by:

What global? You don't have the php setting "register globals" on do you? That would be reallly bad.


Sorry, typo. Should have been 'goal' instead of 'global'. I have edited my previous post to clarify. Thanks.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11492 posts

Posted 11 March 2011 - 08:00 AM #6

I guess I'm confused. It looks like you are simply using product options for your data. These should be tied to each product's selection. What am I missing?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.