Skip to content

custom-attributes

Auto Added by WPeMatico

How to create custom Text Swatch product attribute using Data Patch in Magento 2

This code only saves the value (description). But I want to save values in ADMIN and DESCRIPTION both, can anyone help me here: private function addVisualSwatchAttribute() { /** @var EavSetup $eavSetup */ $eavSetup = $this->eavSetupFactory->create(); $eavSetup->addAttribute( Product::ENTITY, ‘custom_visual_swatch’, [ ‘type’… Read More »How to create custom Text Swatch product attribute using Data Patch in Magento 2

There are no payment methods

I have overwritten the checkout_index_index.xml to add a custom input but when I go to step 2 the payment methods are not displayed. I leave the checkout_index_index.xml. <page xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” layout=”checkout” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <body> <referenceContainer name=”content”> <block class=”MagentoCheckoutBlockOnepage” name=”checkout.root” template=”Magento_Checkout::onepage.phtml” cacheable=”false”> <arguments>… Read More »There are no payment methods

Custom Category Attribute value Not Saving? In Adminpanel

Is this my Installdata.php file <?php namespace AutosmartCategoryAttributesSetup; use MagentoCatalogModelCategory; use MagentoCatalogModelCategoryAttributeBackendImage; use MagentoCatalogModelCategoryAttributeSourceMode; use MagentoCatalogModelResourceModelEavAttribute; use MagentoEavModelEntityAttributeScopedAttributeInterface; use MagentoEavSetupEavSetup; use MagentoEavSetupEavSetupFactory; use MagentoFrameworkSetupInstallDataInterface; use MagentoFrameworkSetupModuleContextInterface; use MagentoFrameworkSetupModuleDataSetupInterface; class InstallData implements InstallDataInterface { private $eavSetupFactory; public function __construct(EavSetupFactory $eavSetupFactory) {… Read More »Custom Category Attribute value Not Saving? In Adminpanel

custom attribute value not save in the Database

<?php declare(strict_types=1); namespace VendorModuleSetupPatchData; use MagentoEavModelConfig; use MagentoEavModelEntityAttributeSetFactory as AttributeSetFactory; use MagentoEavModelEntityAttributeSourceBoolean; use MagentoEavSetupEavSetupFactory; use MagentoFrameworkExceptionLocalizedException; use MagentoFrameworkSetupPatchDataPatchInterface; use Zend_Validate_Exception; /** * @class CustomerSync */ class CustomerSync implements DataPatchInterface { /** * @var Config */ private Config $eavConfig; /** *… Read More »custom attribute value not save in the Database