473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

shopping cart problem

347 100+
i have a shopping cart type of thing using session variables on my site, all has been working fine until today when someone copied the link of the page that views the cart and emailed it to us, i then realised that this will not work as the session variable is not in the page address, is there any way of adding a session variable to a page link aswell as sending it throught the variables?

i use thsi code on pages to add to session variable

Expand|Select|Wrap|Line Numbers
  1. <%
  2.  
  3. if InStr(session("recordsInCart"), ","&request.form("recordNum")) = 0 then 
  4.    session("recordsInCart") = session("recordsInCart") + request.form("recordNum") &","
  5. else 
  6.    'do nothing
  7. end if 
  8. %>
i was wondering if i changed it so that i sent the session variable from the page in the link and then somehow used that link information to then make it a nes session variable on a new page?

i have attached some pages too
Attached Files
File Type: zip viewshortlist.zip (34.1 KB, 80 views)
Sep 19 '12 #1
1 1687
Nicodemas
164 Expert 100+
Session variables themselves cannot be passed along; however, the data they store can be arbitrarily passed on. Two alternate ways to accomplish what you are trying to do is to:

(1) Save the list of cart items to a database table with a unique ID. The link to view the cart could then contain a querystring variable to passes the unique ID to a script which can query the database table for its relevant items;

or (2) all items are stored in querystring variables in the link.
Oct 27 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Josef Blösl | last post by:
hi folks! i have a cart link in all of my listed products on the site. when i press this link i will generate a url like this ...
3
by: Randi | last post by:
Hi, I am trying to write this program to get this shopping cart to work. I need to use the calc function to determine the option prices, using the selectedIndex property for each dropdown list. ...
1
by: Randi | last post by:
Hi, Thanks David and I got that to work, I guess I still need to get it to work using the arrays and the selectedIndex property. I have to use an alert box that shows the total price like: The...
17
by: Phil McKraken | last post by:
I am having a problem putting together a shopping cart with the below script. Everything displays fine, adds totals fine, and works perfect EXCEPT if you choose the 9.95 item #5 BY ITSELF the total...
5
by: =?Utf-8?B?Q2hpV2hpdGVTb3g=?= | last post by:
i just finished creating an asp.net application named booksApp. during the testing phase uploaded live ( ex: www.bookies.com) , i tried to purchase something and add it to my shopping cart. ...
1
by: mishomira | last post by:
Hi ASP masters, I have a shopping cart where customers can buy packages and/or products. so the fist page(packages) customers can buy package and on the second page(products) there is two forms the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.