Jump to content



Photo
- - - - -

Want to change the Price off all Products all at once?


This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1   jamesey

jamesey
  • Members
  • 70 posts

Posted 26 February 2010 - 20:13

Hi,

I love osCommerce, but an annoying thing about it, is that you can't seem to bulk edit products, like select all the products you have and edit the product description or the product price in one go, rather then having to edit each product individually.

I did hear ages ago on here that a way to get round this is editing products via phpMyAdmin. Apparently it is possible to bulk edit using this. I have absolutely no idea how to do this with phpMyAdmin, but if anyone knows and could explain, that would be really good.

#2   mdtaylorlrim

mdtaylorlrim
  • Members
  • 2,497 posts

Posted 26 February 2010 - 21:20

update products set products_price = 'whatever you want here';


'whatever you want here' can even be a calculation.

Have you considered the add on Product Quick Edit? It still does them one at a time but much faster.
Avoid the most asked question. See How to Secure My Site and How do I...?

#3   Hotclutch

Hotclutch
  • Members
  • 1,243 posts

Posted 26 February 2010 - 21:46

Hi,

I love osCommerce, but an annoying thing about it, is that you can't seem to bulk edit products, like select all the products you have and edit the product description or the product price in one go, rather then having to edit each product individually.

I did hear ages ago on here that a way to get round this is editing products via phpMyAdmin. Apparently it is possible to bulk edit using this. I have absolutely no idea how to do this with phpMyAdmin, but if anyone knows and could explain, that would be really good.


Most people use EasyPopulate for this
http://addons.oscommerce.com/info/500

#4   jamesey

jamesey
  • Members
  • 70 posts

Posted 06 March 2010 - 17:07

thanks for the replies guys.

mdtaylorlrim or anyone else - can you be a bit more specific about that code line you posted on the previous message? I'm not used to using phpMyAdmin so I don't really know what I'm doing.

This is what i've done so far.. (i'm guessing)...

Logged onto phpMyAdmin
Selected the Database in the top left corner
Clicked on "products" down the left side

Now i am stuck on what to do, and how to enter that code you posted to edit the prices for every item.

Also, if i wanted to change the product description for every item, what code/text would i use to do this?

#5   mdtaylorlrim

mdtaylorlrim
  • Members
  • 2,497 posts

Posted 06 March 2010 - 23:53

thanks for the replies guys.

mdtaylorlrim or anyone else - can you be a bit more specific about that code line you posted on the previous message? I'm not used to using phpMyAdmin so I don't really know what I'm doing.

This is what i've done so far.. (i'm guessing)...

Logged onto phpMyAdmin
Selected the Database in the top left corner
Clicked on "products" down the left side

Now i am stuck on what to do, and how to enter that code you posted to edit the prices for every item.

Also, if i wanted to change the product description for every item, what code/text would i use to do this?

First thing is, you don't want to start learning this on your live shop database. Duplicate the database and use it as a test db.
And what is your real objective? Maybe using a sql statement is not the best way to do what you want, but I don't really know what you want. With certainty.

Across the top right there are more tabs. Browse, Structure, sql,import, export, operations....and some others...

To run a sql statement on the table selected click the sql tab. It will bring up a text box to enter the sql. And keep in mind that this is a permanent and immediate change in the database that you cannot undo. So, it should only be reserved for the rare instance when no other way will do.

To change all the prices to $100.00 for example,

update products set products_price = '100'

Press the go button and now all your products cost $100

To increase all prices by 5% use this..

update products set products_price = (products_price * 1.05)

I think.... see, that's the reason for a test database.

The products descriptions are in the products_description table. The code would be very similar. Again, one little slip and you could render your store out of commission for quite a while. Still want to mess with phpMyAdmin?
Avoid the most asked question. See How to Secure My Site and How do I...?

#6   mdtaylorlrim

mdtaylorlrim
  • Members
  • 2,497 posts

Posted 07 March 2010 - 00:23

To increase all prices by 5% use this..

update products set products_price = (products_price * 1.05)

I think.... see, that's the reason for a test database.

The products descriptions are in the products_description table. The code would be very similar. Again, one little slip and you could render your store out of commission for quite a while. Still want to mess with phpMyAdmin?

But see..there are a couple of contributions that will do some of these things.
Avoid the most asked question. See How to Secure My Site and How do I...?

#7   DunWeb

DunWeb

    The Censored One

  • Members
  • 13,084 posts

Posted 07 March 2010 - 01:03

James,


Try this:

http://addons.oscommerce.com/info/122



Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

#8   jamesey

jamesey
  • Members
  • 70 posts

Posted 07 March 2010 - 20:48

thanks mdtaylorlrim

you've made it very clear, exactly how i wanted... so i will try this on a test database to see if it works.

i'll have a look at the quick prices contrib too

#9   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,343 posts

Posted 07 March 2010 - 21:41

To increase all prices by 5% use this..

update products set products_price = (products_price * 1.05)
<snipped>

Or you could just use the Price Updater addon. It's designed to do that and more, without learning SQL. Not that learning to write SQL is a bad idea.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price in Cart Only/MAPP Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support
Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated