2

I created attribute size in backend .I want to give the option to customer choose options from attribute value from product page .can any one tell how I call mydrop down attribute in product page.

1
  • Have you added the attribute to attribute set? Commented Nov 19, 2018 at 8:39

2 Answers 2

0
  1. You can go through creating custom options. Check once https://www.magestore.com/magento-2-tutorial/how-to-add-custom-options-in-magento-2/ Or
  2. You can create configurable products. https://www.mageplaza.com/kb/how-to-configure-product-custom-options-in-magento-2.html

Then you can reach your requirements.

3
  • I want to display in simple product
    – Monu kumar
    Commented Nov 19, 2018 at 8:33
  • But my attribute does not show on product page
    – Monu kumar
    Commented Nov 19, 2018 at 8:33
  • 1
    Then go through custom options. do reindex and flush the cache. Then it will be displayed Commented Nov 19, 2018 at 8:33
0

You need to create select attribute for create option value product attribute.

You need to create simple module for this and inside module you need to create InstallData.php file.

Create PHP file inside Model and assign that file to product attribute in InstallData.php file.

You can refer below module, For your requirement, Create Custom Option Product attribute in Magento 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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