Zen Cart Logo
Forums / General Questions / Adding items to cart via URL

Adding items to cart via URL

Locked

Views: 1,463

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
18 Feb 2008, 3:33 PM
#1
chachix avatar

chachix

New Zenner

Join Date:
Feb 2008
Posts:
5
Plugin Contributions:
0

Adding items to cart via URL

Is there a way to add an item to a guest cart via a URL in the address bar? I see that the form is submitting something like this:

http://www.DOMAIN.com/store/index.php?main_page=product_info&products_id=1001&action=add_product

EDIT: The URL did not display properly in the post...

http://www.DOMAIN.com/store/index.php?main_page=product_info&products_id=1001&action=add_product

But when I enter that into the address bar, the cart loads and says "cart empty"

18 Feb 2008, 11:22 PM
#2
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Adding items to cart via URL

It kinda depends where you are trying to add it from...
Where are you putting the link? (What page within your site?)
Marg

20 Feb 2008, 6:23 PM
#3
chachix avatar

chachix

New Zenner

Join Date:
Feb 2008
Posts:
5
Plugin Contributions:
0

Re: Adding items to cart via URL

I'm actually trying to find a URL that I can enter into the address bar, hit enter, and have it take me to that site with an item in my shopping cart.

20 Feb 2008, 6:52 PM
#4
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Adding items to cart via URL

I could be wrong (someone will correct me if I am), but I don't think that's possible due to issues like session IDs and such.

28 Feb 2008, 6:39 PM
#5
haasplay avatar

haasplay

New Zenner

Join Date:
Sep 2006
Posts:
27
Plugin Contributions:
1

Re: Adding items to cart via URL

Thanks for this posting, you got me started on the right track.

If you replace

main_page=product_info

with

main_page=shopping_cart

it works.

28 Feb 2008, 7:28 PM
#6
haasplay avatar

haasplay

New Zenner

Join Date:
Sep 2006
Posts:
27
Plugin Contributions:
1

Re: Adding items to cart via URL

OK, it did work the first few times I clicked on the urls but now I get empty cart message. Session ID's are an issue here.