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.
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.