Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Supplier Price Update

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
Not sure if this can be viewed as a contribution or the start of a contribution. We run a UK based shop which imports a number of products from suppliers in the US, and as such impacted by changes in the exchange rate. Therefore we required a way to update all prices from a selected supplier by a given percentage rate when ever we feel the exchange rate has changed to much.

Here is a SQL statement that will enable you to do this from phpMyAdmin. I would have liked to have this integrated into the osCommerce Admin pages, but my PHP & SQL skills are not good enough for that.

*PART ONE - run this one line first to give you a list of all manufacturers and their related ID's
SELECT manufacturers_name "Name", manufacturers_id "ID #" FROM manufacturers;


*PART TWO - the price update. Run everything below this line at the same time in the SQL console to update all prices for the manufacturer selected. REMEMBER to change the SET values.
SET @maID = 1; -- Set this value to the ID of the manufacturer you want to change prices for
SET @mult = 1.0; -- Set this value to the multiplier value for the price, e.g. 1.0 is the same, 0.5 halfs price, 2.0 doubles it etc.
UPDATE products SET products_price = (products_price * @mult) WHERE manufacturers_id = @maID;
   Posted on: 11/12/2008     See contribution details Request Installation with Paid service