4 replies [Last post]
diegohermes's picture
Offline
Joined: 09/12/2007
Juice: 147
Was this information Helpful?

Well, direct to point because this is a little urgent, there is any way to update all the prices of the site? My client ask me that, he must update (reajust?) the prices in, for example 5%, since this is possible via mysql, maybe there is already something in ubercart for doing that or maybe is not so difficult to do, any ideas?

By the way, if percentage is not possible, maybe a numeric reajust or something like that, i accept any suggestions.

regards

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Update all prices of the store

This reminds me that I need to take a closer look at the Editable fields module. I became a co-maintainer of it because I thought it would be useful for exactly this reason.

If you want to use it for Übercart, you currently have to get the CVS HEAD because the latest release only handles CCK fields.

Another option is to use SQL on the database directly. The price fields are in the uc_products table, and if you really want to update the prices of all products, it's relatively easy. Figuring out how to not update some of them is a harder project.

diegohermes's picture
Offline
Joined: 09/12/2007
Juice: 147
Re: Re: Update all prices of the store

Humm, i can't update to the CVS Head this time, i must stay which alpha8 since i made a few modifications in the core modules (i know, this is wrong rsrs).

I think your idea is the best, use SQL directly on the database. What you suggest, create a small module with a imput field where the client can enter the update or it can be done which CCK or something like that?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Update all prices of the store

Actually, I meant the HEAD of editable fields. Then you would have to make a View of the Editable type and display the forms of the fields you want to change. This turns the view into a big node form for each node you get.

Writing a small module to do the updates is a good way to go. But be warned that no matter what you come up with, it will eventually not do as much as your client wants. Such is the nature of software development.

diegohermes's picture
Offline
Joined: 09/12/2007
Juice: 147
Re: Re: Re: Re: Update all prices of the store

Right, sorry for the mistake.

I try to find the editablefields HEAD but im not very familiar with the CVS environment, so i download from here the module and the .info file but still doesnt work with the product fields, maybe (almost certain) i download something wrong. Where can i find the HEAD of this module since he isnt in the module page.

Ahh, i forgot to say, i download and install the official release 5.x-3.0 and the override the module with what i supose to be the HEAD.

Thanks for the help Lyle.