Click to See Complete Forum and Search --> : paypal cart


crazy8
03-06-2007, 10:42 AM
Ok Im working on a paypal cart for a client of mine. Now the cart already was on his site he just needs me to make some alterations and to show and hanlde more options in the cart. I have never done a cart before and this is ofcourse my first ever paypal cart. Here is what I have for code so far.
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" name="numberplate1">
<table>
<tr>
<td><input type="hidden" name="on0" value="Bike">
<font size="2"><font face="Arial, Helvetica, sans-serif">Bike</font></font></td>
<td> <select name="os0" class="bikes" id="bike0" onchange="selectBikeModel(this.options[this.selectedIndex], this.id);">
<option value="-Select Bike-">-Select Bike-</option>
<option value="Cobra">Cobra</option>
<option value="Honda">Honda</option>
<option value="KTM">KTM</option>
<option value="Kawasaki">Kawasaki</option>
<option value="Suzuki">Suzuki</option>
<option value="Yamaha">Yamaha</option>
</select>
</td>
</tr>
<tr>
<td><input type="hidden" name="on1" value="Year">
<font size="2"><font face="Arial, Helvetica, sans-serif">Year</font></font></td>
<td><select name="os1" id="years0" class="bikeYears">
</select>
</td>
</tr>
<tr>
<td><input type="hidden" name="on2" value="Model">
<font size="2"><font face="Arial, Helvetica, sans-serif">Model</font></font></td>
<td><select name="os2" id="bike0model" >
<option value="-Select Model-">-Select Model-</option>
</select>
</td>
</tr>
<tr>
<td><input type="hidden" name="on3" value="Stripe Color">
<font size="2"><font face="Arial, Helvetica, sans-serif">Stripe Color</font></font></td>
<td><select name="os3">
<option value="Apple Green">Apple Green</option>
<option value="Atomic Red">Atomic Red</option>
<option value="Brick Red">Brick Red</option>
<option value="Cobalt Blue">Cobalt Blue</option>
<option value="Dark Green">Dark Green</option>
<option value="Intense Blue">Intense Blue</option>
<option value="Lemon Yellow">Lemon Yellow</option>
<option value="Purple">Purple</option>
<option value="Lime Green">Lime Green</option>
<option value="Olympic Blue">Olympic Blue</option>
<option value="Orange">Orange</option>
<option value="Silver">Silver</option>
<option value="Intense Red">Intense Red</option>
<option value="Navy Blue">Navy Blue</option>
<option value="Magenta">Magenta</option>
<option value="White">White</option>
</select>
</td>
</tr>
<tr>
<td><input type="hidden" name="on4" value="Background Color">
<font size="2"><font face="Arial, Helvetica, sans-serif">Background Color</font></font></td>
<td><Select name="os4">
<option value="Yellow">Yellow</option>
<option value="White">White</option>
<option value="Black">Black</option>
</select>
</td>
</tr>
<tr>
<td><input type="hidden" name="on5" value="Number">
<font size="2"><font face="Arial, Helvetica, sans-serif">Number</font></font></td>
<td><input type="text" name="os5" maxlength="200"></td>
</tr>
<tr>
<td><input type="hidden" name="on6" value="Front Name">
<font size="2"><font face="Arial, Helvetica, sans-serif">Front Name</font></font></td>
<td><input onclick="this.value='';" value="Name Here" type="text" name="os6" maxlength="200"></td>
</tr>
</table>
<input type="hidden" name="upload" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="staff@4mxgraphics.com">
<input type="hidden" name="item_name_1" value="Standard Numberplate Kit">
<input type="hidden" name="item_number_1" value="NX 100">
<input type="hidden" name="amount_1" value="49.95">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="return" value="http://www.4mxgraphics.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-ShopCartBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
Now the link I am using to try to figure out what I need to do is here.
https://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/howto_checkout-outside
Now my problem is that when you view the cart it only shows 2 of the options you selected. those being Bike and year but nothing else. So what else do I need to do for EVERYTHING to show in the cart. I have tried a number of things and no success yet.

Thank you all for the help.

crazy8
03-07-2007, 09:00 AM
Anyone have any ideas at all?

crazy8
03-08-2007, 11:38 AM
Does anyone in here have experiance with paypal carts or know what it is that I need to do with my code to get this working?

michael879
03-08-2007, 03:01 PM
you havnt posted any php code... what exactly do you need help with?

crazy8
03-08-2007, 03:42 PM
Well the code I have posted above you can see names of everything along with the stuff at the bottom of the script. My problem is that from what I can tell I have gone by the guidlines on the link I also posted above and for some reason the cart only displayes the first two options on my pages rather then all of the options. So Im trying to see if anyone knows where I went wrong or how to fix this.

