fatal error: Call to a member function getSource() on boolean in C:\xampp\htdocs\my_store\app\code\core\Mage\Catalog\Model\Product.php on line 1390 Fatal error: Call to a member function getSource () on non-object products In Line 1390 file product.php To fix this error open the file: Code: /home/public_html/app/code/core/Mage/Catalog/Model/Product.php Find the lines: Code: public function getAttributeText($attributeCode) { return $this->getResource() ->getAttribute($attributeCode) ->getSource() ->getOptionText($this->getData($attributeCode)); }… Continue reading Fatal error: Call to a member function getSource() on boolean
Author: Jerin devassy
How to set the category layout for a product in Magento using the backend?
Log in to your Magento admin panel. Navigate to the “Catalog” menu and select “Categories” from the dropdown. Find and select the category for which you want to set the layout. In the “General Information” tab, scroll down to the “Custom Design” section. Expand the “Page Layout” dropdown and choose the desired layout option for… Continue reading How to set the category layout for a product in Magento using the backend?
intval() function .
The intval() function is used to convert a value to an integer. By using intval(), any decimal or fractional part of the quantity value will be truncated, and only the integer part will be displayed. This can be useful if you want to ensure that the quantity is displayed as a whole number without any… Continue reading intval() function .
Uses of checkout_before event in Magento
The “checkout_before” event is triggered just before the checkout process starts in Magento. It allows you to perform custom actions or modifications before the customer proceeds to the checkout. Some common use cases for the “checkout_before” event include: Validating or modifying cart items based on specific conditions or requirements. Applying custom pricing rules or discounts… Continue reading Uses of checkout_before event in Magento
How to revert a commit pull request in Git
To revert a specific commit using Git commands in the comments section, you can follow these steps: Open your Git client or terminal: You can use the command prompt, Git Bash, or any other terminal emulator that allows you to run Git commands. Navigate to your project directory: Use the cd command to navigate to… Continue reading How to revert a commit pull request in Git
How to connect a css to an xml in magento
The reason why <css src=”css/list.css” rel=”stylesheet” type=”text/css” /> did not work is that it is not a valid syntax in Magento 2 XML layout files. In Magento 2, the <css> tag is a custom XML tag specifically designed to include CSS files within the context of the Magento framework. It handles various functionalities, such as… Continue reading How to connect a css to an xml in magento
Magento default pop-up
<div id=”add-to-cart-popup” style=”display: none;”> <div class=”add-to-cart arrow-up”></div> <div class=”content”>Item added to cart</div> </div> <script> require([‘jquery’], function($) { $(document).on(‘ajax:addToCart’, function(event, eventData) { $(‘#add-to-cart-popup’).fadeIn(); setTimeout(function() { $(‘#add-to-cart-popup’).fadeOut(); }, 1400); }); }); </script> The script code uses jQuery to listen for the “ajax:addToCart” event, which is triggered when an item is successfully added to the cart using AJAX.… Continue reading Magento default pop-up
How to make a sticky header in Magento.?
CSS code snippet for creating a fixed header that remains in the same position at the top of the page as the user scrolls down .page-header { position: fixed; top: 0; width: 100%; z-index: 10;}
How to enable the extension in Magento2
Verify the extension To verify that the extension is installed properly, run the following command: By default, the extension is probably disabled: The extension name is in the format <VendorName>_<ComponentName>; this is a different format from the Composer name. Use this format to enable the extension. If you are unsure of the extension name, run: And… Continue reading How to enable the extension in Magento2
The difference between Cybersource Payment Management Platform and CyberSource Payment by Webkul Software Private Limited
The Cybersource Payment Management Platform and CyberSource Payment by Webkul Software Private Limited are two different products that provide payment processing services for online businesses. The Cybersource Payment Management Platform is a comprehensive payment management platform that provides merchants with a wide range of payment processing services, including fraud management, payment security, and payment gateway… Continue reading The difference between Cybersource Payment Management Platform and CyberSource Payment by Webkul Software Private Limited