Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Type quantity in a field instead of a dropdown


ClausHolstFischer

Recommended Posts

Hi.

 

I need to sell items in meters, so instead of my quantity select dropdown menu i want just at basic text field where the costumer can type 2,4 meters.

 

 

		  <?php
		  if ($product_info['products_quantity'] - $product_info['products_ordered'] == 0)
		  { echo TEXT_PRODUCT_STOCK;
  if ($product_info['products_date_available'] > date('Y-m-d H:i:s'))
  {echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available']));}
		  }
		  else
		  { echo "<select size=\"1\" name=\"quantity\">";
 for ($i=1; $i <= $product_info['products_quantity'] - $product_info['products_ordered']; $i++) {
 echo "<option>".$i."</option>";
 }
 echo "</select>";
		  }
   ?>

 

I thought this i what i need to change, but i cant figure out how. Right now it shows my stock level in the dropdown.

 

Do you need to see the rest of my product info.php?

 

Best Regards

Claus

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...