Home > News, Tutorials > Top Ten Problems Every Magento Store Will Inevitably Face. Part 1

Top Ten Problems Every Magento Store Will Inevitably Face. Part 1

To developers, savvy merchants and support teams…

Magento stores require tons of efforts to run them smoothly and easily. Merchants install extensions that may get in conflict, upgrade Magento to a new version and encounter compatibility issues or just open a website one morning and see that it is down for no clear reason.

Well, it may feel quite embarrassing, but let’s face the truth – none of us is immune to website crashes and “404 Not Found” cases, regardless of whether you are a reputable eCommerce development company or a newbie in online trading. Basically, there are some typical issues that inevitably arise in every Magento webstore.

Below we review 10 typical Magento store problems and 10 most handy and practical ways to solve them (with code provided).


Q1: Code is working weird, but there are no third-party extensions on the store.
A1: Check Magento system modifications (if core file code is changed). We recommend to use a standard Unix diff command to compare all current Magento files with corresponding files of default Magento. If you find a difference – you partially solve the problem.

Q2: Imagine, there is the extension that refreshes a cart via Ajax while adding a product from a category. When the “add to cart” button is clicked, the Ajax request displays the “unknown function showName” error:

header.phtml:

  <? /**
  * @var Mage_Page_Block_Html_Header $this
  */ ?>
  <?php
   function showName($name)
   {
     echo '<strong><span>'.$name.'</span></strong>';
   }
  ?>
 <div class="header-container">
   <div class="header">
    ...

sidebar.phtml:

  <?php /**
  * Shoping cart sidebar
  * @see Mage_Checkout_Block_Cart_Sidebar
  */ ?>

  <?php if ($this->getIsNeedToDisplaySideBar()):?>
 <div class="block block-cart">
    <?php $_cartQty = $this->getSummaryCount() ?>
    <div class="block-title">
       <?php showName($this->__('My Cart')); ?>
   </div>
   ...

fixed sidebar.phtml:

  <?php /**
  * Shoping cart sidebar
  * @see Mage_Checkout_Block_Cart_Sidebar
  */ ?>
  <?php
       if (!function_exists('showName')) {
            function showName($name) {
                  echo '<strong><span>'.$name.'</span></strong>';
            }
      }
 ?>
 <?php if ($this->getIsNeedToDisplaySideBar()):?>
 <div class="block block-cart">
    <?php $_cartQty = $this->getSummaryCount() ?>
    <div class="block-title">
        <?php showName($this->__('My Cart')); ?>
    </div>
   ...

A2: Code examples show where the root of evil is located. Header contains a global function which is used in a sidebar. When the sidebar is updated via Ajax, a header is not loaded (as well as a function value). However, the sidebar tries to call it and, therefore, shows an error. Check if function is defined. If not, define it.

Q3: You get this error:

ERR (3): Warning: include(): Failed opening ‘/home/vhosts/Magento/app/design/frontend/

default/default/template/ajaxcartpro/init.phtml’ for inclusion (include_path= ‘/home/vhosts/Magento/app/code/local:

/home/vhosts/Magento/app/code/community:

/home/vhosts/Magento/app/code/core:

/home/vhosts/Magento/lib:

/usr/share/php: /usr/share/pear’)

in /home/vhosts/Magento/app/code/core/Mage/Core/Block/Template.php on line 241

A3: Apache has no permission to open files. Image below shows a standard Unix chmod command which sets the required file accesses.

Q4: The extension is installed and configured, but not displayed on the frontend.

A4: During installation process, templates and skins were copied only into default folders. Take a look at the picture: default folders are above, folders to copy files into are below.

Q5: You get this error:

public function __construct()
{
  ini_set('memory_limit', '1024M');
  ...
}

A5: The table shows a fatal error. It means there is not enough memory to perform the requested operation. Code above indicates location where resource-intensive operation starts. Try to increase the memory limit for Magento. If that works, fix php.ini and raise the memory limit to the required extent. If that didn’t help and error occurs again, server lacks of RAM (random access memory).

Continue reading our posts and learn about other 5 typical Magento store problems the next week.

This post is also available in: French, Spanish

Categories: News, Tutorials Tags: , ,
  1. Internetbureau
    December 11th, 2012 at 10:27 | #1

    Good explain this blog

*

More in News, Tutorials
Dealing with the new, resource-intensive platform
Close