Tags/topics: 
2
Answers
Vote up!
0
Vote down!

How to use existing stock and price data sources?

I apologise for cross-posting. Thought this the more appropriate place to ask for help than the issue queue.

My client has an existing Point Of Sale (POS) system with a database which is the authoratative source of
1) stock levels; updated as and when they are
-a) checked in upon delivery to their store using an established bar code system;
-b) sold in their store;
and also
2) trade prices from which the eCommerce web price is to be calculated.

Are there Drupal Commerce hooks that I can use to get control at the appropriate events so I can interrogate this POS database for stock and price data when it is required by Drupal Commerce as it creates pages for web visitors? To tell visitors what the price is and whether its in stock or not.

Or would it be appropriate to update stock levels and prices on the Drupal Commerce database tables in a cron job?

I would be very grateful for any pointers to the correct way to do this as I imagine this is a fairly common scenario: needing to reference an additional database and / or keeping the Drupal Commerce database updated in parallel somehow.

Many thanks.

Asked by: iainH
on December 24, 2012

2 Answers

Vote up!
1
Vote down!

I think that the Commerce Feeds module is what I probably want; in conjunction with SQL Feed

Answer by: iainH
Posted: Dec 27, 2012
Vote up!
0
Vote down!

Is this what hook_commerce_product_calculate_sell_price_line_item_alter($line_item) is intended for: giving me the chance to intercept any reference to the Drupal database's price values?

Answer by: iainH
Posted: Dec 25, 2012