If the category page of your Magento store is loading really slow, the configurable swatches might be the problem. Override /app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php and move // normalize to all lower case before we start using them $optionLabels = array_map(function ($value) { return…
Category page loads extremely slowly (Magento 1)
If your Magento category pages are extremely slow, Magento swatches may be the culprit. Override /app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php and remove
|
1 2 3 4 |
// normalize to all lower case before we start using them $optionLabels = array_map(function ($value) { return array_map('Mage_ConfigurableSwatches_Helper_Data::normalizeKey', $value); }, $optionLabels); |
from its original location, then insert that code immediately above the surrounding foreach loop. This can substantially improve category page load…
Magento 2 Expert
If you are having trouble with your Magento 2 store or would like advice and development support for an upcoming Magento 2 project, simply get in touch. I will be happy to help. I look forward to hearing from you.
Sort order items by SKU (Magento 1)
If you want to change the default sorting of the ordered items on the order detail page, go ahead and override app/design/adminhtml/default/default/template/sales/order/view/items.phtml in your theme and replace
Sorting order items by SKU (Magento 1)
To display ordered products sorted by SKU in the order view, override the app/design/adminhtml/default/default/template/sales/order/view/items.phtml in your theme and replace
|
1 2 3 4 5 6 7 8 |
<?php $_items = $this->getItemsCollection() ?> <?php $i=0;foreach ($_items as $_item):?> <?php if ($_item->getParentItem()) continue; else $i++;?> <tbody class="<?php echo $i%2?'even':'odd' ?>"> <?php echo $this->getItemHtml($_item) ?> <?php echo $this->getItemExtraInfoHtml($_item) ?> </tbody> <?php endforeach; ?> |
with
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?php $_items = $this->getItemsCollection() ?> <?php $_sortedItems = array(); ?> <?php foreach ($_items as $_item) : ?> <?php $_sortedItems[$_item->getSku()] = $_item;?> <?php endforeach;?> <?php ksort($_sortedItems); // Sort by array keys ?> <?php $i=0;foreach ($_sortedItems as $_item):?> <?php if ($_item->getParentItem()) continue; else $i++;?> <tbody class="<?php echo $i%2?'even':'odd' ?>"> <?php echo $this->getItemHtml($_item) ?> <?php echo $this->getItemExtraInfoHtml($_item) ?> </tbody> <?php endforeach; ?> |
That’s it. When you open an order containing two or more products, they will now be displayed in…
“Reset password” page empty after installing SUPEE-6788 (Magento 1)
If the password reset page is emtpy after you installed the Magento security patch SUPEE-6788, the problem is most likely to be found in the customer.xml file. Open the customer.xml file of your theme and replace customer_account_resetpassword with customer_account_changeforgotten. The…
Deleting all products using SQL (Magento 1)
To delete all product related data, use the following query: DELETE FROM catalog_product_entity; Due to the constraints it will delete all related data from other tables as well.
Solving “Invalid login credentials” Magento Connect Manager error
If you get the Invalid login credentials error when using the Magento Connect Manager, you most likely changed your FTP credentials some time ago and the Connect Manager still uses the old credentials. To get rid of this error, simply…
Fixing Invalid login credentials in Magento Connect Manager
If the Magento Connect Manager displays the error Invalid login credentials , your FTP credentials may have changed while the Connect Manager still has the old ones stored. The simplest workaround is to delete or rename the file connect.cfg im…