Files
esun3d/app/code/Esun/LingxingErp/etc/adminhtml/system.xml
T
2026-09-15 10:35:56 +08:00

86 lines
7.2 KiB
XML

<?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_lingxing" translate="label" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Lingxing ERP</label>
<tab>esun</tab>
<resource>Esun_LingxingErp::config</resource>
<group id="general" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Connection and Order Mapping</label>
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Enabled</label><source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="api_base_url" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<label>API Base URL</label>
</field>
<field id="app_id" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
<label>App ID</label>
</field>
<field id="app_secret" translate="label" type="obscure" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
<label>App Secret</label><backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
</field>
<field id="store_mapping" translate="label comment" type="select" sortOrder="50" showInDefault="0" showInWebsite="1" showInStore="0" canRestore="1">
<label>Lingxing Store</label>
<source_model>Esun\LingxingErp\Model\Source\LingxingStore</source_model>
<comment>Read from the locally synchronized store list. The selected option stores both Platform Code and Lingxing Store ID for this Magento Website.</comment>
</field>
<field id="warehouse_id" translate="label comment" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Default Lingxing Warehouse</label>
<source_model>Esun\LingxingErp\Model\Source\LingxingWarehouse</source_model>
<comment>Read from synchronized warehouses. Leave both warehouse and logistics type blank to let Lingxing route the order.</comment>
</field>
<field id="logistics_type_id" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Default Logistics Type ID</label>
</field>
<field id="eligible_statuses" translate="label comment" type="text" sortOrder="90" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Order Statuses to Export</label><comment>Comma-separated Magento order status codes, for example: processing.</comment>
</field>
</group>
<group id="orders" translate="label" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Order Synchronization</label>
<field id="batch_size" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"><label>Batch Size</label></field>
<field id="max_attempts" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"><label>Maximum Attempts</label></field>
<field id="stock_deduction_type" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Stock Deduction Type</label><comment>Lingxing value 1 means no store-specific stock dimension; 2 means SKU plus order store.</comment>
</field>
</group>
<group id="shipments" translate="label" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Shipment Synchronization</label>
<field id="page_size" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"><label>Pull Page Size</label></field>
<field id="max_pages" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"><label>Maximum Pages per Run</label></field>
<field id="max_attempts" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"><label>Maximum Processing Attempts</label></field>
<field id="notify_customer" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Email Shipment to Customer</label><source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
</group>
<group id="sku_sync" translate="label" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
<label>ERP SKU Synchronization</label>
<field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Daily Synchronization Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>Runs once per day. Manual synchronization remains available under Esun &gt; Lingxing ERP &gt; Stores.</comment>
</field>
<field id="page_size" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Pair List Page Size</label>
<comment>Number of Lingxing SKU pairs requested per API page, from 1 to 200.</comment>
</field>
</group>
<group id="logging" translate="label" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Synchronization Log Retention</label>
<field id="success_retention_days" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Success Log Retention (Days)</label>
<validate>validate-number validate-greater-than-zero</validate>
<comment>Successful and ignored logs store compact summaries and are deleted after this many days.</comment>
</field>
<field id="error_retention_days" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Error Log Retention (Days)</label>
<validate>validate-number validate-greater-than-zero</validate>
<comment>Failed and retrying logs retain sanitized request and response payloads for this many days.</comment>
</field>
</group>
</section>
</system>
</config>