init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
|
||||
<acl>
|
||||
<resources>
|
||||
<resource id="Magento_Backend::admin">
|
||||
<resource id="Magento_Backend::stores">
|
||||
<resource id="Magento_Backend::stores_settings">
|
||||
<resource id="Magento_Config::config">
|
||||
<resource id="Esun_PromotionPopup::configuration"
|
||||
title="Promotion Popup Configuration"
|
||||
sortOrder="95"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
</acl>
|
||||
</config>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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_promotion_popup" translate="label" type="text" sortOrder="370"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Promotion Popup</label>
|
||||
<tab>esun</tab>
|
||||
<resource>Esun_PromotionPopup::configuration</resource>
|
||||
<group id="general" translate="label" type="text" sortOrder="10"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Website Promotion</label>
|
||||
<field id="enabled" translate="label" type="select" sortOrder="10"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Enable Promotion Popup</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
</field>
|
||||
<field id="cms_block_identifier" translate="label comment" type="select" sortOrder="20"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>CMS Block</label>
|
||||
<comment>The selected block controls the promotion image, copy and CTA URL. Create localized blocks with the same identifier for different Store Views.</comment>
|
||||
<source_model>Esun\PromotionPopup\Model\Config\Source\CmsBlock</source_model>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="promotion_type" translate="label comment" type="select" sortOrder="30"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Promotion Type</label>
|
||||
<comment>Controls promotion-specific behavior outside the popup. Select Content Only for campaigns that do not grant a registration subscription coupon.</comment>
|
||||
<source_model>Esun\PromotionPopup\Model\Config\Source\PromotionType</source_model>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="start_date" translate="label comment" type="date" sortOrder="40"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Start Date</label>
|
||||
<comment>Optional. Uses the Website locale and timezone.</comment>
|
||||
<frontend_model>Esun\PromotionPopup\Block\Adminhtml\System\Config\Form\Field\Date</frontend_model>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="end_date" translate="label comment" type="date" sortOrder="50"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>End Date</label>
|
||||
<comment>Optional. The promotion remains active through the end of this date.</comment>
|
||||
<frontend_model>Esun\PromotionPopup\Block\Adminhtml\System\Config\Form\Field\Date</frontend_model>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="audience" translate="label" type="select" sortOrder="60"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Audience</label>
|
||||
<source_model>Esun\PromotionPopup\Model\Config\Source\Audience</source_model>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="display_delay" translate="label comment" type="text" sortOrder="70"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Display Delay (milliseconds)</label>
|
||||
<comment>Recommended: 1500. Maximum: 60000.</comment>
|
||||
<validate>required-entry validate-digits validate-zero-or-greater</validate>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="frequency" translate="label comment" type="select" sortOrder="80"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Display Frequency</label>
|
||||
<comment>The display record is stored in the visitor's browser and isolated by Website.</comment>
|
||||
<source_model>Esun\PromotionPopup\Model\Config\Source\Frequency</source_model>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="campaign_version" translate="label comment" type="text" sortOrder="90"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Campaign Version</label>
|
||||
<comment>Increase this number when a changed campaign should be shown again to previous visitors.</comment>
|
||||
<validate>required-entry validate-digits validate-greater-than-zero</validate>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
<field id="excluded_handles" translate="label comment" type="textarea" sortOrder="100"
|
||||
showInDefault="1" showInWebsite="1" showInStore="0">
|
||||
<label>Excluded Page Handles</label>
|
||||
<comment>Enter one Magento full action name per line. The popup is never rendered on these pages.</comment>
|
||||
<depends><field id="enabled">1</field></depends>
|
||||
</field>
|
||||
</group>
|
||||
</section>
|
||||
</system>
|
||||
</config>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
|
||||
<default>
|
||||
<esun_promotion_popup>
|
||||
<general>
|
||||
<enabled>0</enabled>
|
||||
<promotion_type>registration_newsletter_coupon</promotion_type>
|
||||
<display_delay>1500</display_delay>
|
||||
<frequency>daily</frequency>
|
||||
<audience>guest</audience>
|
||||
<campaign_version>1</campaign_version>
|
||||
<excluded_handles>checkout_cart_index
|
||||
checkout_index_index
|
||||
customer_account_create
|
||||
customer_account_login
|
||||
customer_account_forgotpassword
|
||||
customer_account_index
|
||||
checkout_onepage_success</excluded_handles>
|
||||
</general>
|
||||
</esun_promotion_popup>
|
||||
</default>
|
||||
</config>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Esun_PromotionPopup">
|
||||
<sequence>
|
||||
<module name="Magento_Cms"/>
|
||||
<module name="Magento_Config"/>
|
||||
<module name="Magento_Customer"/>
|
||||
<module name="Magento_Store"/>
|
||||
<module name="Magento_Ui"/>
|
||||
</sequence>
|
||||
</module>
|
||||
</config>
|
||||
Reference in New Issue
Block a user