Thread: Bulk Updates

Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Bulk Updates

    Hi guys

    I have a client who wants to make changes to 3500 products and I wondered if I could do this quickly using sql queries:

    1. Reduce price of every product by 17.5%
    2. set every product to 'taxable goods' (currently all product prices are -non-)

    Can anybody assist me with the correct sql queries to carry out these changes globally (3500 product would take a long time one by one).

    Thank you very much in advance

    Rob
    if elephants could fly, I'd be a little more optimistic....

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Bulk Updates

    Make a DB backup before doing this anytime just in case


    Code:
    UPDATE products SET products_price= products_price * .825;
    
    UPDATE products SET products_tax_class_id=1;
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Re: Bulk Updates

    Thanks very much kobra

    I appreciate your prompt help.

    Rob
    if elephants could fly, I'd be a little more optimistic....

  4. #4
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Re: Bulk Updates

    I tried the first sql query and it came back telling me that this table does not exist. I can ceratinly not see it in the list.

    Also I have the prefix zen_ so where do I put that bit in the queries please?

    Any ideas?

    Rob
    if elephants could fly, I'd be a little more optimistic....

  5. #5
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Re: Bulk Updates

    I figured it out - doh!

    Rob
    if elephants could fly, I'd be a little more optimistic....

  6. #6

    Default Re: Bulk Updates

    Quote Originally Posted by robsnowden View Post
    Hi guys

    I have a client who wants to make changes to 3500 products and I wondered if I could do this quickly using sql queries:

    1. Reduce price of every product by 17.5%
    2. set every product to 'taxable goods' (currently all product prices are -non-)

    Can anybody assist me with the correct sql queries to carry out these changes globally (3500 product would take a long time one by one).

    Thank you very much in advance

    Rob
    Was looking to do something similar and you may have realised this by now but if you were looking to strip out the VAT element of what were originally gross prices, using 17.5% reduction will leave you with an incorrect net price. VAT is calculated as a % of the net (exclusive) price what you are doing is reducing the price by 17.5% of the gross (inclusive).

    For example 100 x 1.175 is 117.5 (you have added 17.5% to 100) but 117.5 x 0.825 will not get you back to 100...

    What you need to do is reduce the gross prices by 7/47ths of the gross which would give you the correct net price.
    I think my brain hurts...or does it hurt because I think?
    http://www.online-bikes.co.uk

 

 

Similar Threads

  1. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  2. Bulk Inventory Updates
    By rfrenzob in forum General Questions
    Replies: 1
    Last Post: 25 Nov 2008, 05:23 AM
  3. Bulk updates?
    By Schatham in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 8 Sep 2008, 04:32 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