Initial commit

This commit is contained in:
James Oakley 2025-05-24 15:26:42 +00:00
commit ce5a217ed4
10 changed files with 1080 additions and 0 deletions

66
etc/adminhtml/system.xml Normal file
View file

@ -0,0 +1,66 @@
<?xml version="1.0"?>
<!--
~ Copyright James Oakley 2025. https://git.oakleys.org/
~
~ This file is part of Jro_PackagingWeight.
~
~ Jro_PackagingWeight is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~ Jro_PackagingWeight is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
~ Public License for more details.
~ You should have received a copy of the GNU General Public License along with
~ Jro_PackagingWeight. If not, see https://www.gnu.org/licenses/.
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="carriers">
<group id="matrixrate" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="packaging_weight_1_5" translate="label" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Packaging Weight (15 items)</label>
<validate>validate-number validate-zero-or-greater</validate>
<comment>Weight in kg to add for carts with 1 to 5 items.</comment>
</field>
<field id="packaging_cost_1_5" translate="label" type="text" sortOrder="121" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Packaging Cost (15 items)</label>
<validate>validate-number validate-zero-or-greater</validate>
<frontend_class>admin__control-text</frontend_class>
<comment>Price of packaging used for carts with 1 to 5 items.</comment>
</field>
<field id="packaging_weight_6_10" translate="label" type="text" sortOrder="122" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Packaging Weight (610 items)</label>
<validate>validate-number validate-zero-or-greater</validate>
<comment>Weight in kg to add for carts with 6 to 10 items.</comment>
</field>
<field id="packaging_cost_6_10" translate="label" type="text" sortOrder="123" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Packaging Cost (610 items)</label>
<validate>validate-number validate-zero-or-greater</validate>
<frontend_class>admin__control-text</frontend_class>
<comment>Price of packaging used for carts with 6 to 10 items.</comment>
</field>
<field id="packaging_weight_11_plus" translate="label" type="text" sortOrder="124" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Packaging Weight (11+ items)</label>
<validate>validate-number validate-zero-or-greater</validate>
<comment>Weight in kg to add for carts with more than 10 items.</comment>
</field>
<field id="packaging_cost_11_plus" translate="label" type="text" sortOrder="125" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Packaging Cost (11+ items)</label>
<validate>validate-number validate-zero-or-greater</validate>
<frontend_class>admin__control-text</frontend_class>
<comment>Price of packaging used for carts with more than 10 items.</comment>
</field>
</group>
</section>
</system>
</config>