marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
How to add multiple products to the cart

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « How to add multiple products to the cart »
Welcome, Guest. Please Login or Register.
12/17/17 at 12:02:35
Home Help Search Login Register
   marty.net message board
   About cpshop
   Tutorials
   How to add multiple products to the cart
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: How to add multiple products to the cart  (Read 9296 times)
Skreid
Gold Dragon
****

Gender: male
Posts: 53



T`is Me
   

WWW E-Mail
How to add multiple products to the cart
« on: 11/24/04 at 05:33:49 »
Reply with quote Modify message

OK, I'll try to give you guys an easy to follow set of instruction, but I'm sorry if these are not clear. If you have any question please message me.



Before I get in to this there are limitations to the system, I use CPshop so I have only tested the method out with CPshop but there is no reason for it not to work with anything else or straight from a custom HTML page.  This method does require that you have non cp hosting, that doesn’t mean that you need to host the store on your site, but at least have somewhere you can host the new product page.  I've also only used it for a few products so far, and not for clothing that requires size and colour information, although with a bit of clever JavaScript there is no reason it shouldn't work.

OK Lets go.


Let’s say we want to offer a coaster gift pack, consisting of 4 coasters and a tile box to hold them in.

We want to offer this as one product on our site and add all 5 items to the cart from one click of the add to cart button.

How it works:

On any product page you have a form, this form when submitted sends the required info, product number, quantity, size, etc to the cart script which interprets the info and adds the products.

In the form the quantity field will look like:

<input name="qty_xxxxxx" value="1" size="3" maxlength="2">

Telling the CP cart that it wants 1 of item xxxxxx.


If you add this to the form
<input name="qty_yyyyyy" value="1" size="3" maxlength="2">

and it WILL add both items to the cart when you press submit.


Going back to our example, let’s say that the item numbers for the four coasters are 11111, 22222, 33333, 44444 and the tile box is 55555

This would mean that we need the following lines in the form

<input name="qty_11111" type=hidden value="1" size="3" maxlength="2">
<input name="qty_22222" type=hidden value="1" size="3" maxlength="2">
<input name="qty_33333" type=hidden value="1" size="3" maxlength="2">
<input name="qty_44444" type=hidden value="1" size="3" maxlength="2">
<input name="qty_55555" type=hidden value="1" size="3" maxlength="2">

These are all hidden fields as we don't want to have 5 quantity fields on the page. And without some custom JavaScript in there you can't change it to add 2 sets, although this can be done, but is something for another tutorial.

If we go to one of the coasters product page and copy the source, this gives us a good starting point, edit the page to include the extra items and save it, upload it to your server and hey presto, a working multiple add to cart page.



There is no reason why this can't apply to items that have colours and sizes, but you might need some clever JavaScript function in there prior to the submit to make size changes across a few products.


The only problem is the pricing, you can't offer discount. Unless you make a new section (hidden possibly) and put copies of the reduced price items in there so that they can only be bought as a set and they'll be cheaper than buying the items separately.

Cheers

Stuart
Logged

--
Skreid Studios

The St.Andrews Store
Brian
Guest

E-Mail
Re: How to add multiple products to the cart
« Reply #1 on: 09/20/05 at 18:07:35 »
Reply with quote Modify message

Hi, A few questions before I buy the CPSHOP Software

--Can I offer multiple products that need size selection (like shirts, and shorts that you can select each size individually)?

---Also, can I use the program to keep the template shop I have created with cafepress, but get rid of the "Cafe Press toolbar" at the top of the page.

---One more thing, can I keep my shopping cart embedded in my website like it is now with my premium shop??

thanks so much!

Brian
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: How to add multiple products to the cart
« Reply #2 on: 09/21/05 at 02:17:54 »
Reply with quote Modify message

1) You can, with a little creative hacking, but cpshop doesn't have multiple product processing built-in.

2) You can recreate the template of your premium shop and use it on your own server, and be free of the CafePress brander bar.  But in your actual premium shop, you can't get rid of the brander bar -- it's a violation of the CafePress terms of use.

3) Your shopping cart would actually be the same one as the CafePress cart you use now.  cpshop doesn't use a built-in cart -- it uses the CafePress one, to ensure full functionality.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Brian
Guest

E-Mail
Re: How to add multiple products to the cart
« Reply #3 on: 09/21/05 at 14:38:21 »
Reply with quote Modify message

Thanks Marty...Ill download the software asap!

Just ONE more question... Im a beginner at this!

---If I get rid of the cafe press bar, am I forced to host the site on my own server?  Or can I still use it on cafepress's

Also my question about the shopping cart is will it be seamless with my store.  In other words, I see many of these shop examples link to a CafePress.com shopping cart and it has nothing to do with their store.  

Right now, I have a cafe press shopping cart integrated into my cafe press store... Can I accomplish this with your software?

Thanks again!
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright © 2000-2001, X-Null. All Rights Reserved.