Jump to content

Help needed for mass price update


Recommended Posts

Hello All

Im hoping someone can help because im about to start crying....

I am looking for a way to update all my prices by 50p. I need to add 50p to every price on the site as i made a 'slight' miscalculation when they were initially listed (which took ages)

I have tried to export the data via CSV file but when it comes to reload it, it wont reload.

Now im wondering if there is something i am doing wrong.

Any help would be gratefully recieved!

Regards

Lyndsay
Handcraftedby.co.uk

Link to comment
Share on other sites

  • 2 months later...
Hello All

Im hoping someone can help because im about to start crying....

I am looking for a way to update all my prices by 50p. I need to add 50p to every price on the site as i made a 'slight' miscalculation when they were initially listed (which took ages)

I have tried to export the data via CSV file but when it comes to reload it, it wont reload.

Now im wondering if there is something i am doing wrong.

Any help would be gratefully recieved!

Regards

Lyndsay
Handcraftedby.co.uk


In phpMyAdmin select ps_product table and use SQL command:

UPDATE ps_product
SET price = (price + 0.5)



You can use other operator or value, for example you can increase the price with 5% using something like this

UPDATE ps_product
SET price = (price * 1.05)



I strongly advise you to backup your data before you try this.

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...

Thanks for the reply.

In the meantime i found a free module http://catalogo-onli...prestashop.html but i havent yet installed it.

What do you think about this one?

I'm a bit afraid of messing with mass changes...

 

That module is for 1.3 so may have issues if you are using 1.4 as the code did change.

 

I think you are missing how simple the code offered by presusr really is,

Just check that your prefix is the same (pr or ps) and change if necessary.

So just log into your server, go to your database, click on sql paste the code in the text box and click go, thats it.

I have used this to update my specific prices for team drivers by 5% and worked perfectly.

UPDATE `ps_specific_price` SET `price` = `price` + (`price` * 0.06)

One thing to always consider when changing prices by % if you need to go back for some reason 5% added to 100 is not the same as 5% subtracted from 105.

 

 

 

UPDATE ps_product SET price = (price + 0.5) (increase of 50 cents)

UPDATE ps_product SET price = (price - 0.5) (decrease of 50 cents)

 

 

UPDATE `ps_product` SET `price` = `price` + (`price` * 0.05) (increase of 5%)

UPDATE `ps_product` SET `price` = `price` - (`price` * 0.05) (decrease of 5%)

Edited by tdr170 (see edit history)
  • Like 1
Link to comment
Share on other sites

That module is for 1.3 so may have issues if you are using 1.4 as the code did change

 

Thank you for the interesting reply.

 

Yes i use 1.4.7.3, but as far as i inderstood the module info, the version of the module is 1.3 but it is compatible with prestashop 1.2 through 1.5

  • Version 1.3
  • Language en, es, fr, cs, de, id, it, nl, pl, ro, zh
  • Compatibility Prestashop 1.2/1.5

/or, it is intended only for prestashop 1.2 and 1.5, what i doubt/

 

I'd ask you for a clarification about the sql code.

Is there some reason why you gave the table ps_specific_price as an example? My ps_specific_price table is empty.

 

As for UPDATE `ps_products`, did you actually mean `ps_product` (i dont have `ps_products` table) ?

 

Finally, what if i want to update prices for a specific subcategory ?

 

Thank you very much in advance

Edited by core- (see edit history)
Link to comment
Share on other sites

I gave the Specific code as an example of how you can modify the code for other tables if you read closely you will see that I wrote that I used this same code to update my specific prices by 5%.

 

Yes sorry I have changed the code above did not notice that I added an S thinking of products I guess.

 

As for sub categories the database is not broken down into categories as each product is assigned a category # and I am not sure if that can be accomplished through sql. (worth looking into though)

Link to comment
Share on other sites

As for sub categories the database is not broken down into categories as each product is assigned a category # and I am not sure if that can be accomplished through sql. (worth looking into though)

I think there's nothing that can't be accomplished by a magic language like sql ;)

The statement should have a condition that all products with some specific sub category id, should be updated, but frankly at the moment i have no enough time (nor courage) to experiment with sql (i forgot much of it) ^_^

 

As for the module, it's indeed not clear whether it's for 1.2, 1.3 and 1.5 although i don't understand why compatibility with (most spread) presta 1.4 would have been omitted..

What is your final opinion about that ? (i doubt developers would respond to a question about a free module)

 

Thanks

Link to comment
Share on other sites

OK I took a second look and my mistake I did see the 1.3 and mistook that as Prestashop 1.3 so it should be OK.

 

And yes magic sql should be able to do this with a little more code and I will try it in the near future.

I am loading 1.4.8 onto another server as a test site just for things like this and will experiment.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...