Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

check stock


Recommended Posts



in product_info.php checks stock and disable if stock is 0. even it is writen exosted the button, the button is still active.


how can make disable button in below line.


echo tep_draw_button(IMAGE_BUTTON_OUT_CART);


$prod_quantity = tep_get_products_stock($products_id);

if ($prod_quantity >= 1){

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary');}

else {

echo tep_draw_button(IMAGE_BUTTON_OUT_CART);



Link to comment
Share on other sites

thx for reply but this is not a solution. since the customer can add products to basket. in checkout process, the customer must delete the products. this gives customer extra work. in our opinion, the button must be unavailable and the customer can not add anything to basket if it is 0 stock. pls help me to disable button after stock is checked.



Link to comment
Share on other sites

If you carry out what i suggested the item will not show in your store if it is out of stock, and if say you have two in stock and the customer tries to order 3 a message will show saying not enough stock. If that is not what you want, then fair enough.


Link to comment
Share on other sites


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

  • Create New...