Thursday, 26 September 2013

Debug tool is showing layout using Extensions


This debug tool is showing layout, block,model functions and queries executed behind each page load in magento. it  might be useful for debugging.




http://www.magentocommerce.com/magento-connect/magneto-debug-8676.html

Thursday, 25 April 2013

Redirect www. using htacess


RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [L,R=301]

Friday, 7 September 2012

How to decompress a javascript & HTML through online




How to decompress a javascript & HTML through online?


All of the source code is completely free and open, and we have a command-line version and a python library as well.

http://jsbeautifier.org/

Thursday, 6 September 2012

How to use cufon css inside jquery


How to use cufon css inside jquery
Examples:1
<script>
jQuery("your css class name").hoverIntent(
     function() {
Cufon.replace(".classname",{fontSize:'38px'});
}
);
</script>
**********************************************************************************************************************
Use jQuery object inside Cufon
Example 2:
<script>
    jQuery("your css class name").hoverIntent(
function() {Cufon.replace(($(this).find('a')),{hover: true, color: '#fff'});});
</script>
*********************************************************************************
Multiple Cufon on a Single page
Example 3:
<script src="cufon.js" type="text/javascript"></script>
<script src="Aliquam_400.font.js" type="text/javascript"></script>
<script src="Helvetica_Neue_900.font.js" type="text/javascript"></script>
<script>
Cufon.replace("h1",{fontFamily: 'Aliquam'});
Cufon.replace("h2",{fontFamily: 'Helvetica_Neue'});
</script>
*********************************************************************************
Edit cufon canvas in css
Example 4:

ul.footer_menu_inner_list li cufon canvas {top:-4px!important;}
a.parent_active cufon canvas{left:-20px!important;}

*********************************************************************************

Friday, 6 April 2012

Service Temporarily Unavailable The server is temporarily unable to service your request ..


Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

HERE IS THE SOLUTION: 
delete the following file from your root folder /magento/ installation
(or)
maintenance.flag
e.g. rm ./magento/maintenance.flag

Wednesday, 4 April 2012

to call contact form in CMS page.


Go to CMS> Manage Pages interface
Insert the below code in content area

{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}

To print product category name in product description page


Go to catalog/product/view.phtml

<?php $categories = $_product->getCategoryIds(); ?>
<?php foreach($categories as $i => $_category_id): ?>
<?php $_category = Mage::getModel('catalog/category')->load($_category_id) ?>
<a href="<?php echo $_category->getUrl() ?>"><?php echo $_category->getName() ?></a>
<?php endforeach; ?>

Monday, 2 April 2012

To add Sitemap to a Magento websites

It helps mostly for Search Engine Optimization(SEO).

-> Goto System> Configuration> Catalog> Google Sitemap. Enable all the options in there

-> Goto System> Configuration> Catalog> Catalog> Sitemap and enable the Sitemap Creation option.

Thursday, 20 October 2011

To display the list of product from particular category if it's login.


To display the list of product from particular category  if it's login.

Check the condition of category( example :  "category id 11" ) if it's login or not...

<?php


if(Mage::registry('current_category')) {
$currentCategory = Mage::registry('current_category');
$categoryId = $currentCategory->getId();
$restrictId = 11;
           
if($categoryId == $restrictId) {
$login = Mage::getSingleton( 'customer/session' )->isLoggedIn();
$redirectUrl = Mage::getBaseUrl().'customer/account/login';
if(!$login) { ?>        
<script type="text/javascript">
this.location.href = '<?php echo $redirectUrl; ?>';
</script>
<?php 
}
}
        
}
?>

Friday, 14 October 2011

Shipping configuration using price for Owebia Shipping extenstion


Shipping configuration using price for Owebia Shipping extenstion given below sample shipping rules...


#Postal
{
code: "chronopost_offert",
label: "Label",
destination: "FR",
conditions: "{cart.price_including_tax}>=1and {cart.price_including_tax}<=75",
fees:"10.00"
}


#Postal2
{
code: "chronopost_offert1",
label: "Label",
destination: "FR",
conditions: "{cart.price_including_tax}>=76and {cart.price_including_tax}<=200",
fees:"20.00"
}


#Postal3
{
code: "chronopost_offert2",
label: "Label",
destination: "FR",
conditions: "{cart.price_including_tax}>=201and {cart.price_including_tax}<=400",
fees:"30.00"
}


#Postal4
{
code: "chronopost_offert3",
label: "Label",
destination: "FR",
conditions: "{cart.price_including_tax}>=401",
fees:"0.00"
}

Friday, 7 October 2011

IE9 fix for Magento


In IE9 form validation is not working perfectly so add the <meta> tag in below path

app/code/design/frontend/{package}/{theme}/template/page/html/head.phtml


<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />


Thursday, 15 September 2011

When mousehover the scrolling automatic stop using JM Products Slider


