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