Categories
CMS Magento Mastering Development

Visual editor for custom order attribute

It’s possible to add a visual input on user infos form, is it possible to do this to my orders ? I already add the column in filters and I did this to add the field : $salesSetup->addAttribute(Order::ENTITY, ‘order_custom_attr’, [ ‘type’ => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, ‘length’=> 255, ‘visible’ => false, ‘nullable’ => true, ]);

Categories
CMS Magento Mastering Development

Database schema realted change reverted

I have one of my Magento 2 projects running with version 2.3.3. There are so many simple products for one single configurable product sue to which the SKU length issue occurred. TO solve I have taken all possible steps 1) Override file : Magento\Catalog\Model\Product\Attribute\Backend\Sku and change const SKU_MAX_LENGTH = 255; Check below code for this […]

Categories
CMS Magento Mastering Development

Customer custom value not saving to customer_enitity table

I have created new column in customer_entity table class UpgradeData implements UpgradeDataInterface{ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { if (version_compare($context->getVersion(),’1.0.6′<0)){ $customerName = $setup->getTable(‘customer_entity’); if ($setup->getConnection()->isTableExists($customerName) == true) { $connection = $setup->getConnection(); $connection->addColumn( $customerName, ‘family_name’, [ ‘type’ => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, ‘length’ => 100, ‘nullable’ => true, ‘comment’ => ‘Family Name’ ] ); } } } and […]

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’, […]