This is my Product attribute <?php namespace VendorModuleSetupPatchData; use MagentoCatalogModelProduct; use MagentoEavModelEntityAttributeScopedAttributeInterface; use MagentoEavSetupEavSetup; use MagentoEavSetupEavSetupFactory; use MagentoFrameworkSetupInstallDataInterface; use MagentoFrameworkSetupModuleContextInterface; use MagentoFrameworkSetupModuleDataSetupInterface; use MagentoFrameworkSetupPatchDataPatchInterface; class CustomAttribute implements DataPatchInterface { /** * ModuleDataSetupInterface * * @var ModuleDataSetupInterface */ private ModuleDataSetupInterface $moduleDataSetup; /** * EavSetupFactory * * @var EavSetupFactory */ private EavSetupFactory […]
Magento
I have prepared an admin form containing a file upload field. This form is configured in an .xml form file. <field name="files" formElement="fileUploader" sortOrder="40"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="dataType" xsi:type="string">string</item> <item name="label" xsi:type="string" translate="true">Files</item> <item name="notice" xsi:type="string">Maximum file size: 50MB. Allowed file types: PDF.</item> <item name="formElement" xsi:type="string">fileUploader</item> […]
After install Live search in cloud magento its giving below errors. Cannot instantiate interface MagentoServicesIdModelServicesConfigInterface#0 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create() #1 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): MagentoFrameworkObjectManagerObjectManager->get() #2 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
I have a couple custom modules, one for adding eav attributes to customers, and I had a module that filtered those customers based on the attribute values, which ‘was’ working. When I say “filter” I mean the same type of conditions block as is used in cart price rules. Another […]
Recently I’ve been facing issues with reindex process, some indexes are shown with status Reindex Required and even if I achieve to reindex them they continue with the same status. After some days indexes got stuck and reindex never ends. So I decided to take a backup from my production […]
Is there a way to disable page builder for product description field? I know there are articles how to remove from category description, but I didn’t find for the product description, I tried to do it myself (result below) but it doesn’t work. Any ideas? <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" […]
This a Category.php in UiComponentListingColumn in a child module public function prepareDataSource(array $dataSource) { $fieldName = $this->getData('name'); if (isset($dataSource['data']['items'])) { foreach ($dataSource['data']['items'] as & $item) { //print_r($item);die; if (isset($item['product_id'])) { $product = $this->_productloader->create()->load($item['product_id']); $cats = $product->getCategoryIds(); $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $categories = []; if(count($cats) ){ foreach($cats as $cat){ $category = $objectManager->create('MagentoCatalogModelCategory')->load($cat); […]
we were just given a new UI for our website and we need to make some radical changes to our theme; one of them being changing the header’s container from one colum-horizontal to 3 columns-vertical. We basically need to divide the header container in 3 columns in which the first […]
This is my PLugin : <?php namespace VendorModulePlugin; use MagentoSalesApiDataOrderItemExtensionFactory; use MagentoSalesApiDataOrderItemInterface; use MagentoSalesApiDataOrderItemSearchResultInterface; use MagentoSalesApiOrderItemRepositoryInterface; use MagentoCatalogModelProductFactory; /** * Class OrderItemRepositoryPlugin */ class OrderItemRepositoryPlugin { protected $orderItemExtensionFactory; protected $productFactory; /** * OrderItemRepositoryPlugin constructor * * @param OrderItemExtensionFactory $orderItemExtensionFactory * @param ProductFactory $productFactory */ public function __construct( OrderItemExtensionFactory $orderItemExtensionFactory, ProductFactory […]