I just checked to make sure - and when an order is placed with COD - the item is removed from STORE inventory but the order shows PENDING status in the backend.
I just checked to make sure - and when an order is placed with COD - the item is removed from STORE inventory but the order shows PENDING status in the backend.
The stock, products_quantity, is reduced at the end of the order, regardless of the orders_status as the product is considered "purchased" or "reserved" for the customer who ordered it ...
If I order a Red Widget that I "purchase" via credit card or check or COD and say I will drive out to your store and pick this up ... but you do not put it aside for me and sell it to someone else ... when I get to your store I am going to have to say some nasty choice words for wasting my time and gas as you thought my "COD" was not as "important" as someone who paid in another manner ...
Are you sure this is something that you really want to do?
Stock tracking is currently managed based on if you have it turned on or not ... and if not a Download, then the Stock is adjusted with the order ...
You can custom code this to manage stock differently, but I would really be cautious on the affects this might have and issues with your customers ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thanks for replying. I will explain the situation further so you can understand.
We normally sell all of our products online and ship them either via UPS or USPS. Payment is always via PAYPAL.
We have started allowing Local Pickup on some items but again they have always had to pay via PAYPAL. With all of this said, the current way our cart has worked is no problem.
We now have some customers that want to pay in Cash. As it stands now, we have to create a separate invoice outside of the cart, e-mail it to them and set a pickup apppointment. Then we must go into the site, find the item that was bought and remove it from inventory. What we would like to do is this.
Direct all customers to the site. They select a product, come to shipping screen and they select the exisiting Local Pickup shipping option. They come to the payment screen and instead of choosing PAYPAL, they select COD as the payment method. From that point it will complete the order from their point of view, issue them an invoice. On our side, the order will go into the system into a PENDING (or call it something else) status which will NOT deduct the item from store inventory until we change the status of the item to PROCESSING.
The reason for this is sometimes you have people who will say they are going to show up but never do for whatever reason. Or you have some wiseguy go on your store, do a purchase for several things (all of which would be deducted from inventory under the current process) and never complete the transaction.
What do you think?
I am asking about what happens when you have 5 Widgets and I come to your site and order 3 for COD/Pickup and Fred comes and orders 2 for PayPal/Ship it and Bob orders 3 for PayPal/Ship it and I get to your store and there aren't any in stock because you didn't subtract any from inventory and went and let Bob get "mine" because I did the COD/Pickup ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thanks again for the response
Our agent who will be doing the local pickup will have the ability to go into the backend of the store and move the order from the new pending status to delivered which would then remove the item from inventory.
I think I know what you are saying.
1. Customer 1 purchases a Widget 1 (of which there is 1 item in inventory on the store) - chooses COD
2. The order for Customer 1 is put to COD pending - the item is not removed from inventory - it still can be purchased by someone else
3. Customer 1 is scheduled for a pickup appointment. During that time, Customer 2 comes and makes a purchase for Widget 1 using paypal. His order goes into normal pending status, the item is removed from inventory (inventory for this item now reads 0). Our orders to be shipped have a 1 - 3 day processing time.
4. Customer 1 arrives for his pickup and since he made the order 1st, he is allowed to pick it up, the order is completed in the store back end, 1 item is deducted from inventory per the normal zen cart process (now bringing the inventory level for Widget 1 to "-1".
5. Customer 2 is informed that Widget 1 is now BACK ORDERED (the same agent would do this in the back end) and they are given the option to wait for an additional WIDGET 1 to come to inventory or their order can be cancelled. If the order is cancelled, then in the back end, the order is deleted, and the inventory level for Widget #1 goes from "-1" to 0.
On the other hand, this could happen too:
1. Customer 1 purchases a Widget 1 (of which there is 1 item in inventory on the store) - chooses COD
2. The order for Customer 1 is put to COD pending - the item is not removed from inventory - it still can be purchased by someone else
3. Customer 1 is scheduled for a pickup appointment. During that time, Customer 2 comes and makes a purchase for Widget 1 using paypal. His order goes into normal pending status, the item is removed from inventory (inventory for this item now reads 0). Our orders to be shipped have a 1 - 3 day processing time.
4. Customer 1 never shows for his appointment. His order is canceled and the agent doesn't select restock product quantity as to not add an additional item to inventory.
5. Customer 2 has his order shipped and all is well.
Look in the orders class and in this section the stock is managed and you can alter it as you need it to work:
Code:if (DOWNLOAD_ENABLED == 'true') { $stock_query_raw = "select p.products_quantity, pad.products_attributes_filename, p.product_is_always_free_shipping from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_ATTRIBUTES . " pa on p.products_id=pa.products_id left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id WHERE p.products_id = '" . zen_get_prid($this->products[$i]['id']) . "'"; // Will work with only one option for downloadable products // otherwise, we have to build the query dynamically with a loop $products_attributes = $this->products[$i]['attributes']; if (is_array($products_attributes)) { $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'"; } $stock_values = $db->Execute($stock_query_raw); } else { $stock_values = $db->Execute("select * from " . TABLE_PRODUCTS . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'"); }
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Linda,
Thanks for pointing me to the right file. I see this code basically looks at the order and if a product is not tagged as downloadable (with some other things too) then it will subject the item from inventory.
What could we put in there that is a product is using a specific method of payment it will not subtract from inventory and go to say the PENDING product status but will subtract from inventory when it goes to the processing status in the order?
Thanks