Initial commit

This commit is contained in:
shopkeeperdev
2025-10-07 18:31:07 -04:00
commit 20786161b7
11 changed files with 272 additions and 0 deletions

16
etc/acl.xml Normal file
View File

@@ -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="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="Shopkeeper_VendorNotes::config_vendor_notes" title="Vendor Notes" sortOrder="50" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>

48
etc/adminhtml/system.xml Normal file
View File

@@ -0,0 +1,48 @@
<?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>General</label>
<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>These notes will automatically appear on order pages when products with the corresponding vendor are in the order.</li>
<li>You can use HTML formatting: <code>&lt;br&gt;</code> for line breaks, <code>&lt;a href="mailto:email@example.com"&gt;link text&lt;/a&gt;</code> for email links.</li>
<li>Leave a field blank if you don't need notes for that vendor.</li>
</ul>
<strong>Need to add a new vendor?</strong>
<ol style="margin: 10px 0; padding-left: 20px;">
<li>Go to <strong>Stores > Attributes > Product</strong> and edit the <strong>Vendor</strong> attribute (attribute code: <code>vendor</code>)</li>
<li>Add your new vendor option in the <strong>Manage Options</strong> section</li>
<li>Contact your developer to add the configuration field for the new vendor note</li>
</ol>
</div>
]]></comment>
<field id="thermo_fisher_note" translate="label" type="textarea" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Thermo Fisher Note</label>
<comment>Enter notes here. Supports HTML for links and emails (e.g., &lt;a href="mailto:support@thermofisher.com"&gt;support@thermofisher.com&lt;/a&gt;).</comment>
</field>
<field id="orion_note" translate="label" type="textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Orion Note</label>
<comment>Enter notes here. Supports HTML for links and emails.</comment>
</field>
<field id="nalgene_note" translate="label" type="textarea" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Nalgene Note</label>
<comment>Enter notes here. Supports HTML for links and emails.</comment>
</field>
<field id="thermo_fisher_parts_note" translate="label" type="textarea" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Thermo Fisher Parts Note</label>
<comment>Enter notes here. Supports HTML for links and emails.</comment>
</field>
</group>
</section>
</system>
</config>

13
etc/config.xml Normal file
View File

@@ -0,0 +1,13 @@
<?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>
<vendor_notes>
<general>
<thermo_fisher_note>Example multi-line note for Thermo Fisher.&lt;br&gt;Contact: &lt;a href="mailto:support@thermofisher.com"&gt;support@thermofisher.com&lt;/a&gt;&lt;br&gt;More info: &lt;a href="https://thermofisher.com/support"&gt;Support Page&lt;/a&gt;</thermo_fisher_note>
<orion_note>Example note for Orion.&lt;br&gt;Email: &lt;a href="mailto:info@orion.com"&gt;info@orion.com&lt;/a&gt;</orion_note>
<nalgene_note>Example note for Nalgene.&lt;br&gt;Link: &lt;a href="https://nalgene.com/help"&gt;Help Center&lt;/a&gt;</nalgene_note>
<thermo_fisher_parts_note>Example note for Thermo Fisher Parts.&lt;br&gt;Support: &lt;a href="mailto:parts@thermofisher.com"&gt;parts@thermofisher.com&lt;/a&gt;</thermo_fisher_parts_note>
</general>
</vendor_notes>
</default>
</config>

4
etc/module.xml Normal file
View File

@@ -0,0 +1,4 @@
<?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="Shopkeeper_VendorNotes" setup_version="1.0.0"/>
</config>