Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with shopping_cart


One2remember

Recommended Posts

Posted

If a costomer get into the shopping cart after he choose a product, the textbox quantity is empty.

Example in this image.

 

shopping_cart.jpg

 

If I fill, for example, the box with "2" And update the cart, the program works fine, the quantiety on the right in "Winkelwagen" is chaged but the "2" in the textbox is gone again.

 

This is the source of the code (shopping_cart.php)

 

	  $products_name .= '	</td>' .
					'  </tr>' .
					'</table>';

  $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
										 'text' => $products_name);

  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text'=> tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2" maxlength="2"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}

new productListingBox($info_box_contents);
?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
  </tr>

 

And this is the source-code of the online page:

 

<td width="100%" valign="top"><form name="cart_quantity" action="http://www.one2remember.nl/shopping_cart.php/action/update_product?osCsid=347a193cd499e831f9330112b746d34c" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading">Inhoud van de winkelwagen</td>
		<td class="pageHeading" align="right"><img src="imagemagic.php?img=images/table_background_cart.gif&w=120&h=68&page=" width="120" height="68" border="0" alt="Inhoud van de winkelwagen" title="Inhoud van de winkelwagen"></td>

	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt=""></td>
  </tr>
  <tr>
	<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListing">

 <tr>
<td align="center" class="productListing-heading">Verwijderen?</td>
<td class="productListing-heading">Artikel(en)</td>
<td align="center" class="productListing-heading">Aantal</td>
<td align="right" class="productListing-heading">Totaal</td>
 </tr>
 <tr class="productListing-even">

<td align="center" class="productListing-data" valign="top"><input type="checkbox" name="cart_delete[]" value="29"></td>
<td class="productListing-data"><table border="0" cellspacing="2" cellpadding="2">  <tr>	<td class="productListing-data" align="center"><a href="http://www.one2remember.nl/product_info.php/products_id/29?osCsid=347a193cd499e831f9330112b746d34c"><img src="imagemagic.php?img=images/SD_all.jpg&w=100&h=86&page=" width="100" height="86" border="0" alt="512MB Kingston Sercure Digital" title="512MB Kingston Sercure Digital"></a></td>	<td class="productListing-data" valign="top"><a href="http://www.one2remember.nl/product_info.php/products_id/29?osCsid=347a193cd499e831f9330112b746d34c"><b>512MB Kingston Sercure Digital</b></a>	</td>  </tr></table></td>
<td align="center" class="productListing-data" valign="top"><input type="text" name="cart_quantity[]" size="4"><input type="hidden" name="products_id[]" value="29"></td>
<td align="right" class="productListing-data" valign="top"><b>€ 9,50</b></td>
 </tr>

</table>
	</td>
  </tr>
  <tr>
	<td><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt=""></td>
  </tr>
  <tr>
	<td align="right" class="main"><b>Sub-totaal: € 9,50</b></td>

  </tr>
  <tr>
	<td><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt=""></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>

			<td width="10"><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt=""></td>
			<td class="main"><input type="image" src="includes/languages/dutch/images/buttons/button_update_cart.gif" border="0" alt="Winkelwagen bijwerken" title=" Winkelwagen bijwerken "></td>
			<td class="main"><a href="http://www.one2remember.nl/product_info.php/osCsid/347a193cd499e831f9330112b746d34c/cPath/21_29/products_id/29?osCsid=347a193cd499e831f9330112b746d34c"><img src="includes/languages/dutch/images/buttons/button_continue_shopping.gif" border="0" alt="Verder winkelen" title="Verder winkelen"></a></td>
			<td align="right" class="main"><a href="http://www.one2remember.nl/checkout_shipping.php?osCsid=347a193cd499e831f9330112b746d34c"><img src="includes/languages/dutch/images/buttons/button_checkout.gif" border="0" alt="Kassa" title="Kassa"></a></td>
			<td width="10"><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt=""></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>

  </tr>
</table></form></td>

 

If I put the original OSc-files back

 

shopping_cart.php

includes/classes/shoppingcart.php

includes/application_top.php

stylesheet.css

 

But no results.

 

Are there some files or databse files that involved this problem??

 

Can somebody help me?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...