<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Zen Cart Documentation – Modules</title>
    <link>https://docs.zen-cart.com/dev/modules/</link>
    <description>Recent content in Modules on Zen Cart Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="https://docs.zen-cart.com/dev/modules/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Dev: Shipping Modules</title>
      <link>https://docs.zen-cart.com/dev/modules/shipping_modules/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/shipping_modules/</guid>
      <description>
        
        
        &lt;style&gt;
pre &gt; code {
white-space: pre-wrap !important;
}
&lt;/style&gt;
&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;
&lt;p&gt;A shipping module applies a shipping cost to an order, based on some calculation method.  Each shipping module requires a minimum of two files:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A &lt;code&gt;class&lt;/code&gt; file: /includes/modules/shipping/&lt;code&gt;modulename&lt;/code&gt;.php&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;language&lt;/code&gt; file: /includes/languages/&lt;code&gt;current_language&lt;/code&gt;/modules/shipping/&lt;code&gt;lang.modulename&lt;/code&gt;.php (or simply &lt;code&gt;modulename.php&lt;/code&gt; in 1.5.7 and below).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The &lt;code&gt;language&lt;/code&gt; file contains all the translatable language text for the module while the &lt;code&gt;class&lt;/code&gt; file contains the module&amp;rsquo;s processing portion.  A shipping module can include one or more &lt;code&gt;methods&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;shipping-class&#34;&gt;Shipping Class&lt;/h2&gt;
&lt;p&gt;The class defined in &lt;code&gt;/includes/classes/shipping.php&lt;/code&gt; handles the loading of the shipping modules during Zen Cart storefront order-processing.&lt;/p&gt;
&lt;h2 id=&#34;anatomy-of-a-shipping-module&#34;&gt;Anatomy of a Shipping Module&lt;/h2&gt;
&lt;h3 id=&#34;class-names&#34;&gt;Class Names&lt;/h3&gt;
&lt;p&gt;A shipping method&amp;rsquo;s filename (e.g. &lt;code&gt;myshipping&lt;/code&gt;.php) is also used as its class name:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;myshipping&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Since an order&amp;rsquo;s shipping selection is stored as a string combining a shipping module&amp;rsquo;s name plus an underscore &lt;code&gt;(_)&lt;/code&gt; plus the shipping-method selected, a shipping module&amp;rsquo;s &lt;code&gt;name&lt;/code&gt; &lt;strong&gt;cannot&lt;/strong&gt; include an underscore!&lt;/p&gt;
&lt;h3 id=&#34;class-variables&#34;&gt;Class Variables&lt;/h3&gt;
&lt;p&gt;A shipping-module&amp;rsquo;s class definition includes, at a minimum, the following publicly-available variables:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable Name&lt;/th&gt;
&lt;th&gt;Variable Type&lt;/th&gt;
&lt;th&gt;Variable Usage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;code&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Contains the unique identifier for this shipping-module; normally set to the module&amp;rsquo;s class name.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;enabled&lt;/td&gt;
&lt;td&gt;bool&lt;/td&gt;
&lt;td&gt;Determines whether (true) or not (false) the module is enabled for use during the current storefront checkout.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Contains the title displayed for the shipping-module in both the Admin &lt;em&gt;Modules &amp;gt; Shipping&lt;/em&gt; and the storefront shipping quote. This variable is normally initialized during class construction to a (shopfront) language-file definition in the shipping module, e.g. MODULE_SHIPPING_&lt;em&gt;(module name)&lt;/em&gt;_TEXT_TITLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;description&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;A description of the module displayed only in the Admin,  &lt;em&gt;Modules &amp;gt; Shipping&lt;/em&gt;.  This variable is normally initialized during class construction to a (shopfront) language-file definition in the shipping module, e.g. MODULE_SHIPPING_&lt;em&gt;(module name)&lt;/em&gt;_TEXT_DESCRIPTION&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tax_class&lt;/td&gt;
&lt;td&gt;integer&lt;/td&gt;
&lt;td&gt;Identifies the &lt;code&gt;tax_class_id&lt;/code&gt; associated with the tax to be applied to this shipping module&amp;rsquo;s costs.  If the value is 0, the shipping cost is untaxed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tax_basis&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;When the shipping cost is taxed, identifies the basis for the tax computation: either &lt;strong&gt;Billing&lt;/strong&gt;, &lt;strong&gt;Shipping&lt;/strong&gt; or &lt;strong&gt;Store&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;class-methods&#34;&gt;Class Methods&lt;/h3&gt;
&lt;h4 id=&#34;constructor&#34;&gt;Constructor&lt;/h4&gt;
&lt;p&gt;A shipping-module&amp;rsquo;s class constructor performs initialization of its class variables and determines whether the shipping module is enabled for the current order.  Upon completion, the class variable &lt;code&gt;enabled&lt;/code&gt; identifies whether (&lt;em&gt;true&lt;/em&gt;) or not (&lt;em&gt;false&lt;/em&gt;) the module is to be enabled for storefront processing.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;myshipping&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;__construct&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;quote&#34;&gt;quote&lt;/h4&gt;
&lt;p&gt;This function determines the quote (i.e. the shipping cost) for either each of the module&amp;rsquo;s available methods or for the specified module sub-method, depending on the function&amp;rsquo;s &lt;code&gt;$method&lt;/code&gt; input value.  If no quote(s) is/are available, regardless the value provided for the &lt;code&gt;$method&lt;/code&gt; input, the shipping module sets its &lt;code&gt;quotes&lt;/code&gt; property to either &lt;code&gt;(bool)false&lt;/code&gt; or an empty array (&lt;code&gt;[]&lt;/code&gt;) and returns that value.  Otherwise, the quote information is returned in the class property&lt;code&gt;quotes&lt;/code&gt;: an associative array containing the following fields:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element Name&lt;/th&gt;
&lt;th style=&#34;text-align:center&#34;&gt;Required&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;Yes&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Set to the shipping method&amp;rsquo;s class variable &lt;code&gt;code&lt;/code&gt;, i.e. its class name.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;module&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;Yes&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Set to the shipping module&amp;rsquo;s language file title, e.g. MODULE_SHIPPING_&lt;em&gt;(module name)&lt;/em&gt;_TEXT_TITLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;methods&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;Yes&lt;/td&gt;
&lt;td&gt;array&lt;/td&gt;
&lt;td&gt;A simple, i.e. numerically-indexed, array of associative arrays.  See below for each entry&amp;rsquo;s definition.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tax&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;No&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;If the shipping cost is to be taxed, the value returned is the rate to be applied.  For instance, if the shipping is to be taxed at 8.37% this value will be 8.37; this value is normally that returned by call to the function &lt;code&gt;zen_get_tax_rate&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;icon&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;No&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;If an icon is associated with the shipping module, this value is set to contain an HTML &lt;code&gt;img&lt;/code&gt; tag (usually generated by call to &lt;code&gt;zen_image&lt;/code&gt;) that sources that icon.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;error&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;No&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;If an error results from the quote&amp;rsquo;s generation, this field contains the error-message to be displayed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Each element of the &lt;code&gt;methods&lt;/code&gt; array contains the following fields (depending on the shipping module, there might be additional fields):&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element Name&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Set to the shipping method&amp;rsquo;s class variable &lt;code&gt;code&lt;/code&gt;, i.e. its class name.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;A text string containing the method name, e.g. MODULE_SHIPPING_&lt;em&gt;(module name)&lt;/em&gt;_TEXT_WAY This text string is appended to the shipping module title to identify multiple methods within the same shipping module that may produce several quotes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cost&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;The cost associated with the current shipping method.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Basic &lt;code&gt;quote&lt;/code&gt; function processing is illustrated below.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;myshipping&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;quote&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$method&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;quotes&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;id&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;code&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;module&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;title&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;methods&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                   &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;id&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$method_name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                   &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$method_description&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                   &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;cost&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$method_cost&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;tax_class&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;quotes&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;tax&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;zen_get_tax_rate&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;tax_class&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;delivery&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;country&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;][&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;id&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;],&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;delivery&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;zone_id&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;empty&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;icon&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;))&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;quotes&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;icon&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;zen_image&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;icon&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;title&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;quotes&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h5 id=&#34;general-quote-all-methods&#34;&gt;General Quote (all methods)&lt;/h5&gt;
&lt;p&gt;When the &lt;code&gt;quote&lt;/code&gt; function is called with an input &lt;code&gt;$method&lt;/code&gt; value of &amp;rsquo;&amp;rsquo; (an empty string) and one or more quotes is available, the function returns an array containing quotes for &lt;strong&gt;all&lt;/strong&gt; methods it provides.  One &lt;code&gt;methods&lt;/code&gt; array entry is provided for each &lt;em&gt;method&lt;/em&gt; applicable to the current order.&lt;/p&gt;
&lt;p&gt;This form of the function call is used by the &lt;em&gt;Shipping Estimator&lt;/em&gt; and in the shipping-method selection provided by the &lt;code&gt;checkout_shipping&lt;/code&gt; page&amp;rsquo;s handling.&lt;/p&gt;
&lt;h5 id=&#34;specific-method&#34;&gt;Specific Method&lt;/h5&gt;
&lt;p&gt;When the &lt;code&gt;quote&lt;/code&gt; function is called with a non-empty value in the &lt;code&gt;$method&lt;/code&gt; input and the quote is available, the function returns an array containing the quote for &lt;em&gt;that specific method&lt;/em&gt;.&lt;/p&gt;
&lt;h4 id=&#34;check&#34;&gt;check&lt;/h4&gt;
&lt;p&gt;This function, called from admin-level &lt;em&gt;Modules &amp;gt; Shipping&lt;/em&gt; processing, returns a boolean value indicating whether (true) or not (false) the shipping-module is currently installed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;myshipping&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;check&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;isset&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;_check&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;))&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$check_query&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SELECT configuration_value FROM &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; WHERE configuration_key = &amp;#39;MODULE_SHIPPING_MYSHIPPING_STATUS&amp;#39; LIMIT 1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;_check&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$check_query&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;EOF&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;_check&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;install&#34;&gt;install&lt;/h4&gt;
&lt;p&gt;This function, called from admin-level &lt;em&gt;Modules &amp;gt; Shipping&lt;/em&gt; processing when the shipping module is initially installed, sets the module&amp;rsquo;s configuration into the Zen Cart database.  The example shows how to insert the common, required, configuration elements into the database for the &lt;code&gt;myshipping&lt;/code&gt; shipping module.  If your shipping method requires additional settings, add them here.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;myshipping&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;install&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES (&amp;#39;Enable Flat Shipping&amp;#39;, &amp;#39;MODULE_SHIPPING_MYSHIPPING_STATUS&amp;#39;, &amp;#39;True&amp;#39;, &amp;#39;Do you want to offer &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;my&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;shipping&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; shipping?&amp;#39;, 6, 0, &amp;#39;zen_cfg_select_option([\&amp;#39;True\&amp;#39;, \&amp;#39;False\&amp;#39;], &amp;#39;, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES (&amp;#39;Shipping Cost&amp;#39;, &amp;#39;MODULE_SHIPPING_MYSHIPPING_COST&amp;#39;, &amp;#39;5.00&amp;#39;, &amp;#39;The shipping cost for all orders using this shipping method.&amp;#39;, 6, 0, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES (&amp;#39;Tax Class&amp;#39;, &amp;#39;MODULE_SHIPPING_MYSHIPPING_TAX_CLASS&amp;#39;, &amp;#39;0&amp;#39;, &amp;#39;Use the following tax class on the shipping fee.&amp;#39;, 6, 0, &amp;#39;zen_get_tax_class_title&amp;#39;, &amp;#39;zen_cfg_pull_down_tax_classes(&amp;#39;, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES (&amp;#39;Tax Basis&amp;#39;, &amp;#39;MODULE_SHIPPING_MYSHIPPING_TAX_BASIS&amp;#39;, &amp;#39;Shipping&amp;#39;, &amp;#39;On what basis is Shipping Tax calculated. Options are&amp;lt;br&amp;gt;Shipping - Based on customers Shipping Address&amp;lt;br&amp;gt;Billing Based on customers Billing address&amp;lt;br&amp;gt;Store - Based on Store address if Billing/Shipping Zone equals Store zone&amp;#39;, 6, 0, &amp;#39;zen_cfg_select_option([\&amp;#39;Shipping\&amp;#39;, \&amp;#39;Billing\&amp;#39;, \&amp;#39;Store\&amp;#39;], &amp;#39;, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES (&amp;#39;Shipping Zone&amp;#39;, &amp;#39;MODULE_SHIPPING_MYSHIPPING_ZONE&amp;#39;, &amp;#39;0&amp;#39;, &amp;#39;If a zone is selected, only enable this shipping method for that zone.&amp;#39;, 6, 0, &amp;#39;zen_get_zone_class_title&amp;#39;, &amp;#39;zen_cfg_pull_down_zone_classes(&amp;#39;, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES (&amp;#39;Sort Order&amp;#39;, &amp;#39;MODULE_SHIPPING_MYSHIPPING_SORT_ORDER&amp;#39;, &amp;#39;0&amp;#39;, &amp;#39;Sort order of display.&amp;#39;, 6, 0, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;keys&#34;&gt;keys&lt;/h4&gt;
&lt;p&gt;This function, called during admin-level &lt;em&gt;Modules &amp;gt; Shipping&lt;/em&gt; processing, returns the database configuration &amp;ldquo;keys&amp;rdquo; associated with this shipping module.  The configuration values are listed for the shipping module in the order specified by the returned array.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;myshipping&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;keys&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_SHIPPING_MYSHIPPING_STATUS&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_SHIPPING_MYSHIPPING_COST&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_SHIPPING_MYSHIPPING_TAX_CLASS&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_SHIPPING_MYSHIPPING_TAX_BASIS&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_SHIPPING_MYSHIPPING_ZONE&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_SHIPPING_MYSHIPPING_SORT_ORDER&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;remove&#34;&gt;remove&lt;/h4&gt;
&lt;p&gt;This function, called during admin-level &lt;em&gt;Modules &amp;gt; Shipping&lt;/em&gt; processing to remove this shipping module, removes all database configuration keys associated with the shipping method.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;myshipping&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;remove&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      	&lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;DELETE FROM &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; WHERE configuration_key LIKE &amp;#39;MODULE\_SHIPPING\_MYSHIPPING\_%&amp;#39;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;standard-configuration-settings&#34;&gt;&lt;em&gt;Standard&lt;/em&gt; Configuration Settings&lt;/h3&gt;
&lt;p&gt;These common settings &lt;em&gt;should be&lt;/em&gt; provided by all shipping modules:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Configuration Name&lt;/th&gt;
&lt;th&gt;Configuration Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODULE_SHIPPING_MYSHIPPING_STATUS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set to either &amp;rsquo;true&amp;rsquo; or &amp;lsquo;false&amp;rsquo;, identifies whether or not the module is currently enabled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODULE_SHIPPING_MYSHIPPING_ZONE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If a zone is selected via the dropdown, the shipping module is enabled only for that zone.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODULE_SHIPPING_MYSHIPPING_TAX_CLASS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If the shipping is to be taxed, identifies the Tax Class associated with that tax&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODULE_SHIPPING_MYSHIPPING_TAX_BASIS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Choose the address-basis (usually one of &lt;code&gt;Shipping&lt;/code&gt;, &lt;code&gt;Billing&lt;/code&gt; or &lt;code&gt;Store&lt;/code&gt;) from which the tax is calculated.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODULE_SHIPPING_MYSHIPPING_SORT_ORDER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Identifies the sort-order to be used when displaying the currently-enabled shipping modules.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;tips--tricks&#34;&gt;Tips &amp;amp; Tricks&lt;/h3&gt;
&lt;p&gt;Procedurally, all configuration options for a shipping module names &lt;code&gt;myshipping&lt;/code&gt; should be named &lt;code&gt;MODULE_SHIPPING_&lt;/code&gt;MYSHIPPING&lt;code&gt;_*&lt;/code&gt;, as should all language constants for the module, to ensure uniqueness of those constants.&lt;/p&gt;
&lt;h3 id=&#34;converting-a-shipping-module-to-extend-zenshipping&#34;&gt;Converting a shipping module to extend ZenShipping&lt;/h3&gt;
&lt;p&gt;Since 2.1.0 shipping modules have been changed to extend the &lt;code&gt;ZenShipping&lt;/code&gt; base class.  To convert an older module to this new style, make the following changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change the class declaration to say &lt;code&gt;extends ZenShipping&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You won&amp;rsquo;t need to declare the standard variables anymore; &lt;code&gt;includes/classes/ZenShipping.php&lt;/code&gt; declares the following:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    protected $_check;
    public string $code;
    public string $description;
    public bool $enabled;
    public array $debug = [];
    public string $icon;
    public array $quotes;
    public $sort_order;
    public string $tax_basis;
    public $tax_class;
    public string $title;
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Be sure the following functions have signatures that are compatible with the base class:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;function quote($method = &amp;#39;&amp;#39;) : array {
function install() : void {
function remove() : void {
function keys() : array {
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Be sure any early return from &lt;code&gt;quote()&lt;/code&gt; returns an empty array.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h3&gt;
&lt;p&gt;Since the admin-level processing by &lt;em&gt;Modules &amp;gt; Shipping&lt;/em&gt; loads all &lt;code&gt;.php&lt;/code&gt; modules present in the &lt;code&gt;/includes/modules/shipping&lt;/code&gt; folder, make sure that any backup files in that directory have the &lt;code&gt;.php&lt;/code&gt; extension changed, e.g. &lt;code&gt;.php~&lt;/code&gt; or &lt;code&gt;.php.old&lt;/code&gt;, or errors will result during the admin loading.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Dev: Testing PayPal Modules</title>
      <link>https://docs.zen-cart.com/dev/modules/paypal_testing/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/paypal_testing/</guid>
      <description>
        
        
        &lt;h2 id=&#34;testing-paypal-transactions&#34;&gt;Testing PayPal Transactions&lt;/h2&gt;
&lt;p&gt;To test that PayPal is properly configured, you should test two methods:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Test by paying for something using a PayPal account (not the same account as your store).&lt;/li&gt;
&lt;li&gt;Test by paying for something with a credit card WITHOUT creating or using a PayPal account for payment.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All of these tests are to be performed in &amp;ldquo;production&amp;rdquo; or &amp;ldquo;live&amp;rdquo; mode. Do NOT use a Sandbox for testing. &lt;em&gt;(If you don&amp;rsquo;t know what this means, just proceed with testing.)&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;testing-using-a-paypal-account&#34;&gt;Testing using a PayPal account&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;You need a second PayPal account to do this. PayPal allows you to have two accounts per person: one personal and one business. For this test, you will pay for your purchase using funds on account in your personal PayPal account. You will be paying money to your store account (and refunding it).&lt;/li&gt;
&lt;li&gt;Create or select a product which has a low price, such as $0.01 or maybe $1.00.&lt;/li&gt;
&lt;li&gt;Purchase that product.&lt;/li&gt;
&lt;li&gt;During checkout, choose the lowest-price shipping option.&lt;/li&gt;
&lt;li&gt;During checkout, choose PayPal.&lt;/li&gt;
&lt;li&gt;After the Checkout Confirmation screen, you&amp;rsquo;ll be taken to the PayPal website to make payment.&lt;/li&gt;
&lt;li&gt;Enter your PERSONAL PayPal account username and password.&lt;/li&gt;
&lt;li&gt;Confirm the transaction.&lt;/li&gt;
&lt;li&gt;You will be returned to your store after completion.&lt;/li&gt;
&lt;li&gt;Verify that you received two or three emails: one from PayPal, one from the store to you as a customer, and one from the store to your &lt;em&gt;Admin&lt;/em&gt; address. If you did not receive the emails from the store within five minutes, then go to the Troubleshooting section of this document, above.&lt;/li&gt;
&lt;li&gt;Log in to your BUSINESS PayPal account and refund your test transaction.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;testing-without-a-paypal-account&#34;&gt;Testing without a PayPal account&lt;/h3&gt;
&lt;p&gt;To test payment by credit card without using a PayPal account, use these steps:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Before proceeding, find your credit cards, and select one that&amp;rsquo;s not already associated with any PayPal account !!)&lt;/em&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create or select a product in your store which has a low price, such as $0.01 or maybe $1.00.&lt;/li&gt;
&lt;li&gt;Purchase that product.&lt;/li&gt;
&lt;li&gt;During checkout, choose the lowest-price shipping option.&lt;/li&gt;
&lt;li&gt;During checkout, choose PayPal.&lt;/li&gt;
&lt;li&gt;After the Checkout Confirmation screen, you&amp;rsquo;ll be taken to the PayPal website to make payment.&lt;/li&gt;
&lt;li&gt;Underneath the login box for PayPal username/password, there is a link to Purchase without a PayPal account. Click that link.&lt;/li&gt;
&lt;li&gt;Fill in and/or confirm your personal information.&lt;/li&gt;
&lt;li&gt;Fill in your payment details including credit card number. (You should NOT use a credit card number that&amp;rsquo;s already associated with any PayPal account !!)&lt;/li&gt;
&lt;li&gt;Confirm the transaction.&lt;/li&gt;
&lt;li&gt;You will be returned to your store after completion.&lt;/li&gt;
&lt;li&gt;Verify that you received two or three emails: one from PayPal, one from the store to you as a customer, and one from the store to your &lt;em&gt;Admin&lt;/em&gt; address. If you did not receive the emails from the store within five minutes, then go to the Troubleshooting section of this document, above.&lt;/li&gt;
&lt;li&gt;Log in to your BUSINESS PayPal account and refund your test transaction.&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Dev: Order Total Modules</title>
      <link>https://docs.zen-cart.com/dev/modules/order_total_modules/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/order_total_modules/</guid>
      <description>
        
        
        &lt;style&gt;
pre &gt; code {
white-space: pre-wrap !important;
}
&lt;/style&gt;
&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Zen Cart &lt;em&gt;order-total&lt;/em&gt; modules are used to calculate (and display) sub-totals, taxes, totals and other intermediary values for an order. &lt;em&gt;Order-total&lt;/em&gt; modules can also calculate discounts or other subtractions from the amount a customer owes for an order. Each module includes, at a minimum, two files:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A &lt;code&gt;class&lt;/code&gt; file: /includes/modules/order_total/&lt;code&gt;my_order_total&lt;/code&gt;.php&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;language&lt;/code&gt; file: /includes/languages/&lt;code&gt;current_language&lt;/code&gt;/modules/order_total/&lt;code&gt;lang.my_order_total&lt;/code&gt;.php  (or simply &lt;code&gt;my_order_total.php&lt;/code&gt; in 1.5.7 and below)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The &lt;code&gt;language&lt;/code&gt; file contains all the translatable language text for the module while the &lt;code&gt;class&lt;/code&gt; file contains the module&amp;rsquo;s processing portion.&lt;/p&gt;
&lt;h2 id=&#34;order-total-class&#34;&gt;Order Total Class&lt;/h2&gt;
&lt;p&gt;The class defined in &lt;code&gt;/includes/classes/order_total.php&lt;/code&gt; handles the loading of the &lt;em&gt;order-total&lt;/em&gt; modules during Zen Cart storefront order-processing.&lt;/p&gt;
&lt;h2 id=&#34;anatomy-of-an-order-total-module&#34;&gt;Anatomy of an Order-Total Module&lt;/h2&gt;
&lt;p&gt;Each module can provide either &lt;em&gt;basic&lt;/em&gt; or &lt;em&gt;credit-class&lt;/em&gt; computations.  &lt;em&gt;Credit-class&lt;/em&gt; modules, like the Coupon (&lt;code&gt;ot_coupon&lt;/code&gt;) or Gift Certificate (&lt;code&gt;ot_gv&lt;/code&gt;) built into the Zen Cart base, can also operate on customer input during the checkout process.&lt;/p&gt;
&lt;h3 id=&#34;class-names&#34;&gt;Class Names&lt;/h3&gt;
&lt;p&gt;An &lt;em&gt;order-total&lt;/em&gt; module&amp;rsquo;s filename (e.g. &lt;code&gt;my_order_total&lt;/code&gt;.php) is also used as its class name:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Unlike &lt;em&gt;shipping&lt;/em&gt; modules, underscore characters &lt;code&gt;(_)&lt;/code&gt; &lt;strong&gt;are&lt;/strong&gt; allowed in &lt;em&gt;order-total&lt;/em&gt; module names!&lt;/p&gt;
&lt;h3 id=&#34;class-variables&#34;&gt;Class Variables&lt;/h3&gt;
&lt;p&gt;An &lt;em&gt;order-total&lt;/em&gt; module&amp;rsquo;s class definition includes the following publicly-available variables, depending on the &amp;ldquo;mode&amp;rdquo; in which the order-total processes:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable Name&lt;/th&gt;
&lt;th&gt;Variable Type&lt;/th&gt;
&lt;th style=&#34;text-align:center&#34;&gt;Basic&lt;/th&gt;
&lt;th style=&#34;text-align:center&#34;&gt;Credit Class&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;code&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td&gt;Contains the unique &amp;ldquo;code&amp;rdquo; identifying this order-total; normally set to the module&amp;rsquo;s class name.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td&gt;Identifies the title displayed for the module during the admin&amp;rsquo;s &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; processing.  This variable is normally initialized during class construction to a language-file definition.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;description&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td&gt;Identifies the description displayed for the module during the admin&amp;rsquo;s &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; processing.  This variable is normally initialized during class construction to a language-file definition.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sort_order&lt;/td&gt;
&lt;td&gt;integer&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td&gt;Identifies the &lt;em&gt;relative&lt;/em&gt; order in which this module is processed; the value configured must be unique within a store&amp;rsquo;s &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; settings.  This value is used by the main &lt;code&gt;order_total&lt;/code&gt; class (&lt;code&gt;/includes/classes/order_total.php&lt;/code&gt;), which loads all active modules in  ascending &lt;code&gt;sort_order&lt;/code&gt; sequence.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;output&lt;/td&gt;
&lt;td&gt;array&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td&gt;Contains the order-total&amp;rsquo;s &amp;ldquo;output&amp;rdquo;, a PHP associative array containing the information to be displayed in an &amp;ldquo;orders-totals&amp;rdquo; section, e.g. on the &lt;code&gt;checkout_confirmation page&lt;/code&gt;.  See below for details.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;credit_class&lt;/td&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;—&lt;/td&gt;
&lt;td style=&#34;text-align:center&#34;&gt;✓&lt;/td&gt;
&lt;td&gt;Identifies, if present and set to boolean &lt;em&gt;true&lt;/em&gt;, that the module &lt;strong&gt;is&lt;/strong&gt; a credit-class object.  When a module indicates that it performs &lt;code&gt;credit_class&lt;/code&gt; processing, that &lt;em&gt;order-total&lt;/em&gt; module provides additional class methods.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The order-total&amp;rsquo;s &lt;code&gt;output&lt;/code&gt; array contains the following fields:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Array &amp;ldquo;Key&amp;rdquo;&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Array &amp;ldquo;Value&amp;rdquo;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;The descriptive text to accompany the module&amp;rsquo;s addition to (or subtraction from) the order.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;value&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;The numeric value that the module applies to the order.  Positive values add; negative values subtract.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;text&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;The character-display value associated with the module&amp;rsquo;s numeric &lt;code&gt;value&lt;/code&gt;.  This value is normally created via call to the Zen Cart &lt;code&gt;$currencies&lt;/code&gt; class and represents the currency-formatted &lt;code&gt;value&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;class-methods&#34;&gt;Class Methods&lt;/h3&gt;
&lt;p&gt;The methods provided by an &lt;em&gt;order-total&lt;/em&gt; module depend on whether the module provides credit-class processing.&lt;/p&gt;
&lt;h4 id=&#34;basic-order-total-class-methods&#34;&gt;Basic Order-Total Class Methods&lt;/h4&gt;
&lt;p&gt;These methods are provided by all &lt;em&gt;order_total&lt;/em&gt; modules.&lt;/p&gt;
&lt;hr&gt;
&lt;h5 id=&#34;__construct&#34;&gt;__construct&lt;/h5&gt;
&lt;p&gt;A module&amp;rsquo;s class-constructor method performs initialization of its class variables and determines whether the module is enabled for the current order.  Upon completion, the class variable &lt;code&gt;enabled&lt;/code&gt; identifies whether (&lt;em&gt;true&lt;/em&gt;) or not (&lt;em&gt;false&lt;/em&gt;) the module is to be enabled for storefront processing.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;__construct&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;process&#34;&gt;process&lt;/h5&gt;
&lt;p&gt;This method, normally called during the &lt;em&gt;confirmation&lt;/em&gt; and &lt;em&gt;processing&lt;/em&gt; phases of the checkout process, performs the module&amp;rsquo;s special calculations.  If the module&amp;rsquo;s conditions are satisfied, the module adds (or subtracts) its cost from the order&amp;rsquo;s current total and, optionally, makes any tax-related adjustments to the order&amp;rsquo;s tax.&lt;/p&gt;
&lt;p&gt;Basic &lt;code&gt;process&lt;/code&gt; function processing is illustrated below.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;process&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$currencies&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$this_totals_conditions_are_satisified&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;info&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;total&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;+=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$my_cost&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;output&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[]&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;array&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;title&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;value&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$my_cost&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;text&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$currencies&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;format&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$my_cost&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;  &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;info&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;currency&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;],&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;info&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;currency_value&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;check&#34;&gt;check&lt;/h5&gt;
&lt;p&gt;This method, called from admin-level &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; processing, returns a boolean value indicating whether (true) or not (false) the module is currently installed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;check&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;isset&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;_check&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;))&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$check_query&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;SELECT configuration_value FROM &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; WHERE configuration_key = &amp;#39;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_STATUS&amp;#39; LIMIT 1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;_check&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$check_query&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;EOF&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;_check&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;install&#34;&gt;install&lt;/h5&gt;
&lt;p&gt;This method, called from admin-level &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; processing when the module is initially installed, sets the module&amp;rsquo;s configuration into the Zen Cart database.  The example shows how to insert the common, required, configuration elements into the database for the &lt;code&gt;my_order_total&lt;/code&gt; order-total module.  If your &lt;em&gt;order-total&lt;/em&gt; module requires additional settings, add them here.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;install&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES (&amp;#39;Enable My Order Total&amp;#39;, &amp;#39;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_STATUS&amp;#39;, &amp;#39;True&amp;#39;, &amp;#39;Do you want to enable &amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;my&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;order&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;total&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; processing?&amp;#39;, &amp;#39;6&amp;#39;, &amp;#39;0&amp;#39;, &amp;#39;zen_cfg_select_option(array(\&amp;#39;True\&amp;#39;, \&amp;#39;False\&amp;#39;), &amp;#39;, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;INSERT INTO &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES (&amp;#39;Sort Order&amp;#39;, &amp;#39;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_SORT_ORDER&amp;#39;, &amp;#39;400&amp;#39;, &amp;#39;Sort order of display.&amp;#39;, &amp;#39;6&amp;#39;, &amp;#39;0&amp;#39;, now())&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;keys&#34;&gt;keys&lt;/h5&gt;
&lt;p&gt;This method, called during admin-level &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; processing, returns the database configuration &amp;ldquo;keys&amp;rdquo; associated with this &lt;em&gt;order-total&lt;/em&gt; module.  The configuration values are displayed for the module &lt;em&gt;in the order specified by the returned array&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;keys&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;array&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_STATUS&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_SORT_ORDER&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;remove&#34;&gt;remove&lt;/h5&gt;
&lt;p&gt;This method, called during admin-level &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; processing to remove this module, removes all database changes (&lt;em&gt;normally&lt;/em&gt; just configuration keys) associated with the &lt;em&gt;order-total&lt;/em&gt; module.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;remove&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      	&lt;span style=&#34;color:#000&#34;&gt;$db&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;Execute&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;DELETE FROM &amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;TABLE_CONFIGURATION&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34; WHERE configuration_key LIKE &amp;#39;MODULE\_ORDER_TOTAL\_MY_ORDER_TOTAL\_%&amp;#39;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;credit-class-order-total-methods&#34;&gt;&lt;em&gt;Credit-Class&lt;/em&gt; Order-Total Methods&lt;/h4&gt;
&lt;p&gt;These methods are provided by an &lt;em&gt;order-total&lt;/em&gt; module that identifies itself as a &lt;em&gt;Credit Class&lt;/em&gt; module by setting its &lt;code&gt;$this-&amp;gt;credit_class&lt;/code&gt; variable to &lt;em&gt;true&lt;/em&gt;.  The &lt;em&gt;Coupon&lt;/em&gt; (ot_coupon) and &lt;em&gt;Gift Voucher&lt;/em&gt; (ot_gv) modules that are built into Zen Cart are examples of this type of &lt;em&gt;order-total&lt;/em&gt; module.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; While many of the &lt;em&gt;credit-class&lt;/em&gt; order-total modules include a method named &lt;code&gt;pre_confirmation_check&lt;/code&gt;, that method is never called during the checkout process and can be safely removed (if not used internally).&lt;/p&gt;
&lt;hr&gt;
&lt;h5 id=&#34;credit_selection&#34;&gt;credit_selection&lt;/h5&gt;
&lt;p&gt;This method, normally called during the &lt;em&gt;payment&lt;/em&gt; stage of the checkout process, returns an associative array containing information describing any form-related elements associated with the module&amp;rsquo;s processing.  If the module has no value to return for the current order, an empty array &lt;em&gt;should be&lt;/em&gt; returned.&lt;/p&gt;
&lt;p&gt;The module is given the opportunity to process these fields via future call to its &lt;code&gt;collect_posts&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;selection&lt;/code&gt; array returned uses the following structure:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field Name&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Normally set to the current module&amp;rsquo;s &amp;ldquo;code&amp;rdquo;, e.g. &lt;code&gt;ot_my_order_total&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;module&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Normally set to the current order-total&amp;rsquo;s descriptive name.  This value is displayed to the customer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;redeem_instructions&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Normally set to a language-constant, describes to the customer what the module does and how its processed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;checkbox&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Normally set to a text string containing HTML tags required for some special processing by the module.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;fields&lt;/td&gt;
&lt;td&gt;array&lt;/td&gt;
&lt;td&gt;A basic array containing one array-element for each customer-configurable input field used in this module&amp;rsquo;s processing.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Each &lt;code&gt;fields&lt;/code&gt; array element is also an associative array, using the following structure:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field Name&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;The text to display for any HTML &lt;code&gt;label&lt;/code&gt; associated with the current field.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;field&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;The HTML input tag used to gather this field&amp;rsquo;s input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tag&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Identifies, if non-blank, the value to be used for the &lt;code&gt;for&lt;/code&gt; attribute of the generated &lt;code&gt;label&lt;/code&gt; tag.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;credit_selection&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$input_field_id&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;disc-&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;code&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000&#34;&gt;$selection&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;array&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;id&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;code&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;module&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$this&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;title&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;redeem_instructions&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_REDEEM_INSTRUCTIONS&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;fields&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;array&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_ENTER_CODE&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;field&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;zen_draw_input_field&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;my_redeem_code&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;id=&amp;#34;&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$input_field_id&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;.&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;#34;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;tag&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$input_field_id&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$selection&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;collect_posts&#34;&gt;collect_posts&lt;/h5&gt;
&lt;p&gt;This method is called during the &lt;em&gt;payment&lt;/em&gt; and &lt;em&gt;confirmation&lt;/em&gt; stages of the checkout process, allowing a module to gather, inspect and process the &lt;code&gt;$_POST&lt;/code&gt; variables that it identified by its &lt;code&gt;credit_selection&lt;/code&gt; method&amp;rsquo;s return.  The method returns no value.&lt;/p&gt;
&lt;p&gt;If the &lt;em&gt;order-total&lt;/em&gt; module&amp;rsquo;s processing discovers an issue with the posted information, it is the module&amp;rsquo;s responsibility to display a message to the customer to describe the problem and redirect back to the &lt;code&gt;checkout_payment&lt;/code&gt; page to allow the form-input to be re-displayed and updated by the customer.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;collect_posts&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;update_credit_account&#34;&gt;update_credit_account&lt;/h5&gt;
&lt;p&gt;This method is called during the &lt;em&gt;processing&lt;/em&gt; stage of the checkout process by the &lt;code&gt;order&lt;/code&gt; class&amp;rsquo; &lt;code&gt;create_add_products&lt;/code&gt; function &lt;em&gt;for each product iteration&lt;/em&gt;, enabling an &lt;em&gt;order-total&lt;/em&gt; module to have &amp;ldquo;visibility&amp;rdquo; into the specific products that are in the order.&lt;/p&gt;
&lt;p&gt;The method&amp;rsquo;s purpose is to allow a module to decide whether the current product in the order should add something to a credit account.  For example, for the &lt;em&gt;Gift Voucher&lt;/em&gt; processing, a check is made to see if the product is a &lt;em&gt;Gift Voucher&lt;/em&gt; and then adds the GV amount to the customer&amp;rsquo;s GV account.  Another use would be to check to see if the product would give reward-points and add those points to the customer&amp;rsquo;s points/reward account&lt;/p&gt;
&lt;p&gt;The method&amp;rsquo;s input is the integer index into the current order&amp;rsquo;s &lt;code&gt;products&lt;/code&gt; array and the method returns no direct output.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;update_credit_account&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$i&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;global&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$order&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#c4a000&#34;&gt;products&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$i&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;][&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;Some Special Text&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;apply_credit&#34;&gt;apply_credit&lt;/h5&gt;
&lt;p&gt;This method is called during the &lt;em&gt;processing&lt;/em&gt; stage of the checkout process by the &lt;code&gt;order&lt;/code&gt; class&amp;rsquo; &lt;code&gt;create_add_products&lt;/code&gt; method just prior to that method&amp;rsquo;s completion.  The method takes no direct input and returns no direct value.&lt;/p&gt;
&lt;p&gt;The method&amp;rsquo;s purpose is to enable a module to test whether the customer has chosen to apply a credit amount to their order, reducing the order&amp;rsquo;s final total.  If so, the &lt;em&gt;order-total&lt;/em&gt; module&amp;rsquo;s processing performs some action, e.g. for a &lt;em&gt;Gift Voucher&lt;/em&gt;, the customer&amp;rsquo;s GV account is reduced by the amount applied to the order.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;apply_credit&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h5 id=&#34;clear_posts&#34;&gt;clear_posts&lt;/h5&gt;
&lt;p&gt;This method is called during the &lt;em&gt;processing&lt;/em&gt; stage of the checkout process and gives a module the opportunity to remove any session-related information for the just-completed order.  The method neither takes nor returns any direct values.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;my_order_total&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;extends&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;base&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;clear_posts&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#000&#34;&gt;unset&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$_SESSION&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;my_redeem_code&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;standard-configuration-settings&#34;&gt;&lt;em&gt;Standard&lt;/em&gt; Configuration Settings&lt;/h3&gt;
&lt;p&gt;These common settings &lt;em&gt;should be&lt;/em&gt; provided by all &lt;em&gt;order-total&lt;/em&gt; modules:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Configuration Name&lt;/th&gt;
&lt;th&gt;Configuration Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_STATUS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set to either &amp;rsquo;true&amp;rsquo; or &amp;lsquo;false&amp;rsquo;, identifies whether or not the module is currently enabled.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_SORT_ORDER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Identifies the sort-order to be used when displaying this module.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;tips--tricks&#34;&gt;Tips &amp;amp; Tricks&lt;/h3&gt;
&lt;p&gt;Procedurally, all configuration options for an &lt;em&gt;order-total&lt;/em&gt; module named &lt;code&gt;my_order_total&lt;/code&gt; should be named &lt;code&gt;MODULE_ORDER_TOTAL_MY_ORDER_TOTAL_*&lt;/code&gt;, as should all language constants for the module, to ensure uniqueness of those constants.&lt;/p&gt;
&lt;h3 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h3&gt;
&lt;p&gt;Since the admin-level processing by &lt;em&gt;Modules &amp;gt; Order Total&lt;/em&gt; loads all &lt;code&gt;.php&lt;/code&gt; modules present in the &lt;code&gt;/includes/modules/order_total&lt;/code&gt; folder, make sure that any backup files in that directory have the &lt;code&gt;.php&lt;/code&gt; extension are renamed (use &lt;code&gt;.php.bak&lt;/code&gt; or &lt;code&gt;.php~&lt;/code&gt;), or errors will result during the admin loading.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Dev: Cloning a Shipping Module</title>
      <link>https://docs.zen-cart.com/dev/modules/clone_shipping/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/clone_shipping/</guid>
      <description>
        
        
        &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; These instructions are for Zen Cart 1.5.8 and higher.  For Zen Cart 1.5.7 and lower, please see &lt;a href=&#34;https://docs.zen-cart.com/dev/code/modules/clone_shipping_157/&#34;&gt;Cloning a Shipping Module in 1.5.7 and below&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can create new Shipping Module by making a clone of the closest matching Shipping Module to what you are trying to do.&lt;/p&gt;
&lt;p&gt;As an example, we will consider the &lt;code&gt;flat&lt;/code&gt; shipping module.&lt;/p&gt;
&lt;p&gt;Shipping Modules have 2 parts:&lt;/p&gt;
&lt;p&gt;The code file is located in:&lt;br&gt;
&lt;code&gt;/includes/modules/shipping/flat.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The language file is located in:&lt;br&gt;
&lt;code&gt;/includes/languages/english/modules/shipping/lang.flat.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To clone this module, for example, to &lt;code&gt;flatfree.php&lt;/code&gt; you would:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;copy &lt;code&gt;flat.php&lt;/code&gt; to &lt;code&gt;flatfree.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;copy &lt;code&gt;lang.flat.php&lt;/code&gt; to &lt;code&gt;lang.flatfree.php&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Be sure the filename you choose does not have an underscore (&lt;code&gt;_&lt;/code&gt;) in it.&lt;/p&gt;
&lt;p&gt;Next, you need to change all occurrences of the strings &lt;code&gt;flat&lt;/code&gt; and &lt;code&gt;FLAT&lt;/code&gt; as follows:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OLD&lt;/th&gt;
&lt;th&gt;NEW&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;flat&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;flatfree&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;FLAT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;FLATFREE&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These identifiers are case sensitive.&lt;/p&gt;
&lt;p&gt;These words are written separately or within the constants such as:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class flat {
... 
$this-&amp;gt;code = &amp;#39;flat&amp;#39;;
... 
$this-&amp;gt;title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;becomes&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class flatfree {
...
$this-&amp;gt;code = &amp;#39;flatfree&amp;#39;;
...
$this-&amp;gt;title = MODULE_SHIPPING_FLATFREE_TEXT_TITLE;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Be sure to make this change in the &lt;code&gt;remove()&lt;/code&gt; function as well.&lt;/p&gt;
&lt;p&gt;Once you have cloned the module then you can alter how it calculates shipping to the method that you need.   This calculation is done in the &lt;code&gt;quote()&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Flat does not have complicated logic to compute a quote; it
uses a single figure.&lt;/p&gt;
&lt;p&gt;To see examples of quote calculations that are more complex, you might look
at the &lt;code&gt;items.php&lt;/code&gt; Shipping Module.&lt;/p&gt;
&lt;p&gt;Cloning or creating a Shipping Module to function the way you need it is not too difficult if you just work through the steps on paper then recreate the same steps within the &lt;code&gt;quote()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;These forum threads might also give you ideas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.zen-cart.com/showthread.php?26216-Additional-Shipping-Option-Flat-Rate-Per-Item&#34;&gt;Thread: Additional Shipping Option - Flat Rate Per Item&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.zen-cart.com/showthread.php?41751-How-do-I-set-2-flat-shipping-rates-to-2-different-zone&#34;&gt;Thread: How do I set 2 flat shipping rates to 2 different zone?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Dev: Cloning a Shipping Module (1.5.7 and below)</title>
      <link>https://docs.zen-cart.com/dev/modules/clone_shipping_157/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/clone_shipping_157/</guid>
      <description>
        
        
        &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; These instructions are for Zen Cart 1.5.7 and below.  For Zen Cart 1.5.8 and higher, please see &lt;a href=&#34;https://docs.zen-cart.com/dev/code/modules/clone_shipping/&#34;&gt;Cloning a Shipping Module&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can create new Shipping Module by making a clone of the closest matching Shipping Module to what you are trying to do.&lt;/p&gt;
&lt;p&gt;As an example, we will consider the &lt;code&gt;flat&lt;/code&gt; shipping module.&lt;/p&gt;
&lt;p&gt;Shipping Modules have 2 parts:&lt;/p&gt;
&lt;p&gt;The code file is located in:&lt;br&gt;
&lt;code&gt;/includes/modules/shipping/flat.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The language file is located in:&lt;br&gt;
&lt;code&gt;/includes/languages/english/modules/shipping/flat.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To clone this module, for example, to &lt;code&gt;flatfree.php&lt;/code&gt; you would copy the two &lt;code&gt;flat.php&lt;/code&gt; files to &lt;code&gt;flatfree.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Be sure the filename you choose does not have an underscore (&lt;code&gt;_&lt;/code&gt;) in it.&lt;/p&gt;
&lt;p&gt;Next, you need to change all occurrences of the strings &lt;code&gt;flat&lt;/code&gt; and &lt;code&gt;FLAT&lt;/code&gt; as follows:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OLD&lt;/th&gt;
&lt;th&gt;NEW&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;flat&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;flatfree&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;FLAT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;FLATFREE&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These identifiers are case sensitive.&lt;/p&gt;
&lt;p&gt;These words are written separately or within the constants such as:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class flat {
... 
$this-&amp;gt;code = &amp;#39;flat&amp;#39;;
... 
$this-&amp;gt;title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;becomes&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class flatfree {
...
$this-&amp;gt;code = &amp;#39;flatfree&amp;#39;;
...
$this-&amp;gt;title = MODULE_SHIPPING_FLATFREE_TEXT_TITLE;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Once you have cloned the module then you can alter how it calculates shipping to the method that you need.   This calculation is done in the &lt;code&gt;quote()&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Flat does not have complicated logic to compute a quote; it
uses a single figure.&lt;/p&gt;
&lt;p&gt;To see examples of quote calculations that are more complex, you might look
at the &lt;code&gt;items.php&lt;/code&gt; Shipping Module.&lt;/p&gt;
&lt;p&gt;Cloning or creating a Shipping Module to function the way you need it is not too difficult if you just work through the steps on paper then recreate the same steps within the &lt;code&gt;quote()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;These forum threads might also give you ideas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.zen-cart.com/showthread.php?26216-Additional-Shipping-Option-Flat-Rate-Per-Item&#34;&gt;Thread: Additional Shipping Option - Flat Rate Per Item&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.zen-cart.com/showthread.php?41751-How-do-I-set-2-flat-shipping-rates-to-2-different-zone&#34;&gt;Thread: How do I set 2 flat shipping rates to 2 different zone?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Dev: Adding Configuration Values to a Module</title>
      <link>https://docs.zen-cart.com/dev/modules/adding_config/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/adding_config/</guid>
      <description>
        
        
        &lt;p&gt;Over time, you may find that the initial set of configuration values for a module is not adequate.  For example, you want to add a new feature, which requires its own configuration, or a vendor (a shipper or a bank) may require additional data to authenticate the account.&lt;/p&gt;
&lt;h2 id=&#34;warning-on-missing-configuration-values&#34;&gt;Warning on Missing Configuration Values&lt;/h2&gt;
&lt;p&gt;The old way of handling this situation was to ask the user to REMOVE the module, and then run the INSTALL again.&lt;/p&gt;
&lt;p&gt;In the USPS plugin, for example,&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;            if (MODULE_SHIPPING_USPS_VERSION != self::USPS_CURRENT_VERSION || count($this-&amp;gt;keys()) != $chk_sql-&amp;gt;RecordCount()) {
                $this-&amp;gt;title .= &amp;#39;&amp;lt;span class=&amp;#34;alert&amp;#34;&amp;gt;&amp;#39; . &amp;#39; - Missing Keys or Out of date you should reinstall!&amp;#39; . &amp;#39;&amp;lt;/span&amp;gt;&amp;#39;;
                $this-&amp;gt;enabled = false;
            }
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Remove and re-install was annoying for users, and error prone in cases where modules had large and complicated configuration.&lt;/p&gt;
&lt;h2 id=&#34;dynamically-handling-missing-configuration-values&#34;&gt;Dynamically Handling Missing Configuration Values&lt;/h2&gt;
&lt;p&gt;To detect and recover from this condition, the newer way is to simply add the configuration settings in the &lt;code&gt;check()&lt;/code&gt; method.   (Note that some older modules use the &lt;code&gt;keys()&lt;/code&gt; method for this purpose; either method is acceptable.)&lt;/p&gt;
&lt;p&gt;Care must be taken to ensure that the module is already installed (check the &lt;code&gt;_STATUS&lt;/code&gt; setting) so that the config won&amp;rsquo;t be added twice when an the &lt;code&gt;install&lt;/code&gt; method is run.&lt;/p&gt;
&lt;p&gt;From paypalwpp.php line 704 in Zen Cart 1.5.7d,&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    if (defined(&amp;#39;MODULE_PAYMENT_PAYPALWPP_STATUS&amp;#39;)) {
      global $db;
      if (!defined(&amp;#39;MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON&amp;#39;)) {
        $db-&amp;gt;Execute(&amp;#34;INSERT INTO &amp;#34; . TABLE_CONFIGURATION . &amp;#34; (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES (&amp;#39;Express Checkout Shortcut Button&amp;#39;, &amp;#39;MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON&amp;#39;, &amp;#39;On&amp;#39;, &amp;#39;The Express Checkout Shortcut button shows up on your shopping cart page to invite your customers to pay using PayPal without having to give all their address details on your site first before selecting shipping options.&amp;lt;br /&amp;gt;It has been shown to increase sales and conversions when enabled.&amp;lt;br /&amp;gt;Default: On &amp;#39;, &amp;#39;6&amp;#39;, &amp;#39;25&amp;#39;, &amp;#39;zen_cfg_select_option(array(\&amp;#39;On\&amp;#39;, \&amp;#39;Off\&amp;#39;), &amp;#39;, now())&amp;#34;);
      }
...
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Dev: Cloning a Payment Module</title>
      <link>https://docs.zen-cart.com/dev/modules/clone_payment/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/clone_payment/</guid>
      <description>
        
        
        &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; These instructions are for Zen Cart 1.5.8 and above.  For Zen Cart 1.5.7 and below, please see &lt;a href=&#34;https://docs.zen-cart.com/dev/code/modules/clone_payment_157/&#34;&gt;Cloning a Payment Module in 1.5.7 and below&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can create new Payment Module by making a clone of the closest matching Payment Module to what you are trying to do.&lt;/p&gt;
&lt;p&gt;As an example, we will consider the &lt;code&gt;moneyorder&lt;/code&gt; payment module.&lt;/p&gt;
&lt;p&gt;Payment Modules have 2 parts:&lt;/p&gt;
&lt;p&gt;The code file is located in:&lt;br&gt;
&lt;code&gt;/includes/modules/payment/moneyorder.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The language file is located in:&lt;br&gt;
&lt;code&gt;/includes/languages/english/modules/payment/lang.moneyorder.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To clone this module, for example, to &lt;code&gt;venmo.php&lt;/code&gt; you would:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;copy &lt;code&gt;moneyorder.php&lt;/code&gt; to &lt;code&gt;venmo.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;copy &lt;code&gt;lang.moneyorder.php&lt;/code&gt; to &lt;code&gt;lang.venmo.php&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Be sure the filename you choose does not have an underscore (&lt;code&gt;_&lt;/code&gt;) in it.&lt;/p&gt;
&lt;p&gt;Next, you need to change all occurrences of the strings &lt;code&gt;moneyorder&lt;/code&gt; and &lt;code&gt;MONEYORDER&lt;/code&gt; as follows:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OLD&lt;/th&gt;
&lt;th&gt;NEW&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;moneyorder&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;venmo&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MONEYORDER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;VENMO&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These identifiers are case sensitive.&lt;/p&gt;
&lt;p&gt;These words are written separately or within the constants such as:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class moneyorder {
... 
$this-&amp;gt;code = &amp;#39;moneyorder&amp;#39;;
... 
$this-&amp;gt;title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE; 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;becomes&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class venmo {
...
$this-&amp;gt;code = &amp;#39;venmo&amp;#39;;
...
$this-&amp;gt;title = MODULE_PAYMENT_VENMO_TEXT_TITLE;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Be sure to make this change in the &lt;code&gt;remove()&lt;/code&gt; function as well.&lt;/p&gt;
&lt;p&gt;These plugins might also help:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.zen-cart.com/downloads.php?do=file&amp;amp;id=1930&#34;&gt;Optional Payment Method&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Dev: Cloning a Payment Module (1.5.7 and below)</title>
      <link>https://docs.zen-cart.com/dev/modules/clone_payment_157/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.zen-cart.com/dev/modules/clone_payment_157/</guid>
      <description>
        
        
        &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; These instructions are for Zen Cart 1.5.7 and below.  For Zen Cart 1.5.8 and higher, please see &lt;a href=&#34;https://docs.zen-cart.com/dev/code/modules/clone_payment/&#34;&gt;Cloning a Payment Module&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can create new Payment Module by making a clone of the closest matching Payment Module to what you are trying to do.&lt;/p&gt;
&lt;p&gt;As an example, we will consider the &lt;code&gt;moneyorder&lt;/code&gt; payment module.&lt;/p&gt;
&lt;p&gt;Payment Modules have 2 parts:&lt;/p&gt;
&lt;p&gt;The code file is located in:&lt;br&gt;
&lt;code&gt;/includes/modules/payment/moneyorder.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The language file is located in:&lt;br&gt;
&lt;code&gt;/includes/languages/english/modules/payment/moneyorder.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To clone this module, for example, to &lt;code&gt;venmo.php&lt;/code&gt; you would copy the two &lt;code&gt;moneyorder.php&lt;/code&gt; files to &lt;code&gt;venmo.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Be sure the filename you choose does not have an underscore (&lt;code&gt;_&lt;/code&gt;) in it.&lt;/p&gt;
&lt;p&gt;Next, you need to change all occurrences of the strings &lt;code&gt;moneyorder&lt;/code&gt; and &lt;code&gt;MONEYORDER&lt;/code&gt; as follows:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OLD&lt;/th&gt;
&lt;th&gt;NEW&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;moneyorder&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;venmo&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MONEYORDER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;VENMO&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These identifiers are case sensitive.&lt;/p&gt;
&lt;p&gt;These words are written separately or within the constants such as:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class moneyorder {
... 
$this-&amp;gt;code = &amp;#39;moneyorder&amp;#39;;
... 
$this-&amp;gt;title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE; 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;becomes&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;class venmo {
...
$this-&amp;gt;code = &amp;#39;venmo&amp;#39;;
...
$this-&amp;gt;title = MODULE_PAYMENT_VENMO_TEXT_TITLE;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;These plugins might also help:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.zen-cart.com/downloads.php?do=file&amp;amp;id=1930&#34;&gt;Optional Payment Method&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
