Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    May 2006
    Posts
    41
    Plugin Contributions
    0

    Default resetting all product minimums to zero

    Hello.

    I'm trying to find a way to reset all product minimums to zero (disable product minimums) without going in to each and every product in the site.

    I was thinking at least there should be a way to do with with a SQL statement unfortunately I can't write it myself. :)

    Does anyone know of a way to do this?

    Thanks

  2. #2
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

    Default Re: resetting all product minimums to zero

    Hi

    If you want to display the products when there is no stock, there is a setting in admin->configuration->stock
    Products status in Catalog when out of stock should be set to
    and if you select 1 (default 0), the product status will remain on

    How to write sql queries is not my forte'

  3. #3
    Join Date
    May 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: resetting all product minimums to zero

    Quote Originally Posted by Parafanaylya
    If you want to display the products when there is no stock
    Not exactly but thanks. The client I'm building the site for initially wanted minimum purchase quantities on most products. They've since changed their mind and now want to allow shoppers to order 1 (or more of course) of any product.

    I'm looking for a way to 'get rid of' or disable product minimum purchase quantites without revisiting every product in the store.

  4. #4
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

    Default Re: resetting all product minimums to zero

    This is something that I'm waiting for in an easy populate module that's due for release quite shortly (hopefully), as I have hundreds of products with min quantities that need editing

  5. #5
    Join Date
    May 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: resetting all product minimums to zero

    Well it was actually pretty easy using phpMyAdmin if you have access to that.

    I went to the SQL tab and used the interface to build the query:

    Code:
    SELECT *
    FROM `products`
    WHERE `products_quantity_order_min` >1
    I then checked all the resulting rows, selected Edit, then used Firefox's search to continually find products_quantity_order_min and change it to 1.

    Took only a few minutes and everything seems OK.

    Of course I backed up the database first. :)

  6. #6
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

    Default Re: resetting all product minimums to zero

    That's pretty cool, but I have the following to do:

    x no of products min qty 50
    y no of products min qty 72
    z no of products min qty 24

    as a wholesaler, I don't want people buying 3 of the product, and if they do buy, they must buy in units eg, 50 or 100, nothing in between. I don't know how to do SQL queries.

    parafanaylya

  7. #7
    Join Date
    May 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: resetting all product minimums to zero

    Quote Originally Posted by Parafanaylya
    That's pretty cool, but I have the following to do:

    x no of products min qty 50
    y no of products min qty 72
    z no of products min qty 24

    as a wholesaler, I don't want people buying 3 of the product, and if they do buy, they must buy in units eg, 50 or 100, nothing in between. I don't know how to do SQL queries.

    parafanaylya
    phpMyAdmin doesn't require you to write any SQL by hand. It has a point-and-click interface that basically does it for you. Of course your web host must have it installed or at least support it for this to even be an option.

    The method I used would only be useful to you if you could query the database based on existing product categories. Select all products in category X, change all min qty to 50. Repeat for Y and Z with 72 and 24 min qty respectively.

    In my situation, resetting all min qty to 1 ... it seems to do the trick.

  8. #8
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

    Default Re: resetting all product minimums to zero

    I understand what buttons to push, but don't understand what's happening. I've gone to the SQL tab in products, checked the relevant products, double clicked the fields into the query box and I get this answer:

    SQL query: Documentation

    SELECT *
    FROM `zen_products`
    WHERE 1 `products_quantity_order_min` >24 `products_quantity_order_units` >24
    LIMIT 0 , 30

    MySQL said: Documentation
    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'products_quantity_order_min` > 24 `products_quantity_order_unit

  9. #9
    Join Date
    May 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: resetting all product minimums to zero

    Code:
    SELECT *
    FROM `zen_products`
    WHERE `products_quantity_order_min` >24
    AND `products_quantity_order_units` >24
    LIMIT 0 , 30
    There was a "1" (inserted automatically by phpMySqlAdmin) in your code and also I think you need an AND inbetween the 2 qualifiers.

    I also had to change 'zen_products' to 'products' for my table name, but otherwise the code above is cut-and-paste from a successful query for me.

  10. #10
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

    Default Re: resetting all product minimums to zero

    I'm getting really close to cracking this. My query reads:

    Code:

    SELECT *
    FROM `zen_products`
    WHERE `products_quantity_order_min` >24
    AND `products_quantity_order_units` >24
    LIMIT 0 , 30
    but, it's not picking up the products I've selected with the checkboxes. The LIMIT 0, 30 are obviously the product by page, but how does it see the selected products in the query, i.e. what should the query read eg

    product id 1 to 23 to have the values
    products_quantity_order_min` >24
    AND products_quantity_order_units` >24

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. all product are zero dollars
    By shadowcast in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Aug 2010, 01:34 AM
  2. Resetting all stats
    By jeremiah in forum General Questions
    Replies: 1
    Last Post: 25 May 2010, 05:25 PM
  3. Specials Price Resetting to Zero For Client But Not Me
    By webworkshop in forum Setting Up Specials and SaleMaker
    Replies: 5
    Last Post: 26 Jul 2007, 04:06 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