Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    30
    Plugin Contributions
    0

    Default Sale to make 1 attribute free for holidays

    Hi all,

    I have a client who sells a product with several customization options. I would like to have one of thees attributes free for the holiday season. It would be equal to approx $20 off, but I don't want to allow the code to discount the normal price of the product.

    Is there a way without going into each product to remove the price increase associated with an attribute?

    I've been thinking of offering a discount if the price is within a specific price range, but this is sloppy since the multiple attributes make the price range overlap each other.

    Any ideas appreciated.
    Thanks.

  2. #2
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    209
    Plugin Contributions
    2

    Default Re: Sale to make 1 attribute free for holidays

    Ok.. here's what I did. Requires you to hack your database and probably is of moderate difficulty. Practice on a copy of your site first.

    Step 1. Figure out what option ID you want to allow 'Free' For my case I wanted Free upholstery upgrades, so I choose my upholstery option which was # 190. You'll need to replace the 190 below with your option ID.

    Step 2. Use this SQL to get current attribute pricing.

    SELECT CONCAT("UPDATE `cart1_products_attributes` SET `options_values_price` = '",`options_values_price`,"' WHERE `products_attributes_id` = ",`products_attributes_id`,';')
    FROM `cart1_products_attributes`
    WHERE `options_id` =190
    AND `options_values_price` !=0;

    In phpmyadmin I then exported this set as a CSV without any field or text delimiters. It gives you the SQL needed to 'reset' the prices. Save this for when your sale ends.

    Step 3. Run this SQL to zero out your prices.

    UPDATE `cart1_products_attributes` SET `options_values_price` = 0 WHERE `options_id` =190
    AND `options_values_price` !=0;

    This will set your attribute "free".

    Now when your sale ends run the previous result set you saved to reset your prices.

    Hope it helps someone.

 

 

Similar Threads

  1. How to make a sale for if customer buys in groups of 3
    By TheBlueDragon in forum Setting Up Specials and SaleMaker
    Replies: 4
    Last Post: 23 Dec 2014, 10:50 PM
  2. Is there a mod for coupon for free attribute?
    By garyh357 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 15 May 2009, 06:40 AM
  3. Sale Price for Attribute
    By ryanb4614 in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 3 Jul 2008, 06:27 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR