a2lt16v Posted November 2, 2009 Share Posted November 2, 2009 whats the quickets way to apply a 10% sale to every single item on my website i have many products with many attributes and i want to stick 10% off every single product adn attribute but also display the sale logocan i do this a nice quick way through the databasewww.sts-fixings.co.uk Link to comment Share on other sites More sharing options...
rocky Posted November 2, 2009 Share Posted November 2, 2009 You can do this by executing the following query on your database: UPDATE ps_product SET on_sale = 1, reduction_percent = 10 Link to comment Share on other sites More sharing options...
a2lt16v Posted November 2, 2009 Author Share Posted November 2, 2009 thats great but i think i have done my attribute prices incorrecti have set the product price to £0.00 and then added the price to each attributewas i meant to start with a base price and then put the extra cost to each attributeso each time a attiribute was selected it will add £x.xx to my base price. or will the sale take the 10% of the attribute price too Link to comment Share on other sites More sharing options...
a2lt16v Posted November 2, 2009 Author Share Posted November 2, 2009 ignore that it works like a dreamthank you for your speedy response Link to comment Share on other sites More sharing options...
rocky Posted November 2, 2009 Share Posted November 2, 2009 Yes, you should have set the base price to the cost of the default attribute, then set the price differences on the other attributes. It doesn't matter though, since I think it will take 10% off the attribute price. Link to comment Share on other sites More sharing options...
SiteMan Posted February 15, 2010 Share Posted February 15, 2010 Help please. I am in PhpMyAdmin and looking at the ps_product section. I go into the "Run SQL query/queries on database" section and see the line "SELECT * FROM `Prestadb_product` WHERE 1". I can add commands for the "on_sale" and "`reduction_percent`" but I do not see where to set their limits or values. If I add those two values so it looks like this "SELECT * FROM `Prestadb_product` WHERE 1`on_sale``reduction_percent`" I get the error: #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 '`on_sale``reduction_percent` LIMIT 0, 30' at line 1.I have backed up my database, but nothing I seem to put in as a value gets applied or passes without an error. My host does not support this and I want to have a 5% sale on everything for the next 2 weeks. Can you help me? Link to comment Share on other sites More sharing options...
mohsart Posted February 15, 2010 Share Posted February 15, 2010 WHERE 1 means everything, it makes no sense to include the 1 in your query.Also, if you want to combine queries you need to add AND (or OR etc) in-between the different selections.But, it seems that you maybe want to do something else?/Mats Link to comment Share on other sites More sharing options...
muktadir Posted February 16, 2010 Share Posted February 16, 2010 Help please. I am in PhpMyAdmin and looking at the ps_product section. I go into the "Run SQL query/queries on database" section and see the line "SELECT * FROM `Prestadb_product` WHERE 1". I can add commands for the "on_sale" and "`reduction_percent`" but I do not see where to set their limits or values. If I add those two values so it looks like this "SELECT * FROM `Prestadb_product` WHERE 1`on_sale``reduction_percent`" I get the error: #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 '`on_sale``reduction_percent` LIMIT 0, 30' at line 1.I have backed up my database, but nothing I seem to put in as a value gets applied or passes without an error. My host does not support this and I want to have a 5% sale on everything for the next 2 weeks. Can you help me? Hi you need some basic SQL knowledge to do it. for your products that are already on sale, you can write this sqlUPDATE ps_product SET reduction_percent = 5 where on_sale = 1if you want to set all the products on sale you can run UPDATE ps_product SET on_sale = 1 if you want to set all the products on sale and give the reductionUPDATE ps_product SET reduction_percent = 5, on_sale = 1 Link to comment Share on other sites More sharing options...
SiteMan Posted February 16, 2010 Share Posted February 16, 2010 Beautiful! Thank you for your help. That worked like a charm. Very cool! Link to comment Share on other sites More sharing options...
muktadir Posted February 16, 2010 Share Posted February 16, 2010 welcome... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now