get product custom field after checkout in php

  • Posts: 73
  • Thank you received: 1
11 years 3 months ago #114841

For my product I have 3 custom fields:

Brand
Model
Size

These are product custom fields.
How do I retrieve these values in the controllers/checkout.php file? They are not in the full order when I do this:

$this->fullOrder = $orderClass->loadFullOrder($id);

Only item custom fields appear. Any way to get this working? :)

Please Log in or Create an account to join the conversation.

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 3 months ago #114884

Hi,

Product custom fields are in the "product" object. You have to load the product using the product class.
In the order, you will have the "order product", it is a different kind of product and it contains "item custom fields".

The data come from two different tables. Because the product custom fields are not stored in the table "order product" you have to load it directly in the table "product".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum