Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hello everyone, i want 3 products in a same page, able to add basket when you give quantities? Plz help. Thanks.


Recommended Posts

Posted (edited)

Hi everyone,

 

In my website wpbulkbuys dot co.uk we have product detail page- which show only 1 item to add to the basket. But as a special offer i want to show 3 products in one page which are able to enter the quantity and add to basket. http://wpbulkbuys.co.uk/offer12.php I tried to send value to the basket. But session is not sending any value or it is sending for only 1 item at a time. I have to do before Christmas, please help.

 

Thank you in advance.

 

<?php include_once('includes/setsession.php'); ob_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/static.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK REL="SHORTCUT ICON" HREF="http://www.wpbulkbuys.co.uk/images/favicon.ico">
<meta name="description" content="window, luton, door lock, flexi, box product, best seller, luton, cheap in town, door window, free delivery lock, lockcase, handle store, fencing, gate furniture, door handles, wpbulkbuys, buy bulk, bulkbuy, bulk buy, cheap buy, patio handles, door hinges, letter plates, ebay, ebay windowparts, window parts, windowparts, cheap door handles, bulk door, bulk gate, handle store" />
<meta name="keywords" content="window, luton, door lock, flexi, box product, best seller, luton, cheap in town, door window, free delivery lock, lockcase, handle store, fencing, gate furniture, door handles, wpbulkbuys, buy bulk, bulkbuy, bulk buy, cheap buy, patio handles, door hinges, letter plates, ebay, ebay windowparts, window parts, windowparts, cheap door handles, bulk door, bulk gate, handle store" />
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>WPBulkBuys</title>
<!-- InstanceEndEditable -->
<link href="css/general.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<?php include_once('includes/home_page/inc_header.php');?>
<table width="804" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr>
   <td width="195"></td>
   <!--<td width="10" rowspan="6"> </td>
   <td width="163"></td>-->
 </tr>
 <tr valign="top">
   <td rowspan="4" align="left"><!-- InstanceBeginEditable name="Menu" -->
  <script language="javascript" src="js/gen.js"></script>
<script language="javascript" src="js/setelementstyle.js"></script>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>

<script language="javascript">
//alert($qty);
jsvar = <?php echo $row_product_details['products_quantity']; ?>;
 //document.write(jsvar);
qty_cat= <?php echo $_REQUEST['cid']; ?>;
qty_pid1= <?php echo $_REQUEST['pid']; ?>;
function check_quantity() {
var e= document.forms['shopping_cart'].elements;
if(e['quantity'].value == '' || e['quantity'].value == '0') {
 alert("Please enter a valid Quantity");
 return false;
}

if(qty_pid1==589 || qty_pid1==585 || qty_pid1==650){
 if(parseInt(e['quantity'].value) < parseInt('200')) {
  alert("Minimum order quantity is 200");
  return false;
 }
}
else if(qty_pid1==586 || qty_pid1==587 ){
 if(parseInt(e['quantity'].value) < parseInt('100')) {
  alert("Minimum order quantity is 100");
  return false;
 }
}
else if(qty_pid1==651){
 if(parseInt(e['quantity'].value) < parseInt('50')) {
  alert("Minimum order quantity is 50");
  return false;
 }
}
else if(qty_pid1==652){
 if(parseInt(e['quantity'].value) < parseInt('30')) {
  alert("Minimum order quantity is 30");
  return false;
 }
}
if(jsvar>20){
 if(parseInt(e['quantity'].value) < parseInt('20')) {
  alert("Minimum order quantity is 20");
  return false;
 }
}
else if(jsvar<20 && jsvar>0){
 if(e['quantity'].value == '' || e['quantity'].value == '0') {
  alert("Please enter a valid Quantity");
  return false;
 }
}
else if(jsvar == 0){
 alert("Sorry, Quantity is not available.");
}
return true;
}
function tellafriend() {
if(true){
 //alert("test");
 setElementStyle("tellfriend", "display", "block");
}
}
function close_tellafriend() {
if(true){
 //alert("test");
 setElementStyle("tellfriend", "display", "none");
}
}
</script>
  <?php //include_once('includes/home_page/inc_left.php');?>
   <!-- InstanceEndEditable --></td>
   <td rowspan="5" align="left"><div id="content"><!-- InstanceBeginEditable name="content" -->
   <form name="shopping_cart" id="shopping_cart" method="post" action="shopping_additem.php" onsubmit="return check_quantity();">
