Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZusZus/66da0a7aaeb0db53eff38d8bb89ae941 to your computer and use it in GitHub Desktop.
Save ZusZus/66da0a7aaeb0db53eff38d8bb89ae941 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<config>
<modules>
<Gta_KolupadiRestrict>
<version>1.0.0</version>
</Gta_KolupadiRestrict>
</modules>
<global>
<models>
<gta_kolupadirestrict>
<class>Gta_KolupadiRestrict_Model</class>
</gta_kolupadirestrict>
</models>
</global>
<frontend>
<events>
<sales_order_place_before>
<observers>
<Gta_KolupadiRestrict_Model_Observer>
<type>singleton</type>
<class>Gta_KolupadiRestrict_Model_Observer</class>
<method>cartevent</method>
</Gta_KolupadiRestrict_Model_Observer>
</observers>
</sales_order_place_before>
</events>
</frontend>
</global>
</config>
<?php
class Gta_KolupadiRestrict_Model_Observer {
public function cartevent($Observer) {
$order = $Observer->getEvent();
$shipping = $order->getShippingAddress()->getShippingMethod();
Mage::log($shipping->getName(),null,'event.log');
}
}
?>
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<!-- Gta_KolupadiRestrict -->
<Gta_KolupadiRestrict>
<active>true</active>
<codePool>local</codePool>
</Gta_KolupadiRestrict>
</modules>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment