Skip to content

Instantly share code, notes, and snippets.

@drewgillson
Created June 28, 2012 05:01
Show Gist options
  • Save drewgillson/3009215 to your computer and use it in GitHub Desktop.
Save drewgillson/3009215 to your computer and use it in GitHub Desktop.
Dg_Pricerulesextended config.xml
<?xml version="1.0"?>
<config>
<modules>
<Dg_Pricerulesextended>
<version>0.1</version><platform>ce</platform>
</Dg_Pricerulesextended>
</modules>
<global>
<models>
<pricerulesextended>
<class>Dg_Pricerulesextended_Model</class>
</pricerulesextended>
</models>
<helpers>
<!-- the following tag is the name you will use to load the helper by calling Mage::helper() -->
<pricerulesextended>
<class>Dg_Pricerulesextended_Helper</class>
</pricerulesextended>
</helpers>
</global>
<frontend>
<!-- this module has an event observer -->
<events>
<!-- call the Dg_Pricerulesextended_Model_Observer::newsletterSubscriberSave method after someone subscribes -->
<newsletter_subscriber_save_after>
<observers>
<newsletterSubscriberSave>
<type>singleton</type>
<class>Pricerulesextended/Observer</class>
<method>newsletterSubscriberSave</method>
</newsletterSubscriberSave>
</observers>
</newsletter_subscriber_save_after>
</events>
<!-- this module has a controller at /pricerulesextended/ -->
<routers>
<Dg_Pricerulesextended>
<use>standard</use>
<args>
<module>Dg_Pricerulesextended</module>
<frontName>pricerulesextended</frontName>
</args>
</Dg_Pricerulesextended>
</routers>
</frontend>
<!-- This is necessary to display the back-end configuration options defined in system.xml -->
<adminhtml>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<pricerulesextended>
<title>Price Rules Extended Module</title>
</pricerulesextended>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</adminhtml>
<!-- and these are defaults for the parameters defined in system.xml -->
<default>
<pricerulesextended>
<promocode>
<dollarvalue>10</dollarvalue>
<minpurchase>100</minpurchase>
<emailtext>We are so glad you subscribed to our newsletter! To say thanks, please accept the coupon code {promo_code} to use for your next purchase. It is good for ${promo_value} off your next purchase of ${promo_min} or more.</emailtext>
</promocode>
</pricerulesextended>
</default>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment