Hi Max Pronko I downloaded the magento2-custom-attribute-master archive and i installed it in my magento project version 2.1.7 does not work i did not create the attribute what i can do thanks
Shouldn't that custom attribute be visible in the frontend? At the moment I am no able to see it in the frontend /when I add address or edit address of user/, is there additional steps that should be done?
Hi Nikola, Thank you for your question. You are absolutely correct in saying that custom attribute is not visible on frontend. I am planning to upload Part 3 of the series related to custom attribute to show how to add it to customer's account. This task is kind of tricky one, but I will explain in the video on Monday. Let me know if you have questions.
Hi Max Pronko I downloaded the magento2-custom-attribute-master archive and i installed it in my magento project version 2.1.7 does not work don't save the new data on front end only on the backend... please helpme
Hi Max, I followed your way to add a text attribute and a select attribute with options. The text attribute works perfectly, however select attribute is not been saved in database. From admin, in customer -> addresses form I am able to see the field with the available options, but on save the selected value disappears. I have also found that text attribute value has been stored in customer_address_entity_varchar table, but i can not find any relevant record for the select attribute. I have used the bellow lines in order to create the select attribute $this->eavSetup->addAttribute( AddressMetadataInterface::ENTITY_TYPE_ADDRESS, self::PRC_TYPE_ATTRIBUTE_CODE, [ 'type' => 'int', 'label' => 'Pricing Type', 'input' => 'select', 'forms' => array('customer_account_edit','customer_account_create','adminhtml_customer','checkout_register'), 'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table', 'required' => false, 'visible' => 1, 'user_defined' => false, 'position' => 110, 'option' => array('values' => array('Apodiksi', 'Timologio')) ] ); Can you please help me with this? Thank you in advance
Hi Sandy. Thank you for the question. This is the biggest question so far I've received in the TH-cam comments section. Will you write me an email with full setup class so I can debug on my environment? Email: blog@maxpronko.com
Hi Max Pronko I downloaded the magento2-custom-attribute-master archive and i installed it in my magento project version 2.1.7 does not work i did not create the attribute what i can do thanks
i dont see 'addresses'?
i am using declarative-schema how can i add new field on sales_order_grid table (i dont like to use setupSchema)?
Shouldn't that custom attribute be visible in the frontend? At the moment I am no able to see it in the frontend /when I add address or edit address of user/, is there additional steps that should be done?
Hi Nikola,
Thank you for your question.
You are absolutely correct in saying that custom attribute is not visible on frontend. I am planning to upload Part 3 of the series related to custom attribute to show how to add it to customer's account. This task is kind of tricky one, but I will explain in the video on Monday. Let me know if you have questions.
Super useful content! Thanks for publishing!
Vladyslav Opuhliy thanks for watching!
Hi Max Pronko I downloaded the magento2-custom-attribute-master archive and i installed it in my magento project version 2.1.7 does not work don't save the new data on front end only on the backend... please helpme
Hi Max, I followed your way to add a text attribute and a select attribute with options.
The text attribute works perfectly, however select attribute is not been saved in database. From admin, in customer -> addresses form I am able to see the field with the available options, but on save the selected value disappears. I have also found that text attribute value has been stored in customer_address_entity_varchar table, but i can not find any relevant record for the select attribute. I have used the bellow lines in order to create the select attribute
$this->eavSetup->addAttribute(
AddressMetadataInterface::ENTITY_TYPE_ADDRESS,
self::PRC_TYPE_ATTRIBUTE_CODE,
[
'type' => 'int',
'label' => 'Pricing Type',
'input' => 'select',
'forms' => array('customer_account_edit','customer_account_create','adminhtml_customer','checkout_register'),
'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
'required' => false,
'visible' => 1,
'user_defined' => false,
'position' => 110,
'option' => array('values' => array('Apodiksi', 'Timologio'))
]
);
Can you please help me with this? Thank you in advance
Hi Sandy. Thank you for the question. This is the biggest question so far I've received in the TH-cam comments section. Will you write me an email with full setup class so I can debug on my environment? Email: blog@maxpronko.com
Hi sandy, did you manage to solve the problem?
Great. THANKS A LOT