Shop By Category in Magento HomePage

Shop By Category in Magento HomePage : or Layered navigation in CMS page or front page . This is Very common problem  with every magento developers . After Banging my head here i am writing a simple back for this . This will display the output like this on homepage of magento Shop By Category

So here is complete solution . First of all go to CMS page of your homepage and add this refrence code in your design Layout Update XML tab

<reference name="left">
<block type="catalog/layer_view" before="-" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>

This will show the above picture result but when you’ll mouse over on it it will show the link like this

example.com/?cat=13 or similar like that but when you’ll click on it  , it will not work . so here is the million dollar hack for it

go to  app/code/core/Mage/Catalog/Model/Layer/Filter and open item.php

and replace your getUrl() function to the following one

public function getUrl()
    {
        if ($this->getFilter() instanceof Mage_Catalog_Model_Layer_Filter_Category) {
            $category = Mage::getModel('catalog/category')->load($this->getValue());
            return $category->getUrl();
        } else {
            $query = array(
                $this->getFilter()->getRequestVar()=>$this->getValue(),
                Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
            );
            return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
        }
    }

enjoy the Magento Coding

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 22 February '12 by , under Magento. No Comments.

Joomla Facebook NewsFeeds Documentation

Joomla Facebook NewsFeeds Documentation :

If you are running your online business or site and you dont have a facebook newsfeed , this means you are backward or you dont know the importance of social world . Thats why webkul  created an awesome module for fetching your profile newsfeeds in to joomla site automatically . Please have a look at the module admin

facebook News feeds

So just put the access token and thats it , it is so simple to use .

How to Get Access Token : 

This is the tricky but simple part , just follow the simple steps as below

Step 1: Go to this link and click on – http://www.webkul.com/access-token
Alternate Access token generation link : http://www.linkdoo.com/access-token   or    http://linkdoo.com/beta/access-token/

access token

Frequently Asked Questions (FAQ’s)

1-  (#4) Application request limit reached :  If you are getting this warning , then  use alternate access token genration link as given below

http://www.webkul.com/access-token

http://www.linkdoo.com/access-token

http://linkdoo.com/beta/access-token/

 

Where is my Joomla 1.7 Facebook wall feeds ? – Joomla 1.6 facebook wall feeds will work perfectly in joomla 1.7 as well .

 

Thats it :) Enjoy the awesome module in your web site .

For any query or doubt feel free to contact us :

Email : [email protected]

Skype : li_vipin.sahu

Gtalk : sahu.vipin

MSN : vipinsahu

 

 

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 13 February '12 by , under facebook, Joomla. No Comments.

Magento Current Category Name and URL

Magento Current Category Name and Link : Magento API is really wonderful . Current category is really important in product page  and it is useful from A/B testing point of view . So if you want to add linkable current category in magento  . Go to this location

app/design/frontend/base/default/template/catalog/product

and add following code before <div id=”messages_product_view”> here is sample code

<span><a href=”<?php echo Mage::registry(‘current_category’)->getUrl() ?>”><?php echo Mage::registry(‘current_category’)->getName();?> </a> </span>

 

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 13 February '12 by , under Magento. No Comments.

Magento Custom option Alignment

Magento Custom option Alignment : We were playing with a magento store for mass update of custom option using custom option template  but found a weird problem of alignement with custom option after banging my head finally i found the solution .

HERE is simple fix i just choose Display product options in  from design tab and selected “block after info column”  instead of  ”product info column” and BOOM alignment issue has been solved as per the below image

 

Magento Bulk custom option

 

 

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 10 February '12 by , under Magento. No Comments.

Magento : cache_dir must be a directory

cache_dir must be a directory : This problem came generally when you move your magento store to another host or server . There are mainly two solution for this problem

1 -  Make sure your cache directory is writable or you can make writable to var folder of magento

but sometimes this situation does not work so here is the alternate solution. Go to this location lib/Zend/Cache/Backend/

and open file.php file you’ll see the code something like this

protected $_options = array(
        'cache_dir' => null,
        'file_locking' => true,
        'read_control' => true,
        'read_control_type' => 'crc32',
        'hashed_directory_level' => 0,
        'hashed_directory_umask' => 0700,
        'file_name_prefix' => 'zend_cache',
        'cache_file_umask' => 0600,
        'metadatas_array_max_size' => 100
    );

