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" />