Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to make inventory unlimited?


Muze

Recommended Posts

I think this doesn't work. And if someone orders one piece, the product will be set to inactive...

 

Actually you may want to try that... Just set the substract stock to false.. and regardless of what the quantity is.. will remain the same, cuz it will not decrease the number of products available.. so if you have it set to 100 it will always remain at 100

Link to comment
Share on other sites

yes ok, that should work, but then no product will be substracted.

 

bye bye

 

Ok.. :o Now you can also run reports under the admin which will tell you how many of each product were sold.. also.. if you are trying to have the number of products UNLIMITED.. why would you need the products to be substracted? Logically.. I don't get it :?

Link to comment
Share on other sites

yes, but if I have a product like a cable, that I have f.e. more than 1000 pieces, I don't want that it will be substracted.

 

But If I have also f.e. computers at stock, and there I will have a stock control how can I do that then

 

???

 

A simple solution...

Just add the amount of say 10000..

 

What you are asking.. I don't think it is possible under osC

Link to comment
Share on other sites

In checkout_process.php find:

      if ($stock_left < 1) {

       tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

     }

 

This is what turns on/off a product when it hits 0 qty. If you need to use the stock tracking but do not want products to be turned off when they hit 0 you can change this section of the code.

 

You will also need to be able to sell sold out products and such.

 

The other way is to add a field to the products table like products_always_available and when this is true, have the stock checker above reset the quanity for you on those specific products when they reach a certain level. Like if they drop below 100 reset to 10,000.

Link to comment
Share on other sites

  • 1 year later...

I have a similar problem as the author.

 

I have some items which are unlimited and some with a definite quantity and reorder points.

 

In my case, I grow coffee and have (as far as inventory goes) an unlimited supply. I also sell coffee cups (which I buy and resell).

 

For the coffe, I do not want to show quantity in stock on the webpage, however I want to see how much was sold in my reports.

 

As for the coffee cups, the current way the inventory is created and managed is fine.

 

What I am hoping for is a way to disable displaying quantity remaining or quantity sold and stock checking. This would work for me on any one of the following I guess:

 

An item by item basis

A Category/product line

Or perhaps by the manufacturer

Link to comment
Share on other sites

  • 1 year later...

Nothing like reviving an old post :)

 

I had asked a similar question on the other forum, but gave it a wrong title and people are ignoring it - assuming I am asking about toggles in admin section - rather than mixing diminishing with non-diminishing ( or goods with services ) - unfortunately I have not been able to work out how to edit the title or move it to here

 

Was hoping could start a small discussion on implimenting Lindas suggestion with checkout_process.php

 

While that idea is a work-around, I believe it can be streamlined into a much "nicer" modification - rather than just "fudging" it by changing SOH ( Stock-On-Hand )

 

And of course keeping it simple for my very poor programming skills :D

 

1. admin options re stock control remain untouched ( i like this already )

 

2. add a field to main stock file "Always In Stock" or "Non-Diminishing" or "Service Item" or "Not Counted" or "Made to Order" ( simple sql statement )

 

3. modify admin files that enter/display stock to include a toggle for this new field ( how many are there ? )

 

4. modify Linda's statement to include an extra condition ( NOT written right ) :

 

if ($stock_left < 1 and_always_in_stock_is_FALSE) {

 

tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

 

}

 

This of course does not include any consideration given to other mods - that is just way to much for me to think about !

 

Thus, on a basic install, we can now mix goods and services, still keep track of "goods", still see how many "services" we have sold, not have "services" disappear from display if quantity = zero, do special/promotional "items" where we want to limit the number available ( eg we budget that we can do so many free services, or we have a limited number of a special item )

 

And all for the minimal amount of work with minimal impact on a base install - minimal mods decreases the possibility of breaking things

 

Please add any comments ( good, bad or indifferent )

 

Tim

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...