First Issue - Limited to Only Four Products

Problems installing or using the NOP Design Free Shopping Cart that do not fit into one of the above categories.

Moderators: Koibito, Stefko, Randy

First Issue - Limited to Only Four Products

Postby gestler » Tue Jun 07, 2011 1:32 am

I'm working on an existing site that was created with iWeb and attempting to add a shopping cart capability using a version of the website that I have saved on my computer. I began by attempting to create a "Catalog" page based upon our existing page layout on which I wanted to list a series of nine products from which a user could opt to select and add to his/her cart. I had no issue running the "Ultimate Delicacy" shopping cart sample. I copied the cgi-bin folder (with checkout.pl, footer.html, header.html and orders.csv files to my site, and put the media.js and nopcart.js folders into the javascript folder of the site. I copied the FORM tag and pasted it into my catalog.html file and made the parameter alterations i needed so it looks like this:

<!--Shopping Cart Product Begin-->
<P><FORM NAME=order ACTION="cart.html" onSubmit="AddToCart(this);">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1">Annual Association Dues,
<input type=hidden name="ITEM" value="Annual Dues, Association">
<input type=hidden name="PRICE" value="250.00"></p>
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1">Quantity:<input type=text size=2 maxlength=3 name=QUANTITY onChange='this.value=CKquantity(this.value)' value="0">
<input type=hidden name="ID_NUM" value="ID 001">
<input type=button value=' Add to Cart ' onClick='AddToCart(this.form)'><br />
<br />
</FORM>
<!--Shopping Cart Product End -->

I copied and pasted that FORM tag eight more times then went in and changed the name, price and ID_NUM values to correctly reflect each of the other products. When I open the catalog in my browser, only the first four entries seem to work. In other words, I can input a quantity and click on the "add to cart" button for the first four items but neither the quantity box nor the "add to cart" functions respond for those other items.

As a test, I copied one of the first four functioning listings and pasted it lower in the page and it no longer functioned.

Obviously, I'm a novice but will appreciate any help that gets me moving in the right direction.
gestler
WebMaster
 
Posts: 2
Joined: Tue Jun 07, 2011 1:01 am

Re: First Issue - Limited to Only Four Products

Postby Stefko » Tue Jun 07, 2011 8:44 pm

make sure each form is named differently, e.g. <FORM NAME=order0 ACTION="cart.html" onSubmit="AddToCart(this);">, <FORM NAME=order1 ACTION="cart.html" onSubmit="AddToCart(this);">, <FORM NAME=order2 ACTION="cart.html" onSubmit="AddToCart(this);"> etc....
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Re: First Issue - Limited to Only Four Products

Postby gestler » Tue Jun 07, 2011 11:27 pm

Thanks for the suggestion Stefko. Although the sample site did not have any differentiation in the Form names, I did as you suggested but still get no responses for the fourth product or anything thereafter.
gestler
WebMaster
 
Posts: 2
Joined: Tue Jun 07, 2011 1:01 am


Return to Help: Cart / General

Who is online

Users browsing this forum: wuhuilin11 and 5 guests