<table width="804" border="0" cellspacing="0" cellpadding="0">
	 <tr>
	  <td rowspan="4" align="left" valign="top" width="320" height="300">
	  <img width="299" height="290" align="absmiddle" src="/images/spl/gulock.jpg" /></td>
	  <tr>
	    <td colspan="5" width="480" valign="bottom" >
	    <img align="top" style="padding:0px 0px 0px 200px" src="/images/spl/lprice.png" />
	    <h3>GU MULTIPOINT DOOR LOCK 4 ROLLERS 2 HOOKS - 104426</h3>
	    <ul><li>Backset 35mm</li>
	    <li>Operation L/L</li>
	    <li>Faceplate 16mm</li>
	    <li>PZ Centre 92mm</li>
	    </ul>
	    <b>MINIMUM ORDER QUANTITY - 20</b>
	    </td></tr>
	    <td align="left">
			 </td>
			 <td width="5%" align="left"></td>
			 <td align="right">Quantity:
			 </td>
			  <td width="5%" align="left"><input name="quantity" type="text" id="quantity" onkeypress="return numbersonly(this,event,false)" value="" size="3" /></td>
			 <td align="right" valign="top" rowspan="2"> <input type="image" name="imageField3" id="imageField3" src="images/front_end/buttons/shopping_cart.jpg" />
			  <input name="product_id" type="hidden" id="product_id" value="<?php echo $_GET['pid'];?>" />		    <input name="MM_Shopping_Cart" type="hidden" id="MM_Shopping_Cart" value="Add to Cart" />
		  <input type="hidden" name="price" id="price" value="<?php echo $product_start_price;?>" />
		  </td></tr>
		  <td colspan="4"><?php
  if($_GET['qty'] == 'high') { echo "<span class='errortext'><b>Quantity available ".$_GET['qty1'].". Your entered quantity is higher than the stock available.</b></span>"; }

  if($_GET['addwish'] == 'success') { echo "<span class='success'><b>Product added to your wish list.</b></span>"; }

  if($_GET['cartqty'] == 'full'){ echo "<span class='errortext'><b>This product is already added in your basket. Quantity available ".$_GET['qty1'].". Your entered quantity is higher than the stock available.</b></span>";}

  ?></td>
 <tr>
	 <td colspan="6"  align="center" valign="middle"><img src="/images/front_end/spldiv.jpg" />
	    </td></tr>
	 <br />  
 <tr>
	 <td rowspan="4" align="left" valign="top" width="320" height="300">
	 <img width="299" height="290" align="absmiddle" src="/images/spl/guhandle.jpg" /></td>
	 <tr><td colspan="5" width="480" valign="bottom" >
	 <img align="top" style="padding:0px 0px 0px 200px" src="/images/spl/handprice.png" />
	    <h3>GU DOOR HANDLE</h3>
	    <ul><li>Operation L/L Inline</li>
	    <li>Screw Distance 122mm</li>
	    <li>Backplate Length 220mm</li>
		 <li>Backplate Width 30mm</li>
	    <li>PZ Centre 92mm</li>
	    </ul>
	    <b>MINIMUM ORDER QUANTITY - 20</b>
	    </td></tr>
	 <td align="left">Colour:
			 </td>
			 <td width="5%" align="left"><select>
 <option style="background-color:#FFFF99">Satin Gold 118403</option>
 <option style="background-color:#FFCC00">Polished Gold 118402</option>
 <option style="background-color:#BBBBBB">Satin Silver 118400</option>
 <option style="background-color:#EFEFEF">Polished Silver 118401</option>
 <option>White 118133</option>
