Openbravo POS "PRODUCT" table export

Contrib type: 
Code/CSS Snippet
Status: 
Initial upload
Moderation: 
Not ready for moderation

Downloads

Compatibility: 
Ubercart 2.x

have gotten down to work on some importing and exporting of product data. here' my SQL for exporting product information to a table that is quite useable under Openbravo POS.

hope this helps someone, somewhere

remember to salt and pepper to taste!

SELECT DISTINCT
  UUID() AS "ID",
  n.nid AS "REFERENCE",
  ucp.model AS "CODE",
  "" AS "CODETYPE",
  n.title AS "NAME",
  ucp.cost AS "PRICEBUY",
  ucp.sell_price AS "PRICESELL",
  td.name, "000" AS "TAXCAT",
  "0f9681b4-8134-4fa4-8ca7-b226eeba7397" AS "ATTRIBUTESET_ID",
  null AS "STOCKCOST",
  null AS "STOCKVOLUME",
  null AS "IMAGE",
  "" AS ISCOM,
  "" AS ISSCALE,
  null AS "ATTRIBUTES"
FROM `node` as n
JOIN uc_products AS ucp
  ON ucp.nid = n.nid
JOIN term_node AS term
  ON term.nid = n.nid
JOIN term_data AS td
  ON term.tid = td.tid
JOIN term_hierarchy AS th
  on th.tid = term.tid
WHERE n.type = "product"
  AND td.vid = "1"
GROUP BY n.nid

c0psrul3's picture
Offline
Joined: 10/07/2007
Juice: 95
here's an update. it's

here's an update.
it's supposed to pull the product data from ubercart and put it into the openbravo catalog.

hopefully i'm helping someone along the way....

AttachmentSize
ubercart-openbravopos-product-sync.zip 1.48 KB
Arash's picture
Offline
Joined: 12/13/2010
Juice: 8
ob to uc connector

Hi C0psrul3,

Tanks for your attachment. It gave me some idea to begin with solving my issue.

I see that u got quit experience with OB and UC. So im trying to make a connector from product table of OB to UC. What i need to know is which column of which tables of OB do i have to map to which column of which tables of UC? With the other words how does the maping structure should be look like(if i want to get no error message from UC)? I hope you can help me to find my direction.

Tank u

c0psrul3's picture
Offline
Joined: 10/07/2007
Juice: 95
Re: Openbravo POS "PRODUCT" table export

are you building a module?
i'd be very interested in collaborating on building something to do this on command or periodically.
what do you have completed so far?