Let's say I have 1000 product and there is 100 product with the same price, and I would like to change the price on them at once.
I already tried Views Bulk Operations module and others, but I don't see any solution to this so far.

Comments

bwv’s picture

The optimal method for your situation is to run an SQL command.

http://dev.mysql.com/doc/refman/5.0/en/tutorial.html

There is also a thread at the ubercart forums that you might want to look at:

http://www.ubercart.org/contrib/7588

joeforika’s picture

Thanks for helping me out, your second link solved my problem, the 'Stock and Prices Updater' module works great. All you have to do is write a simple CSV in four strict columns and import it.
Problem solved.

bisuteria’s picture

this is a very common problem and easy to resolve, that no one took the time to write a module so necessary.

bisuteria’s picture

Use PHPmyAdmin and look for uc_products. There should be 3 price fields.

UPDATE `your_database_name_goes_here`.`uc_products` SET `list_price` = `list_price` * .97 LIMIT 100 ;

First download a copy of uc_products as a backup just in case.

To test, change the LIMIT to 1 so only the first row is changed. Once it works change the limit to how may rows (products) are in your products listing.

This can be used to count the number of products in your table.
SELECT COUNT( * )FROM uc_products;

To move all prices up 25% use 1.25, etc. To lower by 1/2 use .5 in place of .97 .

It is fast, easy but not forgiving if an error is made.

http://www.ubercart.org/forum/ideas_and_suggestions/5906/editing_multipl...

ñull’s picture

This will create prices with more then two digits sometimes. There should be rounding in that query:

UPDATE `your_database_name_goes_here`.`uc_products` SET `list_price` = ROUND (`list_price` * .97 , 2) LIMIT 100 ;

ñull’s picture

Not rounding bulk price changes in database can cause this issue to to appear. I just rounded all my prices successfully with this query:

UPDATE `uc_products` SET `sell_price` = ROUND(`sell_price`,2)

SeanA’s picture

I haven't tried it yet, but Ubercart Product Actions looks promising. Works in conjunction with VBO.
http://drupal.org/project/uc_product_actions

MakeOnlineShop’s picture

Hello,

Do you have any update on this to edit products attributes without editing the complete node ?

Thank you.

Joebawca’s picture

Probably easier to just export uc_products to csv format, then adjusting the values using formulas. Truncate uc_products and import the new file.