Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    123
    Plugin Contributions
    0

    Default Adding Quantity Discounts with SQL Queries

    Hi,

    We are working on a web store with 1000+ products. All of them are going to have qty discounts. Adding all the discounts by hand is going to take way too much time, and Easy Populate doesn't seem to have this functionality.

    So I'm trying to automate this by using MS Excel to generate SQL queries for inserting qty discounts. However, I'm bad at SQL, so I would really appreciate some help.

    Here is what I need to know, I guess:
    • SQL query to insert one new qty discount, for the product with model "M", discount quantity "Q", and the discount price "P" (actual price).

      (I guess it would have to look up the products_id according to the product model, first... since the product_discount_quantity table lists products as products_id)

      (I've noticed that this table does not list the discount type - percentage / actual price / amount off... how does this work then?)


    • If possible - SQL query to insert 2 or 3 new quantity discounts for the product with model "M" (that is, to add 2 or 3 new table rows in the same query, if possible, instead of doing it one by one as above)


    • SQL query to delete all qty discounts for the product with model "M"


    This could save us so much time it isn't even funny.... Many thanks in advance!

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,544
    Plugin Contributions
    127

    Default Re: Adding Quantity Discounts with SQL Queries

    Have you looked at the Quantity Discounts contribution? If your discounting scheme is consistent (or at least mostly consistent), it might be a good way to go.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jun 2006
    Posts
    123
    Plugin Contributions
    0

    Default Re: Adding Quantity Discounts with SQL Queries

    Quote Originally Posted by swguy View Post
    Have you looked at the Quantity Discounts contribution? If your discounting scheme is consistent (or at least mostly consistent), it might be a good way to go.
    Thank you - however this contribution seems to have a big feature overkill compared to what I need, and it changes some files which I've already custom-modified myself, which I would like to avoid. I'm just looking for a faster way to do what ZC already does; i.e. by using SQL queries directly.

 

 

Similar Threads

  1. v139h Quantity Discounts with salesmaker
    By dmagic in forum General Questions
    Replies: 3
    Last Post: 25 Jun 2013, 09:34 PM
  2. Quantity discounts.... Mass products SQL
    By kitcorsa in forum General Questions
    Replies: 2
    Last Post: 3 Aug 2010, 09:37 AM
  3. Help with SQL Queries - Have too many
    By need_help in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Apr 2009, 02:47 PM
  4. SQL queries question with old PDF Order Center mod
    By A-1 Electronics in forum General Questions
    Replies: 0
    Last Post: 17 Apr 2007, 11:53 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