Open jcarousellite_1.0.1.js in skin/frontend/default/default/joomlart/jmproductsslider/js folder


Please find line no : 253

paste this mouseover function

 $(ul).mouseover(function() {
     o.auto = 0;
     });
         $(ul).mouseout(function() {
             o.auto = 1;
     });
         
   
     and
       
Go to  function go(to) 

Find this condition

if(!running) {


Replace this below condition

 if(!running && o.auto !=0 ) {

Thursday, 23 June 2011

Startup errors in Dreamweaver : The following translators were not loaded due to errors

This post is for Dreamweaver 8 version


Having followed the procedures in updating dreamweaver (as mentioned in said article), Dreamweaver did startup successfully but this time errors kept popping:

The following translators were not loaded due to errors:
ASP.htm: has configuration information that is invalid.
ASP.NET.htm: has configuration information that is invalid.
ColdFusion.htm: has configuration information that is invalid.
PHP_MySQL.htm: has configuration information that is invalid.
JSP.htm: has configuration information that is invalid.
XSLT.htm: has configuration information that is invalid.

Here is the solution


Delete FileCache.dat files from the Dreamweaver user configuration folder.
Delete the WinFileCache-7A9586CB.dat, MacFileCache-BFE7CE2E.dat, or FileCache.dat file from the Dreamweaver user configuration folder. It is recommended to delete the FileCache.dat file if you are experiencing a JavaScript error related to "dwscripts" or if you are receiving a "translators were not loaded" error message. The string of characters after "FileCache-" may differ on your machine. The location of the FileCache.dat file depends your operating system and your version of Dreamweaver. Note that on Windows, the Application Data and AppData folders are hidden by default, so verify that your Windows Explorer folder options are set to View Hidden Folders.

Dreamweaver CS3 on Windows Vista:
C:\Users\
[username]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration

Dreamweaver CS3 on Windows XP:
C:\Documents and Settings\
[username]\Application Data\Adobe\Dreamweaver 9\Configuration

Dreamweaver 8 on Windows XP:
C:\Documents and Settings\
[username]\Application Data\Macromedia\Dreamweaver 8\Configuration

Dreamweaver 8 on Windows Vista:
C:\Users\
[username]\AppData\Roaming\Macromedia\Dreamweaver 8\Configuration

Dreamweaver CS3 on Macintosh:
Mac HD/Users/
[user]/Library/Application Support/Adobe/Dreamweaver 9/

Dreamweaver 8 on Macintosh:
Mac HD/Users/
[user]/Library/Application Support/Macromedia/Dreamweaver 8/

Wednesday, 15 June 2011

One or more of the Cache Types are invalidated: Blocks HTML output

In Magento 1.5 displaying message to pop on every product save.

If you go to system -> Cache management -> (Invalid )option


Here is the solution  ....

Add this in your module config.xml:


<global>
<models>
<catalogrule>
    <rewrite>
        <rule>Yourpackage_Yourmodule_Model_Rule</rule>
    </rewrite>
</catalogrule>
</models>

Create file called Rule.php in YOUR module Model directory.

Add this code in newly created file:




class Yourpackage_Yourmodule_Model_Rule extends Mage_CatalogRule_Model_Rule
{
   /**
     * Apply all price rules to product
     *
     * @param int|Mage_Catalog_Model_Product $product
     * @return Mage_CatalogRule_Model_Rule
     */
    public function applyAllRulesToProduct($product)
    {
        $this->_getResource()->applyAllRulesForDateRange(NULL, NULL, $product);
        $this->_invalidateCache();
        //Notice this little line
    Mage::app()->getCacheInstance()->cleanType('block_html');
        $indexProcess = Mage::getSingleton('index/indexer')->getProcessByCode('catalog_product_price');
        if ($indexProcess) {
            $indexProcess->reindexAll();
        }
    }
}


Thursday, 9 June 2011

Date of Birth (DOB) Issue on registration form for Magento version 1.5.0.1

There was some error in Magento version 1.5.0.1 -

parseInt accepts a prefix to specify the radius, validation is now crippled.

I changed line 437 in /js/varien/js.js

From:


var error falseday parseInt(this.day.value) || 0month parseInt(this.month.value) || 0year parseInt(this.year.value) || 0;

Replace:

var error falseday parseInt(this.day.value10) || 0month parseInt(this.month.value10) || 0year parseInt(this.year.value10) || 0;

Friday, 3 June 2011

Entity attribute option collection order

$_options = Mage::getResourceModel('eav/entity_attribute_option_collection')
  ->setStoreFilter(0)
  ->setAttributeFilter($attribute_id)
  ->setPositionOrder('asc')
  ->load();

Tuesday, 17 May 2011

Magento :How to enable mod_rewrite

Log into the admin 
and navigate to system->cache management.  Click the “refresh” button next to “catalog rewrites”.