Add code

Wednesday 6 January 2016

Change all short_description field as empty for product in magento

Go to
Admin > catalog > products
select all products
select action as update attributes
you have to check short description checkbox with empty text there.
save.

Please select short description as not required attribute.
re-index and clear cache after remove.

How to enable template path hints in magento admin panel? (Without Extension)

1. Admin > System > Configuration
2. Switch your "Current Configuration Scope" to your store (’Main Website’ on a stock build)
3. Click on the Developer Tab (bottom left) and find the Debug area
4. Template Path Hints: Yes (also might want to add Block Names to hints)

How to Remove Add to Compare link in magento product view page?

Edit your theme's "templae/catalog/product/view/addto.phtml" file. Find and Comment the below lines.


<?php
    $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
?>
<?php if($_compareUrl) : ?>
    <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
<?php endif; ?>

How to remove the Estimate Shipping and Tax box in Magento My cart page?

Solution 1:

Edit your theme's "/layout/checkout.xml" file. Find and Comment the below lines.

<block as="shipping" name="checkout.cart.shipping" template="checkout/cart/shipping.phtml" type="checkout/cart_shipping"></block>


Solution 2:

Add new "local.xml" file under your theme's layout folder.

<layout>
   <default>
      <remove name="checkout.cart.shipping"></remove>
   </default>
</layout>

Here, You no need to search for any template or layout file. This code will do the trick. After making changes dont forget to refresh the cache. That's it. You are done.

How to remove the Discount Code / Coupon Code box in Magento My cart page?

Solution 1:
Edit your theme's "/layout/checkout.xml" file. Find and Comment the below lines.

<block as="coupon" name="checkout.cart.coupon" template="checkout/cart/coupon.phtml" type="checkout/cart_coupon"></block>


Solution 2:
Add new local.xml file under your theme's layout folder.


<layout>
   <default>
      <remove name="checkout.cart.coupon"></remove>
   </default>
</layout>



Here, You no need to search for any template or layout file. This code will do the trick. After making changes dont forget to refresh the cache. That's it. You are done.



Tips to use home page url, custom page url and pass query string in Magento CMS Page

{{store url=""}} -> Used to get Store's home page URL.
Resulting in a URL like "http://yourstore.com/"

{{store url="contacts"}} -> Used to get contact us page URL.
Resulting in a URL like "http://yourstore.com/contacts/"

If you want to show custom URL Use direct_url
{{store direct_url="category/subcategory.html"}} -> Used to get custom URL.
Resulting in a URL like "http://yourstore.com/category/subcategory.html"

If you want to pass parameters in query string use _query
{{store direct_url="category/subcategory.html" _query="a=param_a&b=param_b"}} -> Used to Pass query string
Resulting in a URL like "http://yourstore.com/category/subcategory.html?a=param_a&b=param_b"

{{skin url='images/homepageimage.jpg'}} -> Used to get image url

How to remove validation on zip code in magento checkout page?

Log in to your Magento admin panel then go to System -> Configuration->General. From the Country option tab you can see there is an option "Postal code is optional for the following countries" Select the country which you want to Optional/Not validate. then click on save config to save your settings.


zip code validation image

Magento Tutorial How to install a Magento Theme

To know the briefly explanation with visuals and pictures please go to this url.

https://www.youtube.com/watch?v=f3vDmslmITY

I hope it will help you.

Tuesday 5 January 2016

Custom Options Set Price to "0" in Magento 1.7 – The Fix

I’m working on a side project with Magento… There is a bug in 1.7 where when you use custom options, and your theme doesn’t include it’s own options.phtml file, the price will set to $0 (zero) when a user selects the price.

A bunch of forum posts have people talking about the problem. Basically it’s a silly bug in the javascript in options.phtml.

Basically, if your theme doesn’t have that options file in it’s theme directory, then magento looks like it defaults to the base‘s folder and includes the “default” options.phtml.
Here is the fix. I hope Magento includes it in the next Magento release!

Line 123 of options.phtml in
app/design/frontend/base/default/template/catalog/product/view/
Right now is
price += parseFloat(config[optionId][element.getValue()]);

Should be

price += parseFloat(config[optionId][element.getValue()].price);

Basically the code was trying to convert a javascript Object to a float. Making the price 0.

Magento Search Within Current Top Level Category

 For this purpose please follow this url.

http://edmondscommerce.github.io/magento/magento-search-within-current-top-level-category.html

Hope this will help to you.

Magento website loading speed is very slow

1.Combine JS and CSS files

(i) Magento admin -> System Configuration -> Developer -> 
Under “Javascript Settings”, 
change “Merge Javascript Files” to YES.
(ii)Magento admin -> System Configuration -> Developer -> 
Under “CSS Settings”,
Change “Merge CSS Files” to YES

Note: after made this change, sometimes it show effect on entire website. In this case, please revert back the settings to "No"
2. Use Magento’s Compilation feature. It’s reported to give you a 25%-50% performance boost: System > Config. > Tools > Compilation.
Note: after made this change, sometimes it show effect on entire website. In this case, follow this url

http://tejabhagavan.blogspot.in/2016/01/when-i-enabling-compilation-in-magento.html

3.Enable flat catalog :

Go to System > Configuration > Catalog >Frontend,
 change Use Flat Catalog Category to YES. If desired, under Frontend, change Use Flat Catalog Product to YES. Clear the cache.
4. Enabled magento caching
5. MySQL Query caching
6. Enable Gzip Compression
7. Disable any unused modules
8. Disable the Magento log
9. Optimise your images

There was no 404 CMS page configured or found

To create a 404 page Create a CMS Page with Correct 'Store View'.


Then go to System=>Config=>General=>Web
in Default pages Tab > CMS No Route Page select the recently created 404 Page and save

Add caption

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: ...