PDA

View Full Version : Help With Shopping Carts!


ragol_67
09-29-2002, 05:49 PM
First of all I don't know too much about shopping carts and how they work.

So if anyone here would like to help me out, tell me a bit about them and how they work, that would be great.

Second I need one that would be able to work in Canada, if they are different in different Country's.

Could someone please volunteer their time to help me?

Mhtml
09-29-2002, 11:50 PM
Ok as far as I know it goes like this:

website ABC has a online catalogue with a shooping cart attached.

When visitor XYZ visits ABC he makes a selection and the information is sent to the shopping cart.

When XYZ is done shopping he submits the shopping cart form.

The shopping cart form will then in most cases proceed to collect XYZ's information including credit card numbers and then will more than likely do the following;
1.Send an email to notify the manager of ABC of the sale so he can send off the purchased items.
2.Send send the data to a MERCHANT who will get your money from XYZ's credit card and into your bank account.

So if you want to have one in Canada all you need is to find a Canadian merchant or at least one that can deposit into a Canadian bank account.

Merchants can cost money, but if you want a cheap alternative go with paypal they are free and all over the world. www.paypal.com

zoobie
09-30-2002, 12:20 AM
Triple-posted :rolleyes:

ragol_67
09-30-2002, 01:03 AM
Could I get html code for a shopping cart please?

Nightfire
09-30-2002, 01:27 AM
:rolleyes: You could try and learn html. Most of the questions you are asking for in the forums are learnt from the basic html tutorials. Plus I don't think anyone is gonna make a shopping cart for you, not for free anyway. So the question is, how much you willing to pay and I'll make a cart for you?

Mhtml
09-30-2002, 04:13 AM
or you can goto www.hotscripts.com and search there they have heaps of free shopping carts.

Lol. no ca$h for Nightfire lol..:p

ragol_67
09-30-2002, 07:46 PM
I used a shopping cart from the webpage listed below (got to link, then scroll down to chapter 30)

I am wondering how I can take away that annoying caption at the top left hand side of the screen that says "Your currently have __ items in your shopping cart".

Does anyone know how to take that away?

Also when you add something to the cart, it goes to the cart page and lists everything that is in your cart, but say if the person wants to continue shopping, he/she clicks on "continue shopping" but that link takes you to the first page. How would I configure that, so it takes the person to the "last page visited"?

http://www.mcfedries.com/UsingJavaScript/examples.asp

Nightfire
09-30-2002, 08:08 PM
The whole idea of the top line "You currently have blah blah" is to tell people that they have so many items. It's useful to the user. If you don't want that on your shopping cart, simply delete that line.

For the button you mentioned, just make it to history.back which will take it back to the last page

ragol_67
09-30-2002, 08:17 PM
Okay, Thank you.

When I delete that line, the shopping cart doesn't work. If you have time can you please go to the site and try to delete the line.

Thanks!

Nightfire
09-30-2002, 08:21 PM
Try deleting this:

<script language="JavaScript" type="text/javascript">
<!--

make_database()

if (total_ordered > 0) {
document.writeln('Your <a href="' + shopping_cart_page + '">' +
'shopping cart</a> currently contains ')
document.write("<b>" + total_ordered + "</b>")
document.write(total_ordered == 1 ? " item." : " items.")
}
else {
document.writeln('Your shopping cart currently contains 0 items.')
}
document.close()

//-->
</script>


Might work, might not, don't know JS

ragol_67
09-30-2002, 08:29 PM
Ya, thats the code I tried deleting, and for some reason, the shopping cart doesn't work if I do that.

ragol_67
09-30-2002, 08:54 PM
In database.js, I added

var history_back = "history.back"

to the section where it says // These global variables set the names of your pages.

In cart.html(30.2.htm)

I changed this

<tr><td colspan="6">&nbsp;</td></tr>
<tr>
<td colspan="2" align="right">
<b>If you want to return to the catalog »»&nbsp;</b>
</td>
<td colspan="4" align="left">
<input type="button" value="Continue Shopping" onClick="location=store_page">

to

<tr><td colspan="6">&nbsp;</td></tr>
<tr>
<td colspan="2" align="right">
<b>If you want to return to the catalog »»&nbsp;</b>
</td>
<td colspan="4" align="left">
<input type="button" value="Continue Shopping" onClick="location=history_back">

I also tried "location=history.back">

They both don't work,

How would I configure this so it will work?


I am trying to change the page so when the person clicks on "Continue Shopping" they are taken to the previous page that they where at, not the first page of the website.

Nightfire
09-30-2002, 08:57 PM
history.back(-1) Try that

ragol_67
09-30-2002, 09:45 PM
When I do that, it says on the bar at the bottom of IE

".DLL/dnserror"

It says something before .DLL but it's too fast to tell what it says.



Its something like SHCOCL.

Does anyone know what kind of error this is, and how I would fix it?

ragol_67
10-01-2002, 12:18 AM
I figured out how to go back to the previous page,

it was history.back()

If anyone could tell me how to get rid of the "You currently have __item(s) in your cart."

that would be great.


THANKS
NICK!

ASAAKI
10-02-2002, 12:19 AM
sure! if the whole thing doesn't work by deleting the stuff Nightfire said, then keep the code, but do this:

<script language="JavaScript" type="text/javascript">
<!--

make_database()

if (total_ordered > 0) {
document.writeln('')
}
else {
document.writeln('')
}
document.close()

//-->
</script>


lol:D :D


disclaimer: this is ridiculous, if it works, good for u, otherwise, don't ever think any stupidity need ever exist in any case whatsoever.

Nightfire
10-02-2002, 12:22 AM
Never seen writeIn before, is that the same as write?

ASAAKI
10-02-2002, 01:02 AM
it's writeln - with an 'L', not 'I' , it's basically the same but it writes on a new line, if i'm not mistaken.

ragol_67
10-02-2002, 06:25 AM
ASAAKI, thanks, but what do you mean by your "disclaimer"?

ASAAKI
10-02-2002, 10:28 AM
:D it means that a silly code that does a lot of work to not do anything is ridiculous, but if it still works and you use it, it isn't my fault :D :cool: