nickfromtq Posted June 27, 2011 Share Posted June 27, 2011 Hi, I need to change the prices on all my products based on their weight. For example. All products that weigh between 0.1kg and 0.6kg I want to increase their price by £3.50. and the same for:0.6kg - 1.1kg - £4.991.1kg - 20kg - £6.50 and so on. I know this would need to be done by an SQL statement so any help with this would be very much appreciated. Kind regardsNick Link to comment Share on other sites More sharing options...
nickfromtq Posted June 28, 2011 Author Share Posted June 28, 2011 can anyone help me regarding this, or is it too complicated to do. Link to comment Share on other sites More sharing options...
nickfromtq Posted June 28, 2011 Author Share Posted June 28, 2011 Can anyone tell me if this will work. select * from ps_product if weight < 0.6 UPDATE ps_product SET PRICE=PRICE+3.50 Many thanksNick Link to comment Share on other sites More sharing options...
nickfromtq Posted June 29, 2011 Author Share Posted June 29, 2011 Please help, I will pay $5 into someones paypal account if they can help me. Kind regardsNick Link to comment Share on other sites More sharing options...
nickfromtq Posted June 29, 2011 Author Share Posted June 29, 2011 Sorted. update `ps_product` set price=price+'3.50' where weight BETWEEN '0.1' AND '0.6' 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