Files
module-vendor-notes/etc/adminhtml/system.xml

41 lines
3.0 KiB
XML
Raw Normal View History

2025-10-07 18:31:07 -04:00
<?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="shopkeeper" translate="label" sortOrder="999">
<label>Shopkeeper</label>
</tab>
<section id="vendor_notes" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Vendor Notes</label>
<tab>shopkeeper</tab>
<resource>Shopkeeper_VendorNotes::config_vendor_notes</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Vendor Notes Configuration</label>
2025-10-07 18:31:07 -04:00
<comment><![CDATA[
<div style="padding: 10px; background: #f0f0f0; border-left: 3px solid #1979c3; margin-bottom: 20px;">
<strong>How to use Vendor Notes:</strong>
<ul style="margin: 10px 0; padding-left: 20px;">
<li>Click "Add Row" to create a new vendor note configuration</li>
<li>Enter the <strong>exact vendor name</strong> as it appears in the Vendor attribute (Stores > Attributes > Product > Vendor)</li>
<li>Enter your note text - HTML is supported for links and formatting</li>
<li>Notes will automatically appear on order pages when products with the matching vendor are in the order</li>
2025-10-07 18:31:07 -04:00
</ul>
<strong>HTML Formatting Examples:</strong>
<ul style="margin: 10px 0; padding-left: 20px;">
<li>Line break: <code>&lt;br&gt;</code></li>
<li>Email link: <code>&lt;a href="mailto:support@example.com"&gt;support@example.com&lt;/a&gt;</code></li>
<li>Website link: <code>&lt;a href="https://example.com"&gt;Visit Website&lt;/a&gt;</code></li>
</ul>
<strong>Managing Vendors:</strong>
<p style="margin: 10px 0;">To add or edit vendor options, go to <strong>Stores > Attributes > Product</strong> and edit the <strong>Vendor</strong> attribute (code: <code>vendor</code>)</p>
2025-10-07 18:31:07 -04:00
</div>
]]></comment>
<field id="vendor_mapping" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Vendor Notes</label>
<frontend_model>Shopkeeper\VendorNotes\Block\Adminhtml\Form\Field\VendorMapping</frontend_model>
<backend_model>Shopkeeper\VendorNotes\Model\Config\Backend\HtmlArraySerialized</backend_model>
<comment>Add vendor names and their corresponding notes. The vendor name must match exactly as it appears in the product attribute.</comment>
2025-10-07 18:31:07 -04:00
</field>
</group>
</section>
</system>
</config>