Guest Posted January 2, 2005 Posted January 2, 2005 Hi, This might been asked before but I can't find it. I want my stock to change at the moment it really does and that is not when someone orders something but when I send it out. Reason why is that I have an option for ppl to pay before they get the product and so I have always orders that are not paid for and the products are still at stock. I could work around it by deleting the order but I don't wanna do that. Second I want the status to stay active even tho it's out of stock. What I do is I sell al lot of products that I order at the moment it's ordered at my store and it's typical for me to sell several items that I don't have but get from wholesale the day after my order. So i need the active status at all times. Regards, Edwin PS Happy new year and best wishes to all
Guest Posted January 3, 2005 Posted January 3, 2005 In Admin under Configuration>Stock Set Subtract stock to False. You will probably have to manually adjust stock levels.
Guest Posted January 4, 2005 Posted January 4, 2005 Second I want the status to stay active even tho it's out of stock. What I do is I sell al lot of products that I order at the moment it's ordered at my store and it's typical for me to sell several items that I don't have but get from wholesale the day after my order. So i need the active status at all times. That's my question as well. I'm starting a small publishing company with some friends and we wish to use OSCommerce as my catalog as well, so we need to display all our books, even if they are out of stock, and the upcomming feature does not fullfill our needs... Any ideas?
Guest Posted January 4, 2005 Posted January 4, 2005 In Admin under Configuration>Stock Set Subtract stock to False.You will probably have to manually adjust stock levels. <{POST_SNAPBACK}> That is how I have it right now but I thought it would be better to have an inventory in the putter. Even if it's minus. I started hacking OSC myself again but it doesn't look great(if you want to see my other hacks look at my checkout page) What I am trying to do is as I realize now a complete inventory module. Purchase date, price and supplier and as I also have the sell date and price I thought why not make a margin function in it too. I am getting carried away with what I am doing but it are still poor hacks as I hardcode it and do a lot by try an error. Edwin
Guest Posted January 4, 2005 Posted January 4, 2005 That's my question as well. I'm starting a small publishing company with some friends and we wish to use OSCommerce as my catalog as well, so we need to display all our books, even if they are out of stock, and the upcomming feature does not fullfill our needs... Any ideas? <{POST_SNAPBACK}> If you are satisfied with the moment of change (at ordertime) you could do the following in checkout_process.php find the lines : tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) { tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); } and change the set products_status = "0" into 1 I am now modifing my invoice.php and will put my code in there as I want my stock to change at the moment I sent it. I will tell you what I have done and will do so maybe someone can help me. I will put the first part of the code in it but also I am making a inventory module that will keep track of each item I buy and sell. I have a new table in the database and the following categories stock_id products_model supplier date_in date_out purchase_price sell_price status in it I will put on each line a new product. If I buy 5 items of the same product I still make 5 new lines as I might sell 3 of them to 1 customer and the rest seperate. To keep track of the items I will look at the status and the stock_id which is an auto_increament nr and to find the oldest item of a product all I have to do is find the one with the lowest stock_id number and a active status. It is a sort of stock journal and I keep the history in it so I might use it when I want to count the gross profit. So far my thoughts ..done a bit already but need to code some more so ideas on how to accomplish what I am thinking of are appriciated. Edwin
Recommended Posts
Archived
This topic is now archived and is closed to further replies.