change this code as below

protected $_options = array(
        'cache_dir' => '/var/www/html/webkul/magento/tmp',
        'file_locking' => true,
        'read_control' => true,
        'read_control_type' => 'crc32',
        'hashed_directory_level' => 0,
        'hashed_directory_umask' => 0700,
        'file_name_prefix' => 'zend_cache',
        'cache_file_umask' => 0600,
        'metadatas_array_max_size' => 100
    );

assign path of cache_dir as per your configuration .

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 14 November '11 by , under Magento. No Comments.

Thanks your for your subscription magento

Thanks your for your subscription magento : This is an alert message when any user is signing up for magento newsletter but suppose that if any magento administrator want to edit this message , so you cant do it from magento admin . This text is coming from the SubscriberController.php

Go to this file at /app/code/core/Mage/Newsletter/controllers/SubscriberController.php and change it as per your need.

 

 

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 14 November '11 by , under Magento. No Comments.

Magento : Add CSS / JS for Specific Category

Magento : Add CSS / JS for Specific Category : This is very well known and general issues and tons of crap tutorial is also there in the internet , here is the simplest solution . Lets say suppose you want to add a css , so create a css file  so i just create a css file customcategory.css inside

/skin/frontend/default/default/css

.category-description {

    height: 475px !important;
    margin: 0 0 10px;
}

now add the below code in manage category->choose the category ->custom design and under custom layout update texarea put this

<reference name="head">
<action method="addCss"><stylesheet>css/customcategory.css</stylesheet></action>
</reference>

 

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 8 November '11 by , under Magento. No Comments.

Magento : WYSIWYG insert/edit link not working

WYSIWYG insert/edit link not working :  I stumbled upon this problem when i was playing with magento wysiwyg , and found that this is happening due to conflict in java scripts actually i installed free editor from magento connect so i uninstalled that module htough connect and everything is awesome again

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 7 November '11 by , under Magento. No Comments.

Add CMS page in Magento Category Navigation

CMS page in Magento Category : This is common issue when we are dealing with magento navigation , means suppose we want to add a cms page in to magento top category , there is a simple trick .BTW there are two methods – The most easy one is you can add it via static block .

1 –  create a static block as per your ease

2 – now go to catalog-> manage category and under display setting choose your cms block but make sure display mode must be static bloock only as per this picture

CMS page in Magento Category

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 4 November '11 by , under Magento. No Comments.

Invalid backend model specified: catalog/attribute_backend_customlayoutupdate

Invalid backend model specified: catalog/attribute_backend_customlayoutupdate: This is really common problem and i was searching a lot for this issue but got almost uncompleted solution’s , so here is the working one .Open your database using phpmyadmin and run this query

SELECT *
FROM `webkul`.`eav_attribute`
WHERE (
`attribute_id` LIKE '%customlayoutupdate%'
OR `entity_type_id` LIKE '%customlayoutupdate%'
OR `attribute_code` LIKE '%customlayoutupdate%'
OR `attribute_model` LIKE '%customlayoutupdate%'
OR `backend_model` LIKE '%customlayoutupdate%'
OR `backend_type` LIKE '%customlayoutupdate%'
OR `backend_table` LIKE '%customlayoutupdate%'
OR `frontend_model` LIKE '%customlayoutupdate%'
OR `frontend_input` LIKE '%customlayoutupdate%'
OR `frontend_label` LIKE '%customlayoutupdate%'
OR `frontend_class` LIKE '%customlayoutupdate%'
OR `source_model` LIKE '%customlayoutupdate%'
OR `is_required` LIKE '%customlayoutupdate%'
OR `is_user_defined` LIKE '%customlayoutupdate%'
OR `default_value` LIKE '%customlayoutupdate%'
OR `is_unique` LIKE '%customlayoutupdate%'
OR `note` LIKE '%customlayoutupdate%'
)

BOOM You are done :) make sure you changed webkul as per your database name

Facebook Twitter Digg Reddit Stumbleupon

Related Posts:

  • No Related Posts

Posted on 19 October '11 by , under Magento. No Comments.