Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    Sydney
    Posts
    109
    Plugin Contributions
    0

    Default Restocked but remains out of stock

    I have an item that has inventory quantity of 1. Now, a test customer buys it, and completes checkout. Because this is a test order, I deleted the order straight away, and clicked "restock" in the same process. Then I browse the store, but that item is still out of stock. So I have to go back to admin and change the stock status back to "in stock".

    I'm just curious if this is the way it's supposed to work or it's just me?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Restocked but remains out of stock

    This is how it works, but if you wished restocked products to always be immediately available again, you could tweak the restock function as follows:

    find the following line in the zen_restock_order function in admin/includes/functions/general.php
    PHP Code:
    set products_quantity products_quantity " . $order->fields['products_quantity'] . "products_ordered products_ordered " . $order->fields['products_quantity'] . " where products_id '" . (int)$order->fields['products_id'] . "'"); 
    and change it to
    PHP Code:
    set products_status 1products_quantity products_quantity " . $order->fields['products_quantity'] . "products_ordered products_ordered " . $order->fields['products_quantity'] . " where products_id '" . (int)$order->fields['products_id'] . "'"); 
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Apr 2007
    Location
    Sydney
    Posts
    109
    Plugin Contributions
    0

    Default Re: Restocked but remains out of stock

    kuroi thank you! I'll certainly use that code, because that's less confusing for me

 

 

Similar Threads

  1. v151 Category removed but product remains
    By RFree190 in forum General Questions
    Replies: 9
    Last Post: 21 Jun 2014, 12:08 AM
  2. Show but hide out of stock products
    By gmrm in forum General Questions
    Replies: 2
    Last Post: 17 Apr 2011, 10:53 PM
  3. Out of stock - but checkout allowed
    By bwragg in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Feb 2008, 03:24 PM
  4. Not enough stock but still able to check out?
    By weflorencekoh in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 20 Mar 2007, 07:57 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