vae_store_orders() product ids for items in orders
  • Using the sample code given in the documentation I was able to get a list of orders from the vae_store_orders() function.

    Each order has an 'items' array that lists each product that was purchased. (example pasted below)

    each item in this array has many id's within it:
    [id] => 137912
    [option_id] => 373227
    [row_id] => 373206
    [store_order_id] => 76448

    However none of these correspond with the id of the product that was purchased. also the option_id does not correspond to a proper option_id in the system (at least my current system).

    I'm trying to build a script to sync inventory between a POS system and the VAE backend database and I need to be able to pull up the vae product/options object to sync.

    [items] => Array
    [137912] => Array
    [backstage_notes] =>
    [barcode] =>
    [brand] =>
    [bundled_with] =>
    [cancelled] =>
    [category] =>
    [created_at] => 2011-01-13T11:45:05-05:00
    [deleted] =>
    [discount_reason] =>
    [id] => 137912
    [inventory_applied] => 1
    [inventory_field] => inventory
    [name] => Surf Slash
    [notes] =>
    [option_id] => 373227
    [options] => Navy/X-Large
    [original_price] => 30.0
    [position] => 2
    [price] => 30.0
    [price_original] =>
    [qty] => 1
    [qty_original] =>
    [row_id] => 373206
    [store_order_id] => 76448
    [tax] => 0.0
    [total] => 30.0
    [updated_at] => 2011-01-13T11:45:05-05:00

  • 1 Answer sorted by
  • Hey Sebbean,

    It's hard to understand what you mean that "none of these match."

    The option_id and the row_id are what you should be looking at. The option_id should be the Vae ID of the selected option of the item and the row_id should be the Vae ID of the item that was purchased.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion