Categories
CMS Magento Mastering Development

Checkout custom shipping address field – set as required

I have created a custom module that adds a text field in shipping address. It’s workin ok but I’d like to make it required. How can I do that? I tried adding ‘required-entry’ => true at validation parameter, in file Plugin/Checkout/LayoutProcessor.php but it didn’t work. Here are the module files: Mymodules/FieldCheckout/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, ‘Mymodules_FieldCheckout’, […]

Categories
CMS Development Magento

Magento 2 custom form in shipping address before-form not validating for registered customers

I have added a custom form in the shipping address before-form handle. This form is validating for a guest checkout process but not working for logged in customers who have already added address information. Below is my Layoutprocessor file where am injecting the custom field to shipping step before-form handle. $customAttributeCode = ‘experience_survey_option’; $customField = […]

Categories
CMS Development Magento

Magento 2 custom form in shipping address before-form not validating for registered customers

I have added a custom form in the shipping address before-form handle. This form is validating for a guest checkout process but not working for logged in customers who have already added address information. Below is my Layoutprocessor file where am injecting the custom field to shipping step before-form handle. $customAttributeCode = ‘experience_survey_option’; $customField = […]

Categories
CMS Development Magento

Magento 2 custom form in shipping address before-form not validating for registered customers

I have added a custom form in the shipping address before-form handle. This form is validating for a guest checkout process but not working for logged in customers who have already added address information. Below is my Layoutprocessor file where am injecting the custom field to shipping step before-form handle. $customAttributeCode = ‘experience_survey_option’; $customField = […]

Categories
CMS Development Magento

input element not getting disabled when I change it’s property “disabled”

I have created a custom module to add some fields to the order checkout however I have some troubles enabling them conditionally. I have a radio button and 4 elements When the radio is clicked, depending on the value, I change the 4 fields to disabled=false or disabled=true and I would like the input fields […]

Categories
CMS Development Magento

Magento 2 customer custom attributes such as VAT

I am tring to add a customer custom attributes such as VAT. So I will not use the address structure but account structure. And i want to display the field during the payment and not during the first step (shipping info). But the result is This is the code \Setup\InstallData.php namespace Vendor\ItalianFiscalAttributes\Setup; use Magento\Framework\Setup\InstallDataInterface; use […]

Categories
CMS Development Magento

Magento 2 customer custom attributes such as VAT

I am tring to add a customer custom attributes such as VAT. So I will not use the address structure but account structure. And i want to display the field during the payment and not during the first step (shipping info). But the result is This is the code \Setup\InstallData.php namespace Vendor\ItalianFiscalAttributes\Setup; use Magento\Framework\Setup\InstallDataInterface; use […]

Categories
CMS Development Magento

Magento 2 customer custom attributes such as VAT

I am tring to add a customer custom attributes such as VAT. So I will not use the address structure but account structure. And i want to display the field during the payment and not during the first step (shipping info). But the result is This is the code \Setup\InstallData.php namespace Vendor\ItalianFiscalAttributes\Setup; use Magento\Framework\Setup\InstallDataInterface; use […]