Zen Cart Logo
Forums / General Questions / Is this possible ? (auto add-to-cart)

Is this possible ? (auto add-to-cart)

Locked

Views: 1,085

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
19 Sep 2007, 3:16 PM
#1
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

Is this possible ? (auto add-to-cart)

Ok, here's what I'd like to be able to do;

I would like to be able to have a link in our newsletter (yes, it is opt-in only)
where all the customer has to do is click the link and certain products are automatically added to a guest cart. Then all they have to do is go to checkout and login.

Is this possible?

I have been able to create a link that will add an item to a cart by using a button with a link like; "http://www.ourdomain.com/zen/index.php?main_page=index&cPath=1&sort=20a&action=buy_now&products_id=109".

But what I'm not sure of is what happens if 100 people get this same button, will it create individual guest carts for each of them based on identifying their IP address or something?

Thanks,
trillian

19 Sep 2007, 6:53 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Is this possible ? (auto add-to-cart)

I suspect you may run into problems since Zen Cart relies on a Form Post of data, not simply on parameters passed in the URL.

As to identifying each customer's basket, each customer will get their own guest cart, just as if each customer came to your site on their own and started clicking around. Each guest cart is separate, and identified by the session that their browser opens with your store.

19 Sep 2007, 9:49 PM
#3
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

Re: Is this possible ? (auto add-to-cart)

Thanks very much Dr Byte.

What kind of problems do you think I might run into ?

Just the button which adds an item to the cart seems to work fine, so from one browser (mine) and one product it seems to work. Now as long as each person will create their own unique cart with the sessions their own browser opens it would seem fairly straightforward.

-Trillian

19 Sep 2007, 11:25 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Is this possible ? (auto add-to-cart)

trillian:

What kind of problems do you think I might run into ?Namely that the default behaviour of Zen Cart doesn't accept add-to-cart parameters as GET values (ie: URL parameters). It expects them as POST values, which come from a form-submit click.

20 Sep 2007, 12:12 PM
#5
trillian avatar

trillian

Zen Follower

Join Date:
Jun 2005
Location:
London, UK
Posts:
141
Plugin Contributions:
0

Re: Is this possible ? (auto add-to-cart)

DrByte:

Namely that the default behaviour of Zen Cart doesn't accept add-to-cart parameters as GET values (ie: URL parameters). It expects them as POST values, which come from a form-submit click.

Well, I just copied the link that shows when you click on the 'buy now' button and as far as I can tell it works fine in that it does exactly what the button would do which is to add the item to a guest cart.