Skip to content

magento2.4

Auto Added by WPeMatico

magento 2 : is it impact on isting page performance for $_product->getResource()->getAttribute(‘custom_attribute_code’)?

I have a custom attribute which has 15 text values. I am using $_product->getResource()->getAttribute($attributecode)->getFrontend()->getValue($_product); . In catalog page I have used above code get the text value of attribute for every product in for loop, is it impacted on performance… Read More »magento 2 : is it impact on isting page performance for $_product->getResource()->getAttribute(‘custom_attribute_code’)?

Deprecated Functionality: explode(): Passing null to parameter #2 ($string)

I have an issue ; Deprecated Functionality: explode(): Passing null to parameter #2 ($string). Can you please help? public function getEnabled() { return $this->_dataHelper->getEnabled(); } public function getRenderableAttributes() { if (!$this->getEnabled()) { return []; } $attributeCode = $this->_dataHelper->getAttributeCode(); $product =… Read More »Deprecated Functionality: explode(): Passing null to parameter #2 ($string)

Use Custom Module collection in other custom Module magento 2

I want collection of one module in other module. I am doing it like use TestCompanyAddressesModelCompanyAddressFactory; class ReformatTelephoneField implements DataPatchInterface { protected $companyAddressFactory; /** * @param CompanyAddressFactory $companyAddressFactory */ public function __construct( CompanyAddressFactory $companyAddressFactory ) { $this->companyAddressFactory = $companyAddressFactory; }… Read More »Use Custom Module collection in other custom Module magento 2