Not only do I want the shopping basket to tell me how much I have spent, I also want it to be able to list the items I am purchasing as I shop around my site. Can this be done?
Announcement
Collapse
No announcement yet.
Can the basket show the item selected?
Collapse
X
-
It can tell you the number of items in the shopping basket, but does not tell or list the items themselves.
Adding something like:
<script language="JavaScript">
if (getCartItem(3) < 1)
{
document.write("Your shopping basket is currently.")
}
else
{
document.write("Items: " + getCartItem(3));
document.write("<br>");
document.write("Value: " + getCartItem(1));
document.write("<br>");
}
</script>
Which you can play with to your own purposes, plus there are other ways of showing this info..
-
When I place a test order on my site, clicking on "View Cart" brings up a list of all items ordered, including size, colour options , price etcBrian
www.flowergallery.co.uk
Same day flower delivery to UK
Same day flower delivery to Republic of Ireland
International Flower Delivery
Located in Argyll, Scotland, UK
Comment
-
Hi,
This has been requested before, please see this thread for the reasons why we cannot implement it.********************
Tracey
SellerDeck
Comment
-
The thread mentioned above suggests that only logged-in Business customers could display detailed cart contents. This is because these pages come via cgi-bin Perl scripts and the scripts could add extra content.
It occurs to me that there are other ways to get cgi processed data into a page. E.g.
<SCRIPT LANGUAGE="JavaScript" SRC="http://www.mysite.com/cgi-bin/ca000001.pl?ACTION=CARTSUMMARY" TYPE="text/javascript"></SCRIPT>
So we're in a simple HTML page but the code above calls the Perl ShoppingCart script with a request to return a cart summary. The code executed wouldn't return an HTML page but instead a JavaScript structure containing the cart contents.
Later on in the page some JavaScript could extract and display that data.
Note that in the above example ACTION=CARTSUMMARY isn't implemented but wouldn't be too hard to add as the routines to display the cart are already there. The change would be to change their output from being an HTML page to a simple text stream containing the JavaScript.
This is just one idea. There are several other ways to get a chunk of Perl generated data into a standard HTML page.Norman - www.drillpine.biz
Edinburgh, U K / Bitez, Turkey
Comment
-
I have a workaround that makes this possible (see it in action at www.diskdepot.co.uk). I'll make it available for anyone who wants it in a couple of days time.www.gbradley.co.uk
Web Development, Actinic Patches, Scripts & more
Comment
Comment