How do you set Session variables? I attempted to d...
# suitecommerce
m
How do you set Session variables? I attempted to do the following.
Copy code
Session.set('order_id', this.order_id);
But when I went to the cart and attempted to retrieve them with the following code they weren't set.
Copy code
Session.get('order_id');
b
Unfortunately the Session module data doesn’t persist between shopping, myaccount, and checkout ssp’s
m
What would you use to store data between myaccount and checkout? I am implementing edit order functionality. So in my Account they use an Edit Order button within Purchase History. This dumps the items from the order back into the cart. I need to be able to query whether
order_id
is set in checkout to know whether to update an existing order or let checkout proceed normally.
b
I probably would just contain the edit order functionality to be within myaccount. Mimic the order details page with an editable version, and not use the native cart at all
m
Yeah the client saw a version like that and was very unsatisfied. I will probably just have to store browser side then. They want the shopper to be able to add new items in. It's a Food Bank and there are a ton of restrictions of what food can go to which agency based on the funding source. I don't want to have to rebuild all that.