init
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?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="Esun_ImageManager::esun">
|
||||
<resource id="Esun_ProductInquiry::inquiries" title="Product Inquiries" sortOrder="70">
|
||||
<resource id="Esun_ProductInquiry::manage" title="Manage Product Inquiries" sortOrder="10"/>
|
||||
<resource id="Esun_ProductInquiry::delete" title="Delete Product Inquiries" sortOrder="20"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
</acl>
|
||||
</config>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
|
||||
<menu>
|
||||
<add id="Esun_ProductInquiry::inquiries"
|
||||
title="Product Inquiries"
|
||||
module="Esun_ProductInquiry"
|
||||
sortOrder="70"
|
||||
parent="Esun_ImageManager::esun"
|
||||
action="esun_product_inquiry/inquiry/index"
|
||||
resource="Esun_ProductInquiry::inquiries"/>
|
||||
</menu>
|
||||
</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_product_inquiry" frontName="esun_product_inquiry">
|
||||
<module name="Esun_ProductInquiry" before="Magento_Backend"/>
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
|
||||
<table name="esun_product_inquiry" resource="default" engine="innodb" comment="eSUN Product Inquiries">
|
||||
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
|
||||
<column xsi:type="int" name="parent_product_id" unsigned="true" nullable="false" comment="Parent Product ID"/>
|
||||
<column xsi:type="varchar" name="parent_sku" nullable="false" length="64" comment="Parent SKU Snapshot"/>
|
||||
<column xsi:type="varchar" name="parent_name" nullable="false" length="255" comment="Parent Name Snapshot"/>
|
||||
<column xsi:type="int" name="product_id" unsigned="true" nullable="false" comment="Selected Product ID"/>
|
||||
<column xsi:type="varchar" name="product_sku" nullable="false" length="64" comment="Selected SKU Snapshot"/>
|
||||
<column xsi:type="varchar" name="product_name" nullable="false" length="255" comment="Selected Product Name Snapshot"/>
|
||||
<column xsi:type="text" name="selected_options" nullable="false" comment="Selected Options Snapshot"/>
|
||||
<column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" comment="Store ID"/>
|
||||
<column xsi:type="smallint" name="website_id" unsigned="true" nullable="false" comment="Website ID"/>
|
||||
<column xsi:type="int" name="stock_id" unsigned="true" nullable="false" comment="MSI Stock ID"/>
|
||||
<column xsi:type="int" name="customer_id" unsigned="true" nullable="true" comment="Customer ID"/>
|
||||
<column xsi:type="varchar" name="name" nullable="false" length="255" comment="Name"/>
|
||||
<column xsi:type="varchar" name="email" nullable="false" length="255" comment="Email"/>
|
||||
<column xsi:type="varchar" name="country_id" nullable="false" length="2" comment="Country Code"/>
|
||||
<column xsi:type="varchar" name="country_name" nullable="false" length="255" comment="Country Name Snapshot"/>
|
||||
<column xsi:type="varchar" name="company" nullable="false" length="255" default="" comment="Company Name"/>
|
||||
<column xsi:type="varchar" name="telephone" nullable="false" length="64" default="" comment="Telephone"/>
|
||||
<column xsi:type="text" name="message" nullable="false" comment="Message"/>
|
||||
<column xsi:type="varchar" name="status" nullable="false" length="32" default="new" comment="Processing Status"/>
|
||||
<column xsi:type="smallint" name="stock_status" unsigned="true" nullable="false" comment="Legacy Stock Status Snapshot"/>
|
||||
<column xsi:type="smallint" name="is_salable" unsigned="true" nullable="false" comment="MSI Salable Snapshot"/>
|
||||
<column xsi:type="varchar" name="availability_reason" nullable="false" length="32" comment="Availability Reason"/>
|
||||
<column xsi:type="varchar" name="message_hash" nullable="false" length="64" comment="Duplicate Detection Hash"/>
|
||||
<column xsi:type="varchar" name="remote_ip_hash" nullable="false" length="64" default="" comment="Rate Limit IP Hash"/>
|
||||
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
|
||||
<column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Updated At"/>
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY"><column name="entity_id"/></constraint>
|
||||
<index referenceId="ESUN_PRODUCT_INQUIRY_PRODUCT_EMAIL" indexType="btree">
|
||||
<column name="product_id"/><column name="email"/>
|
||||
</index>
|
||||
<index referenceId="ESUN_PRODUCT_INQUIRY_STATUS_CREATED" indexType="btree">
|
||||
<column name="status"/><column name="created_at"/>
|
||||
</index>
|
||||
<index referenceId="ESUN_PRODUCT_INQUIRY_MESSAGE_HASH" indexType="btree"><column name="message_hash"/></index>
|
||||
<index referenceId="ESUN_PRODUCT_INQUIRY_REMOTE_IP_HASH" indexType="btree"><column name="remote_ip_hash"/></index>
|
||||
</table>
|
||||
</schema>
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"esun_product_inquiry": {
|
||||
"column": {
|
||||
"entity_id": true,
|
||||
"parent_product_id": true,
|
||||
"parent_sku": true,
|
||||
"parent_name": true,
|
||||
"product_id": true,
|
||||
"product_sku": true,
|
||||
"product_name": true,
|
||||
"selected_options": true,
|
||||
"store_id": true,
|
||||
"website_id": true,
|
||||
"stock_id": true,
|
||||
"customer_id": true,
|
||||
"name": true,
|
||||
"email": true,
|
||||
"country_id": true,
|
||||
"country_name": true,
|
||||
"company": true,
|
||||
"telephone": true,
|
||||
"message": true,
|
||||
"status": true,
|
||||
"stock_status": true,
|
||||
"is_salable": true,
|
||||
"availability_reason": true,
|
||||
"message_hash": true,
|
||||
"remote_ip_hash": true,
|
||||
"created_at": true,
|
||||
"updated_at": true
|
||||
},
|
||||
"index": {
|
||||
"ESUN_PRODUCT_INQUIRY_PRODUCT_ID_EMAIL": true,
|
||||
"ESUN_PRODUCT_INQUIRY_STATUS_CREATED_AT": true,
|
||||
"ESUN_PRODUCT_INQUIRY_MESSAGE_HASH": true,
|
||||
"ESUN_PRODUCT_INQUIRY_REMOTE_IP_HASH": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
|
||||
<arguments>
|
||||
<argument name="collections" xsi:type="array">
|
||||
<item name="esun_product_inquiry_listing_data_source" xsi:type="string">EsunProductInquiryGridCollection</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<virtualType name="EsunProductInquiryGridCollection"
|
||||
type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
|
||||
<arguments>
|
||||
<argument name="mainTable" xsi:type="string">esun_product_inquiry</argument>
|
||||
<argument name="resourceModel" xsi:type="string">Esun\ProductInquiry\Model\ResourceModel\Inquiry</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
</config>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<type name="Magento\ConfigurableProduct\Helper\Data">
|
||||
<plugin name="esun_product_inquiry_include_out_of_stock_options"
|
||||
type="Esun\ProductInquiry\Plugin\ConfigurableProduct\Helper\DataPlugin"/>
|
||||
</type>
|
||||
</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="standard">
|
||||
<route id="product_inquiry" frontName="product-inquiry">
|
||||
<module name="Esun_ProductInquiry"/>
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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_ProductInquiry">
|
||||
<sequence>
|
||||
<module name="Magento_Catalog"/>
|
||||
<module name="Magento_CatalogInventory"/>
|
||||
<module name="Magento_ConfigurableProduct"/>
|
||||
<module name="Magento_Directory"/>
|
||||
<module name="Magento_InventorySalesApi"/>
|
||||
<module name="Magento_Swatches"/>
|
||||
<module name="Esun_ImageManager"/>
|
||||
</sequence>
|
||||
</module>
|
||||
</config>
|
||||
Reference in New Issue
Block a user