7 replies [Last post]
Karel's picture
Offline
Joined: 06/13/2008
Juice: 19
Was this information Helpful?

Is there a possibility to edit multiple products (nodes) at once? Not e.g. images, but specifically prices? I (my clients) would love to see that feature implemented...

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Editing multiple products at once

Lyle did some work on the Editable Fields module which may allow you to setup a View of product nodes w/ the price fields and use that as a sort of bulk node editor... I haven't tried it myself, but if you can't figure it out you might post back to get a hint from Lyle. Smiling

Blackguard's picture
Offline
Joined: 10/24/2007
Juice: 47
Re: Re: Editing multiple products at once

The module only works for CCK fields, right? Not for prices I understand.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Editing multiple products at once

No, I made some changes to it that should allow it to access other fields as well. If that really doesn't work, please post an issue to its queue, and I'll try to see what I can do about it.

Juanzo@drupal.org's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 79
Re: Re: Re: Re: Editing multiple products at once

I've updated a patch there because I couldn't make it work with Ubercart 2.0 RC2 and Drupal 6. Lyle, would you mind taking a look at this whenever you have some free time?

Juanzo@drupal.org's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 79
Re: Editing multiple products at once

On the meantime, does someone know how to run a SQL command to edit all the list prices, reducing the price on 3% for example?

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
DB List Price Change

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.

adrianf25's picture
Offline
Joined: 03/14/2010
Juice: 11
One more

Fantastic that's what I was looking
But a more ..
How would it be for a class (or type of content), the query Mysql?