Add code

Friday 19 February 2016

How to move magento search bar from header to sidebar?

Edit "app/design/frontend/<your theme>/<your theme>/layout/catalogsearch.xml"

Fine the line:


<reference name="header">
    <block as="topSearch" name="top.search" template="catalogsearch/form.mini.phtml" type="core/template">
</block>
</reference>

Replace the reference name to left or right.

<reference name="left or right(your wish)">
    <block as="topSearch" name="top.search" template="catalogsearch/form.mini.phtml" type="core/template">
</block>
</reference>

Maximum execution time of 30 seconds exceeded

To fix it, open your php.ini and replace the value for 'max_execution_time' and 'max_input_time' as per below.


max_execution_time = 3600
max_input_time = 3600

How to show only first name in magento welcome message?

Comment the welcome message code in "template/page/html/header.phtml" and Use the below code to show first name only.



$customer = Mage::getSingleton('customer/session')->getCustomer()->getData();
if(Mage::getSingleton('customer/session')->isLoggedIn()){
   echo $this->__('Welcome, %s!', $customer['firstname']);
}else{
   echo $this->__('Welcome Guest');
}

How do I change SHOP BY text in left sidebar Magento?

Are you trying to replace the "SHOP BY" text? And failed to replace the text? Don't worry, that is not actually a text. That is Image.

Solution 1: You will need to replace the image under

"skin/frontend/default/default/images/bkg_block-layered-title.gif";


Solution 2: Locate a file

"app/design/frontend/default/YOURTHEME/template/catalog/layer/view.phtml" Change the class name "block-title" to something else.

Wednesday 10 February 2016

How to remove my account,my wishlist in magento account link on home page?

To remove My Account link :

Open the file /app/design/frontend/package/theme/layout/customer.xml and comment these lines
 
<!--<action method="addLink" translate="label title" module="customer">
<label>My Account</label>
<url helper="customer/getAccountUrl"/>
<title>My Account</title><prepare/><urlParams/>
<position>10</position>
</action>-->

To Remove Wishlist link :

Open the file /app/design/frontend/package/theme/layout/wishlist.xml and comment these lines.
<!--<reference name="top.links">
    <block type="wishlist/links" name="wishlist_link"/>
    <action method="addLinkBlock">
<blockName>wishlist_link</blockName>
</action>
</reference>--> 

To Remove My Cart link :

Open the file /app/design/frontend/package/theme/layout/checkout.xml and comment these lines
<!-- <action method="addCartLink"></action> -->

To Remove Checkout link :

Open same file, /app/design/frontend/package/theme/layout/checkout.xml and comment the lines
<!-- <action method="addCheckoutLink"></action>-->

Thursday 4 February 2016

How to remove the index.php in magento?

To remove index.php from URLs follow the below steps :
  1. Log-in Magento Admin.
  2. Go to System -> Configuration -> Web.
  3. From Search Engine Optimisation tab Use Web Server Rewrites select YES.
  4. Make sure your Secure and Unsecure base urls should end with “/”.
  5. And in System -> Configuration -> Web -> Secure -> Use secure URLs in the frontend, select YES.  
  6. now edit your .htaccess ( will be in magento root folder ) and pate the below code and save:   

1<IfModule mod_rewrite.c>
2RewriteEngine On
3RewriteBase /
4RewriteRule ^index\.php$ - [L]
5RewriteCond %{REQUEST_FILENAME} !-f
6RewriteCond %{REQUEST_FILENAME} !-d
7RewriteRule . /index.php [L]
8</IfModule>


now your index.php issue will be solved.
** if that still does not work, then make sure you have mod_rewrite enabled / installed on your server.

Monday 1 February 2016

New order email confirmation not being sent

Avoid cron:

 Transactional emails will be sent instantly.


goto following path: 

//app/code/core/Mage/Sales/Model/Order.php Line#1356,1450 
  //$mailer->setQueue($emailQueue)->send(); Change To 

          $mailer->send();

app/design/frontend/base/default/template/checkout/success.phtml
 //add following line Top success page for sending mail direct
 // Start Send Email Here......
$order = Mage::getModel('sales/order');
$incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); 
$order->loadByIncrementId($incrementId);

    try{ $order->sendNewOrderEmail();} 
    catch (Exception $ex) { echo "Email Not Sent..."; }
    $customer = Mage::getSingleton('customer/session')->getCustomer();
    $email = $customer->getEmail();//End Email Sending



Magento : 404 error is showing admin page

Hello, Sometimes we may get the error on admin page once done with the Magento installation. In that scenario, we have to do the following: ...