</select></td>
			 <td align="right">Quantity:
			 </td>
			  <td width="5%" align="left"><input name="quantity" type="text" id="quantity" onkeypress="return numbersonly(this,event,false)" value="" size="3" /></td>
			 <td align="right" valign="top" rowspan="2"><input type="image" name="imageField3" id="imageField3" src="images/front_end/buttons/shopping_cart.jpg" />
			  <input name="product_id" type="hidden" id="product_id" value="<?php echo $_GET['pid'];?>" />		    <input name="MM_Shopping_Cart" type="hidden" id="MM_Shopping_Cart" value="Add to Cart" />
		  <input type="hidden" name="price" id="price" value="<?php echo $product_start_price;?>" />
		  </td></tr>
		  <td colspan="4"><?php
  if($_GET['qty'] == 'high') { echo "<span class='errortext'><b>Quantity available ".$_GET['qty1'].". Your entered quantity is higher than the stock available.</b></span>"; }

  if($_GET['addwish'] == 'success') { echo "<span class='success'><b>Product added to your wish list.</b></span>"; }

  if($_GET['cartqty'] == 'full'){ echo "<span class='errortext'><b>This product is already added in your basket. Quantity available ".$_GET['qty1'].". Your entered quantity is higher than the stock available.</b></span>";}

  ?></td>

	    <tr>
	    <td colspan="6"  align="center" valign="middle"><img src="/images/front_end/spldiv.jpg" />
	    </td></tr>

   <tr>
	 <td rowspan="4" align="left" valign="top" width="320" height="300">
	 <img width="299" height="290" align="absmiddle" src="/images/spl/hinge.jpg" /></td>
	 <tr><td colspan="5" width="480" valign="bottom" >
	    <img align="top" style="padding:0px 0px 0px 200px" src="/images/spl/hprice.png" />
	    <h3>PADDOCK DOOR HINGE*</h3>
	    <ul><li>Length </li>
	    <li>Width</li>
	    <li>Thickness</li>
	    </ul>
	    <h6>* while stocks last</h6>
	    <b>MINIMUM ORDER QUANTITY - 20</b>
	    </td></tr>
		 <td align="left">Colour:
			 </td>
			 <td width="5%" align="left"><select>
 <option style="background-color:#FFFF99">Gold 118031</option>
 <option style="background-color:#FF9900">Light Oak 117717</option>
 <option style="background-color:#900">Brown 118027</option>
 <option style="font-family:Georgia, 'Times New Roman', Times, serif;color:#FFF;background-color:#000;">Black 118001</option>
</select></td>
			 <td align="right">Quantity:
			 </td>
			  <td width="5%" align="left"><input name="quantity" type="text" id="quantity" onkeypress="return numbersonly(this,event,false)" value="" size="3" /></td>
			 <td align="right" valign="top" rowspan="2"> <input type="image" name="imageField3" id="imageField3" src="images/front_end/buttons/shopping_cart.jpg" />
			  <input name="product_id" type="hidden" id="product_id" value="<?php echo $_GET['pid'];?>" />		    <input name="MM_Shopping_Cart" type="hidden" id="MM_Shopping_Cart" value="Add to Cart" />
		  <input type="hidden" name="price" id="price" value="<?php echo $product_start_price;?>" />
		  </td></tr>
		  <td colspan="4"><?php
  if($_GET['qty'] == 'high') { echo "<span class='errortext'><b>Quantity available ".$_GET['qty1'].". Your entered quantity is higher than the stock available.</b></span>"; }

  if($_GET['addwish'] == 'success') { echo "<span class='success'><b>Product added to your wish list.</b></span>"; }

  if($_GET['cartqty'] == 'full'){ echo "<span class='errortext'><b>This product is already added in your basket. Quantity available ".$_GET['qty1'].". Your entered quantity is higher than the stock available.</b></span>";}

  ?></td>		  
    </table>
   <!-- InstanceEndEditable --></div></td>
 <!--  <td valign="top"><?php //include_once('includes/home_page/inc_right_search.php');?><br />
<?php //include_once('includes/home_page/inc_right.php');?></td>-->
 </tr>
 </table>
<br />
<?php include_once('includes/home_page/inc_footer.php');?>
</body>
<!-- InstanceEnd --></html>

Regards,raj.

post-297060-0-29305400-1323775406_thumb.png

Edited by RajBoopathiR

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...