Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Posts
    9
    Plugin Contributions
    0

    Default Bulk change to order status using SQL query for certain products?

    I have a site with only 5 products (they will change regularly but the product ID will remain the same as I'll just be changing the detail). I want to be able to change, in bulk, the status for each product from
    "pending" to "processed".

    I've seen the SQL query to change ALL pending products to processed so can someone tell me what string I need to add to apply to specific product ID?

    This is what I think will do it for all products:

    UPDATE orders SET orders_status=2 WHERE orders_status=1
    INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments)
    VALUES ($id, 2, '2010-03-03 23:00:00', 0, 'order status was changed to History by Admin')

    So do I need something like
    (excuse my lack of SQL knowledge):

    UPDATE orders SET orders_status=2 FOR products_id=6 WHERE orders_status=1
    INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments)
    VALUES ($id, 2, '2010-03-03 23:00:00', 0, 'order status was changed to History by Admin')

    And one more thing. Instead of the hardcoded date, what string variable can I insert to use that day's date instead: "'DATETIME: Auto NOW()', NOW()"?

  2. #2
    Join Date
    Mar 2005
    Posts
    69
    Plugin Contributions
    0

    Default Re: Bulk change to order status using SQL query for certain products?

    you could try this , no promises though

    UPDATE orders SET orders_status=2 WHERE products_id=6 && orders_status=1
    INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments)
    VALUES ($id, 2, '2010-03-03 23:00:00', 0, 'order status was changed to History by Admin')
    Last edited by zskiman; 13 Sep 2011 at 02:17 PM. Reason: spelling change

  3. #3
    Join Date
    Mar 2011
    Posts
    9
    Plugin Contributions
    0

    Default Re: Bulk change to order status using SQL query for certain products?

    Thanks for trying bud, but that failed...

  4. #4
    Join Date
    Feb 2012
    Location
    connecticut
    Posts
    3
    Plugin Contributions
    0

    Default Re: Bulk change to order status using SQL query for certain products?

    Any update on this? Can't find any help. Thanks!

 

 

Similar Threads

  1. Is bulk change of order status possible?
    By dduane in forum Basic Configuration
    Replies: 6
    Last Post: 2 Mar 2011, 06:38 PM
  2. Change Order Status
    By shorti6877 in forum General Questions
    Replies: 2
    Last Post: 18 Oct 2010, 03:59 AM
  3. Taxes Change of order status change
    By avf in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 8
    Last Post: 17 Jun 2009, 07:10 AM
  4. Change order status to complete to delivered for downloadable products
    By designerman in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 14 Apr 2009, 05:50 PM
  5. order on behalf of customer/ bulk import of products
    By regenbauma in forum Managing Customers and Orders
    Replies: 1
    Last Post: 29 Jul 2006, 03:11 AM

Bookmarks

Posting Permissions

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