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 = $this->getProduct(); $selectedFeaturesRaw = $product->getData($attributeCode); $selectedFeaturesSplit = explode(',', $selectedFeaturesRaw); $attr = […]
Magento
How can a developer prioritize a plugin’s execution, if possible? A. The developer can use sortOrder property by specifying a higher value than the target plugin. B. This cannot be achieved as the plugins are always executed by their module’s load order in app/etc/config.php file C. The developer can use […]
‘system’ attribute property tells if attribute is system defined or not. ‘user_defined’ attribute property tells if attribute is custom (define by developer) or not. It means, if ‘system’=0, the attribute is ‘user_defined’ and vice versa. So why Magento 2 uses two property (system, user_defined) for the same reason ? If […]
I’ve to show the product thumbnail image in Admin order overview page in Magento 2.3.2P2 I am looking to customize default.phtml file of vendor module. /vendor/magento/module-sales/view/adminhtml/templates/order/view/items/renderer/default.phptml my required code is as below – <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ […]
I’m trying to export all products in my catalog on Magento and I have over 1k products in the catalog. On the export section with 0 filters applied it only shows 77 records. Running Magento ver 2.2.6 Export Screen: Entity Type: Products Export File Format: CSV Fields Enclosure: Unchecked Entity […]
As the title suggests, I’d like to call my collection, store it into different variables, then manipulate the variables but leaving the original collection intact. The code should be something like this: $collection = $this->collection->create()->addFieldToFilter('attribute', 'value'); $originalCollection = $collection; $columnValues = $collection->joinLeft($table, $on, $columns)->reset(Zend_Db_Select::COLUMNS)->columns(['fieldname1']); $firstItem = $originalCollection->getFirstItem()->getData(); $this->logger->log($columnValues[0]); $this->logger->log($firstItem); In […]
I wrote a function that outputs the current category and its children in a certain order, like so: function Orderlist($param2) { $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $category = $objectManager->get('MagentoFrameworkRegistry')->registry('current_category');//get current category $catId =$category->getId(); $subcategory = $objectManager->create('MagentoCatalogModelCategory')->load($catId); $subcats = $subcategory->getChildrenCategories(); foreach ($subcats as $subcat) { if ($subcat->getIsActive() and str_starts_with($subcat->getName(), $param2)) { $subcat_url = […]
I have an issue with a Magento shop after upgrading from 2.4.0 to 2.4.5-p1, when I open the product list on any of the categories it won’t show more than 10 items. The pagination at the bottom seems to reflect the correct amount of items (ie. when there are 36 […]
I have added a new column in quote_item table and want to add this field as a parameter in cart API payload but I don’t how this will happen. This is what I get when i try to hit add to cart api. Please let me know. I am new […]