This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid"
type="Esun\CustomerCoupon\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid"/>
<type name="Magento\SalesRule\Controller\Adminhtml\Promo\Quote\Generate">
<plugin name="esun_customer_coupon_generate_for_customers"
type="Esun\CustomerCoupon\Plugin\GenerateAssignedCouponsPlugin" sortOrder="10"/>
</type>
</config>
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="adminhtml_promo_quote_edit_tab_coupons_form_prepare_form">
<observer name="esun_customer_coupon_add_customer_select"
instance="Esun\CustomerCoupon\Observer\AddCustomerSelectToCouponForm"/>
</event>
</config>
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="admin">
<route id="esun_customer_coupon" frontName="esun_customer_coupon">
<module name="Esun_CustomerCoupon" before="Magento_Backend"/>
</route>
</router>
</config>
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<tab id="esun" translate="label" sortOrder="300">
<label>Esun</label>
</tab>
<section id="esun_customer_coupon" translate="label" type="text" sortOrder="360"
showInDefault="1" showInWebsite="1" showInStore="0">
<label>Customer Coupons</label>
<tab>esun</tab>
<resource>Esun_CustomerCoupon::configuration</resource>
<group id="registration_subscription" translate="label" type="text" sortOrder="10"
showInDefault="1" showInWebsite="1" showInStore="0">
<label>Registration Subscription Coupon</label>
<field id="rule_id" translate="label comment" type="select" sortOrder="10"
showInDefault="1" showInWebsite="1" showInStore="0">
<label>Cart Price Rule</label>
<comment>Selecting a rule enables the reward. Only active rules that allow auto-generated coupons are listed. Configure the $299 minimum, $24 fixed discount, usage limits and stacking behavior on the Cart Price Rule itself.</comment>
<source_model>Esun\CustomerCoupon\Model\Config\Source\AutoGeneratedCartRule</source_model>
</field>
</group>
</section>
</system>
</config>