Saturday, October 22, 2011

Magento disable rating and reviews

If you are tired of disabling reviews from modules in admin , here is a quircky trick for that .
Comment the codes in these three files and you are done

  =>template/rating/empty.phtml
  =>template/review/helper/summary.phtml
  =>template/review/helper/summary_short.phtml.

Friday, October 21, 2011

Change shipment title based on country

Change shipment title based on country


For example :



We want to get shipment text as follows
Netherlands: TNT02

Belgium: TAX02

Others: DHL01

Go to
/app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php
Find
$address->setShippingDescription($rate->getCarrierTitle().' - '.$rate->getMethodTitle());
Replace with
if($address->getCountry()=='NL')
                                       {
                           $address->setShippingDescription('TNT02');
                                       }
                                       elseif($address->getCountry()=='BE')
                                       {
                                               $address->setShippingDescription('TAX02');
                                       }
                                       else
                                       {
                                               $address->setShippingDescription($rate->getMethodTitle());
                                       }

Integrate Drupal and Magento

http://drupal.org/node/468036
http://taroza.wordpress.com/2009/11/11/magento-and-drupal-integration/