michael879
03-08-2007, 04:44 PM
before I step through every line of your code, what do you mean by options? Do you literally mean the <option> tags or do you mean the <select> boxes?

Taschen
03-08-2007, 05:06 PM
Unfortunately the PayPal cart doesn't accept more than two options [on0 and on1]. However, you could do what osCommerce does with it's paypal plug in and post only the total of your own cart to paypal. (I.e use a seperate shopping cart from paypal and post the total from that cart to paypal).

The advantages of using your own cart: You determine all of the variables.
The disadvantages: Only the cart total and not the cart contents are posted to paypal. Consequently there is a loss of Paypal functionality (eg cart content details not sent to customer by paypal, only cart total).

michael879
03-08-2007, 06:36 PM
you could probably write a php script that loops through the options sending each one individually to paypal. this would mean paypal would have to accept get variables tho. Maybe theres a way to do it with javascript.

crazy8
03-08-2007, 07:52 PM
before I step through every line of your code, what do you mean by options? Do you literally mean the <option> tags or do you mean the <select> boxes?
Sorry, I mean the select boxes. From what I understand in the link, paypal calls them options.

you could probably write a php script that loops through the options sending each one individually to paypal. this would mean paypal would have to accept get variables tho. Maybe theres a way to do it with javascript.
How would I writ this up? Im still new to PHP so I admit, I would need as much help with it as possable and js I have only dabeled in a little bit.

The advantages of using your own cart: You determine all of the variables.
The disadvantages: Only the cart total and not the cart contents are posted to paypal. Consequently there is a loss of Paypal functionality (eg cart content details not sent to customer by paypal, only cart total).
So there is no way what so ever to get more info to display into the cart?
I guess bottom line is realy it doesnt matter totaly that "EVERYTHING" has to show in the cart. As it is right now the bike make and year show in it, but if there is a way I could have those two things along with the rest of the "options" for a customers order be mailed to my client, that would work perfectly. Any ideas how this could be done?

Thank you all so much for your help. I greatly appreciate it

crazy8
03-09-2007, 09:29 AM
any of you have any ideas on this?

Thank you

1andyw
03-09-2007, 12:38 PM
Crazy8,

Have you explored the PayPal development center? They maintain a testing environment called 'Sandbox'. You write your scripts and 'test' them online. There is a detailed pdf 'User Guide' available at that site.

https://www.paypal.com/IntegrationCenter/ic_pdnHome.html

Andy

crazy8
03-09-2007, 03:24 PM
I will surely check that out. Anyone have any answers for my last post?

Thank you guys and/or gals for all your help

crazy8
03-15-2007, 01:35 PM
Taschen

Well if I could either build my own cart or use a nice 3rd party one (if you know of any good ones let me know) as long as the cart displayed the contents and the total and only paypal displayed the total, even that would work just fine. Im on a REALY tight schedual now so Im kinda scrambling and trying to find a solution. I did look at some 3rd party ones (free of course) but not sure what to do or what to use. any ideas, suggestions, or help would be GREATLY appreciated.

crazy8
03-18-2007, 10:58 PM
Well I have done some research. Would zencart be a good choice or could that be over kill? All I really need is something that will display everything I need it to which is just stuff in text boxes and drop downs, and it should support paypal. Otherwise I just need something simple and easy to configure and install. What are all of your thoughts? any recomendations of a cart that would "fit the bill" for what I need? I really dont need something huge and fancy.

Taschen
03-20-2007, 04:36 PM
any recomendations of a cart that would "fit the bill" for what I need? I really dont need something huge and fancy.
I've only tried oscommerce which has a paypal plugin. It is a complete ecommerce solution and could take a few days to configure. The upside is that there are lots of plugins (eg for loading excel sheets etc.) It is also well supported and bugs tend to be fixed quickly. I understand that Zen cart is a similar product.

Sorry that I can't help more than that.

crazy8
03-20-2007, 08:11 PM
Well I did come across another one called shop script. This one might work for me to. One thing I was thinking of today, would it be possable for a "noob" to create a cart and have it work with paypal or is it pretty advanced stuff?

Thank you all for your help. Im realy learning alot on this stuff

MrCoder
03-21-2007, 11:29 AM
Zen is a rip off of OSc.

Been playing with the OSc 3 alpha. OSc 3.0 is going to blow all other e-commerce systems out of the water, OOP, XHTML, AJAX, Template driven, ImageMagik used by default for image upload, the list goes on.

crazy8
03-21-2007, 12:55 PM
Well granted I think it would be nice to have such an advance cart system but really I think for this application I dont need anything that advanced. It does seem like a great system but all I really need is something simple, easy to setup and configure, and will display everything I need it to and work with paypal.