KevinSlater
Registered User.
- Local time
- Today, 12:55
- Joined
- Aug 5, 2005
- Messages
- 249
Hi,
I am using RomanCart as the shopping cart system within our website. On our website at present on the Shop page there is a selection of products and a "add to basket" button, & a quantity drop down list next to each product. When the user selects a product quantity from a drop down list and then clicks on the "add to basket" buttons it loads the shopping cart page which should add the appropiate product the customer selected along with the product quantity to the shopping basket, currently it adds the correct product correctly however it only ever adds just the one product regardless of the quantity selected.
I have this code on my html shop page for the "Add to Basket" button
form action=http://www.mywebsite.com/Shop/addtocart.php method=get>
£2.99 Quantity<select name=quantity><option>1<option>2<option>3<option>4<option>5<option>6<option>7<option>8<option>9<option>10</select>
<input type=submit value='Add to Basket'>
<input name="product" type="hidden" value="Product1"/>
</form>
Then the addtocart.php page has this to add the product (within an iframe)
<iframe src="http://www.romancart.com/cart.asp?storeid=1234&itemcode=<?php echo $_GET['product']?>"&quantity=<?php echo $_GET['quantity']?>" height="400" width="600" frameborder="0" scrolling="Yes"> IFrame. </iframe>
Im thinking maybe my php code is incorrect but not sure whats wrong?, ive also tried changing the method=post instead of get also on the shop.html page but that has not helped.
Any suggestions?
Kevin
I am using RomanCart as the shopping cart system within our website. On our website at present on the Shop page there is a selection of products and a "add to basket" button, & a quantity drop down list next to each product. When the user selects a product quantity from a drop down list and then clicks on the "add to basket" buttons it loads the shopping cart page which should add the appropiate product the customer selected along with the product quantity to the shopping basket, currently it adds the correct product correctly however it only ever adds just the one product regardless of the quantity selected.
I have this code on my html shop page for the "Add to Basket" button
form action=http://www.mywebsite.com/Shop/addtocart.php method=get>
£2.99 Quantity<select name=quantity><option>1<option>2<option>3<option>4<option>5<option>6<option>7<option>8<option>9<option>10</select>
<input type=submit value='Add to Basket'>
<input name="product" type="hidden" value="Product1"/>
</form>
Then the addtocart.php page has this to add the product (within an iframe)
<iframe src="http://www.romancart.com/cart.asp?storeid=1234&itemcode=<?php echo $_GET['product']?>"&quantity=<?php echo $_GET['quantity']?>" height="400" width="600" frameborder="0" scrolling="Yes"> IFrame. </iframe>
Im thinking maybe my php code is incorrect but not sure whats wrong?, ive also tried changing the method=post instead of get also on the shop.html page but that has not helped.
Any suggestions?
Kevin