Downloads
UC Stock & Price Updater is a module that tries to cover a hole on the Ubercart ecommerce system: being able to update stock level and prices at once from a single file. Use this form to import stock data and sell prices into a Übercart online shop from a CSV file. That way every day a real store or wharehouse for a group of physical store will be able to export from the central stock system a file with real stock levels that can be imported into your online Ubercart store. Imagine what would happen if you try to update stock levels every day on 500+ products store...
HOW IT WORKS: This is not a difficult module:
HOW THE CSV FILE HAS TO BE STRUCTURED: This is not a difficult module:
HISTORY: I'm not an expert programer so I tried to find some module doing something similar to try to understand how a .csv file could be openned and data extracted to be inserted on the database. After reading many forum threads at ubercart.org and drupal.org I found Dennis Stevense's taxonomy_csv.module. That module imports taxonomies but it opens .csv files and has a nice progressive bar giving interesting messages. Finally I discovered how to convert it to the sort of module capable to do the task I requiered.
HOW TO ADAPT IT TO YOUR NEEDS: Maybe the module works for you because you try to update just the same data that the module update right now: stock (level), sell_price and list_price. If that's not your case just play with the uc_stock_update_import_line function where you add to an array the different colums on the .csv file. Every line is sent to the function uc_stock_update_db where every column is sent to update the proper column on the database tables. If you have a low level of knowledge on PHP shouldn't be difficult to customize it.
FUTURE: Don't expect from me many updates, the module is ready to work and I see it as a base for web developers for building their update arrays inside it with just a small re-coding. Could the idea be implemented on core Übercart? It would be a wonderful idea if the interface was reworked a little or expanded to cover a wider range of updating possibilities.
I just hope it could be useful for a lot of people, and it could save you all the time I had to invest on trying to solve that one-time-update of all your store issue. Maybe it's not the best module you could imagine but it does the work. Although my PHP skills are limited I've wanted to share it in returning for being able to use üÜbercart and find on that community so much information. If any skilled programer has ideas to improve don't hasitate to share your thoughts and code here 
Development
| Preview | Attachment | Size |
|---|---|---|
| uc_stock_update.zip | 9.06 KB |


