alexa-tracking
Selamat Guest, Agan dapat mencoba tampilan baru KASKUS Masih Kangen Tampilan Sebelumnya
Kategori
Kategori
Home / FORUM / All / Tech / Magento /
Magento 2 Get product custom options on list product page
1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/5b1a4f2992523352798b456b/magento-2-get-product-custom-options-on-list-product-page

Magento 2 Get product custom options on list product page



Magento2 Get product custom options on product list page


I need to add custom options added to the simple product on product list page.
 
$customOptions = $objectManager->get('Magento\Catalog\Model\Product\Option')->getProductOptionCollection($_product);
print_r($customOptions->getData());
 
the output i am getting for the product which has custom options is
Array
(
[0] => Array
(
[option_id] => 3
[product_id] => 41
[type] => radio
[is_require] => 1
[sku] =>
[max_characters] => 0
[file_extension] =>
[image_size_x] => 0
[image_size_y] => 0
[sort_order] => 1
[default_title] => size
[store_title] =>
[title] => size
[default_price] =>
[default_price_type] =>
[store_price] =>
[store_price_type] =>
[price] =>
[price_type] =>
)
[1] => Array
(
[option_id] => 4
[product_id] => 41
[type] => field
[is_require] => 0
[sku] => size-custom
[max_characters] => 0
[file_extension] =>
[image_size_x] => 0
[image_size_y] => 0
[sort_order] => 2
[default_title] => custom size
[store_title] =>
[title] => custom size
[default_price] => 0.0000
[default_price_type] => fixed
[store_price] =>
[store_price_type] =>
[price] => 0.0000
[price_type] => fixed
)
)
 
 
As you can see i am getting custom options but not the values. can somebody please help. this is on the product list page



Source: how to get value of product custom option magento 2

Urutan Terlama


×
GDP Network
Copyright © 2018, Kaskus Networks, PT Darta Media Indonesia.
Ikuti KASKUS di