Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How not to sell out of stock items!


WiseWombat

Recommended Posts

Hi When Products are marked as Presently Out of Stock and dont exist in desired quantity in your stock.

It tells the customers" You can buy them anyway and check the quantity we have in stock for immediate deliver in the checkout process.

How could you prevent some one buying this product and prossesing this out of stock item because you may not wish to reorder or restock that particlar product.

<_<

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

Additional change for hiding 'add to cart' button in product info screen if product is sold out.

 

 

in catalog/product_info.php:

 

FIND

 

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

 

 

REPLACE

 

 

<?php if ($product_info['products_quantity'] > 0) {

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

}

?>

Link to comment
Share on other sites

Additional change for hiding 'add to cart' button in product info screen if product is sold out.

in catalog/product_info.php:

 

FIND

 

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

REPLACE

<?php  if ($product_info['products_quantity'] > 0)  {

    echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

    }

    ?>

I have found and replaced the lines in catalog/product_info.php:

 

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

with

<?php if ($product_info['products_quantity'] > 0) {

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

}

?>

but the changes have not altered the purchase of unavailable products ??? Did I do some thing wrong?? :huh:

Thanks:

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

Hi When Products are marked as Presently Out of Stock and dont exist in desired quantity in your stock.

It tells the customers" You can buy them anyway and check the quantity we have in stock for immediate deliver in the checkout process.

How could you prevent some one buying this product and prossesing this out of stock item because you may not wish to reorder or restock that particlar product.

<_<

I have seen a contribution for this.

Link to comment
Share on other sites

Not sure if the option is available in your version or not, if not there's probably a contrib that updates to this point. I'm going to be selling on available stock only so when something goes out of stock, the item listing dissapears from view.

 

In Admin - Configuration - Stock you have the option to allow checkout = true / false. Setting it to false will not allow customers to buy items when out of stock.

 

config.gif

 

Hope that helps. :blush:

Link to comment
Share on other sites

Not sure if the option is available in your version or not, if not there's probably a contrib that updates to this point. I'm going to be selling on available stock only so when something goes out of stock, the item listing dissapears from view.

 

In Admin - Configuration - Stock you have the option to allow checkout = true / false. Setting it to false will not allow customers to buy items when out of stock.

 

config.gif

 

Hope that helps. :blush:

Sorry. Wrong contrib. I mis-understood the query.

Link to comment
Share on other sites

Not sure if the option is available in your version or not, if not there's probably a contrib that updates to this point. I'm going to be selling on available stock only so when something goes out of stock, the item listing dissapears from view.

 

In Admin - Configuration - Stock you have the option to allow checkout = true / false. Setting it to false will not allow customers to buy items when out of stock.

 

config.gif

 

Hope that helps. :blush:

Thanks for your help I had it set to "true" so I set to "false" and that has fixed the problem.

:thumbsup:

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...