Product Fields

I have spent some time trying to work out how to display the data for a product on an order, where a user has selected an option on a custom field.

Example:

Product A has a "Color" option with two choices, Blue or Red.

A user selects Blue and adds this to their cart. They checkout, and pay for the order. All good.

I can pull from the DB the order, and all of the items (with qty) in the cart. What I can't find, is where the "blue" selection is stored.

Some assistance would be great.

Thanks,

Nathan
Peter Ivanov 3 years ago

Hi Nathan,

Data for each order item is stored in the `cart` table

Currently the custom fields are stored as base64 encoded string in the field named `custom_fields_data`, but this is not the best option.
You can currency decode this string with mw()->->format->base64_to_array($str);

I have added new field named `custom_fields_json` in the cart table and from version 1.0.7 the fields data will be stored there

You must be logged in to reply on this thread


Sign Up
Nathan Goss