Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: COD with no order finalization

    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!

  2. #2
    Join Date
    Jul 2005
    Posts
    220
    Plugin Contributions
    0

    Default Re: COD with no order finalization

    Quote Originally Posted by Ajeh View Post
    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 ...
    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.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: COD with no order finalization

    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!

  4. #4
    Join Date
    Jul 2005
    Posts
    220
    Plugin Contributions
    0

    Default Re: COD with no order finalization

    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

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: COD with no order finalization

    That would take a lot of customization ...

    There is nothing right now, on a per product basis, to manage the Order Status ...

    So you need to customize this for the Catalog and the Admin both to not touch the Stock for the products_id in the Catalog ... but to alter the stock for the products_id in the Admin based on changes to the Orders Status ...

    While this could be done, it would take quite a bit of work to manage this especially if you get Orders with multiple products and such ...
    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!

  6. #6
    Join Date
    Jul 2005
    Posts
    220
    Plugin Contributions
    0

    Default Re: COD with no order finalization

    Quote Originally Posted by Ajeh View Post
    That would take a lot of customization ...

    There is nothing right now, on a per product basis, to manage the Order Status ...

    So you need to customize this for the Catalog and the Admin both to not touch the Stock for the products_id in the Catalog ... but to alter the stock for the products_id in the Admin based on changes to the Orders Status ...

    While this could be done, it would take quite a bit of work to manage this especially if you get Orders with multiple products and such ...
    Yes, I got to thinking about this too - and we decided to do the following.

    Changed that orders placing using COD automatically go to the PENDING ORDER status on our site

    Changed our SOP so that

    1. Staff member who is processing orders sees a PENDING ORDER and that order is COD - then they will go in and manually add the item back into inventory
    2. Changed posted policies regarding Cash at Pickup and items are still avaialble for purchase by other customers BEFORE COD orders are completed and NON-COD orders have priority over COD orders. COD orders that are picked up the soonest have priority over other COD orders. COD orders have time limit on how soon they must be picked up or order will be cancelled during daily maintenance tasks.
    3. Once COD order is completed the staff member processing completed orders will now go in and remove that item from inventory, etc.

    A bit more work but probably better than dealing with the alternative at this time. Perhaps you all might consider coding this option in at some future date.

 

 

Similar Threads

  1. v150 Need some Help in COD. COD fee depending on order price
    By bratsangels in forum Built-in Shipping and Payment Modules
    Replies: 20
    Last Post: 16 Sep 2012, 12:53 PM
  2. COD $100 order deposit?
    By vandiermen in forum Addon Payment Modules
    Replies: 7
    Last Post: 18 Jan 2012, 04:31 PM
  3. COD only above certain order amount?
    By ronwong in forum Built-in Shipping and Payment Modules
    Replies: 51
    Last Post: 13 Aug 2007, 05:29 AM
  4. COD or Money Order
    By Centerpoint in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 14 Mar 2007, 03:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg