Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Created November 16, 2012 18:13
Show Gist options
  • Save xcommerce-gists/4089554 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/4089554 to your computer and use it in GitHub Desktop.
Magento coupon code generator sample configuration file
<config>
<api2>
<resource_groups>
<autogen translate="title" module="CouponDemo_AutoGen">
<title>CouponDemo API</title>
<sort_order>10</sort_order>
</autogen>
</resource_groups>
<resources>
<autogen translate="title" module="CouponDemo_AutoGen">
<group>autogen</group>
<model>autogen/api2_coupon</model>
<title>Coupon Code Auto Generation</title>
<sort_order>10</sort_order>
<privileges>
<admin>
<create>1</create>
<retrieve>1</retrieve>
</admin>
</privileges>
<attributes>
<coupon_id>Coupon ID</coupon_id>
<code>Code</code>
<qty>Quantity</qty>
<length>Length</length>
<format>Format</format>
</attributes>
<routes>
<route>
<route>/coupondemo/rules/:rule_id/codes</route>
<action_type>collection</action_type>
</route>
</routes>
<versions>1</versions>
</autogen>
</resources>
</api2>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment