Thursday, 18 June 2015

Magento : How to Add Desktop Version and Mobile Version Link?

For adding desktop verision and mobile version link in mobile theme you can use following module it is free module.

<a href="https://github.com/davidalger/CLS_DesignSwitcher">https://github.com/davidalger/CLS_DesignSwitcher</a>

Magento Product Review Form Not Working.

This is Magento 1.8 bug, but you can fix it:

Go To : /app/design/frontend/themename/default/template/review/form.phtml

Find:

<form action=”<?php echo $this->getAction() ?>” method=”post” id=”review-form”>

Add :  <?php echo $this->getBlockHtml(‘formkey’); ?> after form


Hope it will help....   

Tuesday, 26 May 2015

Magento : How to change default sort direction

To change default sort order direction (ASC to DESC) for product listing in Magento change following file code.

Go : app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php

Now Open the Toolbar.php file and find out the following line (Line no. 119):

protected $_direction = ‘asc’; 
Now Change above code by the following code:
protected $_direction = ‘desc’;

Friday, 22 May 2015

Magento : How to change the language selector

Add following code in app/design/frontend/base/default/template/page/switch/language.phtml

<?php if (count($this->getStores()) > 1): ?>
    <ul>
        <?php foreach ($this->getStores() as $_lang): ?>
            <?php if ($_lang->getId() != $this->getCurrentStoreId()): ?>
                <li class="language-<?php echo $this->htmlEscape($_lang->getCode()); ?>">
                    <a href="<?php echo $_lang->getCurrentUrl() ?>"><?php echo $this->htmlEscape($_lang->getName()) ?></a>
                </li>
            <?php endif; ?>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>

Thursday, 21 May 2015

Magento : How to fix the error (#11601: Request for billing address failed) of paypal

Resolve this error goto System >> Configuration >> payment methods >> Paypal express checkout (configure)>Basic Settings - PayPal Express Checkout >>  advanced settings >> require customer’s billing address. Set this to No

after check...

Hope this help some one....

Magento : How to apply magento patch without SSH

Review following link here your can apply security pathces.

http://magentary.com/kb/apply-supee-5344-and-supee-1533-without-ssh/

Magento : Destination folder is not writable or does not exist error.

Goto : lib/Varien/File/Uploader.php

Temprary change following code and try to upload image. Now in error message you can see folder path.
in folder path you have to give file permission 777 and it working normal. after error is resolved revert your code as it is.


if( !is_writable($destinationFolder) ) {
    var_dump($destinationFolder);  
    throw new Exception(''.$destinationFolder.'Destination folder is not writable or does not exists.');
}

Hope this help.....