0

I am very new to CartThrob and EE so excuse my ignorance. I am charged with pulling order data from the database so I can write that data in our business system.

In the database we have stored, I believe, in {option_value} the item code for our inventory. I have looked through all the fields in exp_channel_data for that information but can't seem to find it.

In EE, I go to CartThrob, Products, Store-Products. Look at one of the products, under size options, there’s a field Option Short Name. Where is that stored?

1

You need to figure out with field ID # corresponds to your Products > Size Options field. Then look that field_id_XXX column up in the exp_channel_data table. The data is store as a base64 encoded and serialized array, which is somewhat of a convention in EE. So, to decode it, you'd do:

$query = ee()->db->select('field_id_XXX')->where('entry_id', 'YYY')->get('channel_data');

$data = $query->row('field_id_XXX');

$data = unserialize(base64_decode($data));

foreach ($data as $row)
{
    $row['option_value'];//this is what you're looking for
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.