|
|
These programs are protected by copyright and may not be resold or distributed. Please see the copyright notice for more information on your end user license for this program. What's In This Document: Use this as a reference for the settings in mof.conf. Settings are listed and explained in the order they appear in the mof.conf configuration file. We've also included a How Do I list for some of the frequently asked questions about settings. For beginners information on how to work with Perl configuration files, see Docs : AboutConfigurations.html.
Note: The Formatting settings are in the Docs > Formatting.html
Use: Allows you to switch between troubleshooting messages for installation feedback and customer friendly error messages when ready to go live 0 Troubleshooting mode only, messages are not customer friendly. If you are running in ?test mode set ERRORMODE to zero for troubleshooting tips and info. Security Warning: you must always set ERRORMODE to 1 or 2 when ready to go live, else those operating the cart from the web can see all your troubleshooting information when they get an error. 1 Return a Generic customer friendly error message for all errors. 2 Redirect all Error messages to a custom page as defined in the $ErrMsgRedirect URL $ERRORMODE = [0/1/2];
Use: You have a central page like a store portal, index page, or table of contents page, and you want to always send a customer there when they click on MOF's various continue shopping buttons and links. If you want continue shopping to be a fixed link set this to a valid URL Comment out or set to NULL to disable this setting If you need to specify a Returning URL Use the variable "RET_URL" and submit as hidden input from any MOF input page, and MOF will pick that up as the Returning URL, and adjust the "continue shopping" button to that URL <INPUT type="hidden" name="RET_URL" value="http://www.url ..">
Use: Allows you to define exact domains, or exact pages that are authorized to submit INPUT data to the cart, preventing anyone from tampering with product input, changing prices on your products, submitting bogus products that you don't sell. Security Warning: You must have both of these settings enabled and operating correctly to prevent any tampering with your product INPUT. See this support notice. 1 Enable POST only input to be accepted into the cart Provides a list of valid domains that have permission to interact with the cart A page from anywhere can submit INPUT data to your cart
Use: Settings necessary for MOF's file operations. These directories store scratch information on orders and shipping information for each customer. Where are the two main scripts located ? Where is the MOF Front End cart script ? Where is the MOF Back End Payment processing script ? Where are the data scratch directories located ? An example of an absolute path for UNIX/Linux $datadirectory = '/home/sites/site14/orderdata/'; An example using the cgi Environment Document Root variable $datadirectory = $ENV{DOCUMENT_ROOT} . '/orderdata/'; An example of an absolute path for NT $datadirectory = 'D:\HTTPd\yoursite\orderdata\\'; What file name extension to use for scratch files ? $data_extension = 'order'; Security Warning: It's best to locate these scratch directories outside your public web space, above the www or public web access via the web server. Some servers will not allow you to create directories in your account root, and so your only option is to locate these directories inside the www or public web access areas. If you do this then you should password protect these directories, to allow only the scripts to access them, and prevent any web access to the data in these directories. These directories don't contain any billing information, but they do contain shipping addresses that are remembered. For more on this see: Docs > SecurityIssues.html section.
Use: Settings necessary for MOF's file operations. These templates allow you to custom design the look and feel of all the cart screens. For help on creating your own templates see: Docs > Formatting.html MOF uses nine templates to present the various cart screens that you see in traveling through the cart: viewing the cart, validation messages, error messages, shipping info, order summary, billing info, order confirmation, invoice copy. The templates are standard HTML web pages, with a special insertion marker embedded as an HTML comment. Where are the 4 templates for the Front End cart screens ? Note: UNIX/Linux the path opens with forward slash and ends with the filename.html Template for the View Cart or Ordering online is easy screen Template for the Validation Message screen, Please Try Again message Template for the Shipping, insurance, tax, discount coupons information screen Template for the Order summary screen What is the Insertion Marker to look for ? $insertion_marker = '<!--MOF-INPUT-AREA-->';
Use: Some various settings for formatting date, time, currency, weight, delimiter GMT offset time in seconds: Formatting the date-time line What to do with that long Order ID number ? What currency symbol to use ? What weight symbol to use ? What delimiter to use for product input field separation What eMail address is listed on ERRORMODE 2 messages ?
Use: Allows you to set the carts behavior with regard to cookies, keeping carts, keeping shipping info, incrementing duplicate items, handling zero amount orders, allowing fractions, sub total display How long (in hours) to hold/initialize cart ? Note: We recommend remembering your customers. The cart simply works more professionally that way. If a customer doesn't finalize the order, their items are still in the cart the next time they visit the site. This could even be used with a simple SSI or PHP script that checks the cookie and lets the customer know they still have UN-purchased items in their cart. How long (in hours) to hold/initialize Order summary info ? Again, we recommend keeping this to a healthy setting. It provides MOF with the ability to remember your customers' shipping information, so they don't have to keep entering their shipping address each time they use your cart. Redirect message if Browser refuses cookies Does Add to Cart increment duplicate items ? Allow Fractions in Quantity Boxes Note: When enabled, this setting will always trigger a sub total line for each item in the cart, so that computations will be correct. The product's original price as set in the input is always assumed to be one unit. Hence, apples input price is $ 0.35 (per pound), then someone can enter 0.5 of that item and the correct sub total will compute, purchasing 1/2 pound of apples. List the Main Item in the sub total lines ? Note: You may want to disable this if using HTML [pseudo tags] in the Item Field input. Otherwise, the HTML will show up in the sub total line, as in src images, etc. Zero based invoice bypass Note: This setting only passes the Front End request. The final approval to bypass the Billing information screen is controlled by the Zero based invoice bypass companion settings in mofpay.conf
In the example settings above, in both mof.conf and mofpay.conf, a final order = $ 0.00 amount will not stop on the Billing information screen, but proceed directly to the Order confirmation screen without asking for any billing information from the customer, since no payment is needed. If you wanted the comments box to display, then leave the mofpay.conf settings as in the above example, but disable the $zp_passthrough in mof.conf. The customer will stop on the Billing information screen, but no method, address, etc, will be requested.
Use: Allows you to associate dropboxes, checkboxes, text boxes, textareas, radio buttons, with your products for things like size, color, shape, descriptions, extra costs, etc. How It Works: MOF can accept and associate input from the entire Forms collection. When you build the FORM for a product's extra input, you assign each INPUT field a name. In order for MOF to locate and correctly group the input with your product, the field names you use in your Forms must be declared in this section of settings. Having Problems ? If you have extra user input in your Forms, but it does not show up in the cart, then you probably do not have this area of settings correctly configured to match your site Forms and input. For help on this see: Docs > BuildingInputPages.html. For help on Perl syntax for these settings, see: Docs > AboutConfigurations.html.
A. Create the Master List of all extra Field Names Notes:
B. List any Field Names that will be required input Notes:
C - 1. List any Field Names that will be Price Adjusting Notes:
C - 2. List any Field Names that will be Direct Price Input Notes:
How to allow Direct Price Input as main price Notes: This setting identifies a special field name that you can use in your Forms to tell MOF you are sending direct price input for the product. Do not declare this field name in any of the array settings above. Once defined, it becomes a MOF reserved field name, and MOF will attempt to adjust main price when this field is present. Set to Null to disable. $price_input = 'PriceInput'; Will you allow 0.00 amounts in direct price input ? Note: For this to work on a required field, list the field in the required list How to format the extra user input ? Note: For most installations, you'll want this turned on. If you are doing some creative embedding of HTML [pseudo tags] in the input and you don't want MOF messing with your formatting, then disable this setting, and it's all yours. Our Example_TextArea.html input looks much cleaner with makelist formatting turned off. What order to sort the extra user input ? Note: Only the Keys are sorted, not values. So you can use naming schemes like 'aName' 'bName' to get a sort and the Title description header will show not the field name
Use: Allows you to set which fields are displayed and required for Shipping Destination on the Shipping, insurance, tax, and discount screen For help with Perl syntax for this setting, see: Docs > AboutConfigurations.html. Syntax: How It Works:
Example: %shipping_destination_fields = ( This defines that two fields will display. The First Name Field requires at least 2 characters entered, and the Middle Name Field is not required. No other fields will display. Master List: Shipping Destination fields
You can have up to 15 fields for Shipping Destination.
Use: Allows for external lists to populate the Country and State/Province dropboxes, and provides settings to manage the validation rules between Region and State/Province combinations. What list to use for dropbox ? Note: We recommend using a dropbox if you are doing any shipping, tax, insurance computations. A textbox allows for too much input variation to be reliable in matching. How to validate Region and State/Province combinations ? What countries (as listed in countries.txt) have corresponding State/Province listings in states.txt ? In our package example, the states.txt list has all the States and Provinces listed for United States and Canada. Similarly, the corresponding setting is: force state selection via the State/Prov dropbox for these countries
Show this message if using both Region and State/Prov input: The Country List The countries.txt list in MOF's package was carefully assembled to work round the globe, listing preferred Country names. It is a compilation of Amazon.com's Country List (as of 4-5-2001), USPS countries for Air Shipping and Global Priority Mail (March 2001), and the ISO Countries. The list contains exact matches for USPS Global Priority Mail "Destination Countries," in case you're trying to match USPS shipping tables. The list has long names so they appear with the full country name in all printable areas. We have United-States set as the default country to be listed, as per the "selected" attribute, which you can reset to any country. If you do not use the "selected" attribute, then the first country on the list will be the default. Make sure the first Country in the list has a value = "" (null). Use hyphens <option value=name-must-be-hyphenated> for spaces in the <option value> but not in the printable display text. If you do not ship globally, then simply delete Countries that you do not ship to and they will disappear from the Country dropbox. The State-Province List The states.txt list in MOF's package has all US states and Canadian Provinces listed by their 2 letter ISO code. It also has the first value of value="" (null), which is the default selection, because the "selected" attribute is not present. Important: <option value=""> must be left as the first or "selected" option for validation to work correctly. Rules for making your own lists
Browser Note: Here's some browser specific stuff: The Mac Internet Explorer v5+ must have first option defined exactly this way in the list file:
<option value="">Select State The Mac IE browser will read the "Select State" on the right side as the value if you do not specify (null) as a set of double quotes for this option. But be careful not to enclose any of the other <option>s in your list with quotes, else the Mof script cannot process the pattern matching it needs to do to remember what was selected. Note: MOF attempts to recall and use any saved shipping information, so if you change lists, then delete all the scratch files in ../orderinfo/. This will reinitialize everyone's shipping information, and prevent any conflicts between old data and new lists.
Use: You can set up simple discount schemes here. Note: If you need more complex computations for this feature, consult the general online support area for custom code packages, or, with a valid license (support levels only please), just send an email to: support@merchantpal.com and I can probably help. Syntax:
Notes:
Examples:
Discount 5% of subtotal (amount) on the penny
Discount 5% of subtotal (amount) default (per dollar)
Discount 2.5% of subtotal for each $ 100.00 spent
Discount $ 1.25 for each 10 products purchased
Do not use any primary discounts
Defer to custom code for discount
Note: If you enable custom computations, you will get the pre installed custom example:
Note: If this setting isn't set up correctly, the worst that can happen is MOF will compute a zero. MOF is set to compute zeros on anything it sees a setting for, but can't figure out what rules are being sent to it. When zeros are computed for a setting, then the item is not added to the overall computation math. Note: If you set an increment that is greater than the initial price or products one actually purchases, then no discount will compute, because the increment condition has not been satisfied.
Use: Allows you to set up a simple system where you can issue coupon numbers (stored in a flatfile) that customers can use for discounts when they shop on your site. How It Works: If enabled, MOF will prompt shoppers to enter their coupon numbers on the Shipping, insurance, tax, and discount coupons screen. If the coupon number is matched in the coupons.txt list, then MOF applies the discount as set for that coupon. How to compute the discount ? percent : associated rate in coupon file is a percent multiple, X percent of subtotal Where is the coupon file ? Note: set the /full/path/to/file/coupons.txt if the file is not located in the native directory your scripts are running in Security Warning: make sure the coupons.txt file is secure if you use one. That means keep it out of range of any public web access If you must locate it inside a public web area, then password protect the file, or give file a name no one can guess, to make it difficult for web visitors to peek
in it. Check that you are not able to peek into the coupon.txt file from your web browser. How to set up the coupon file Important: edit the coupons.txt file with a plain ASCII editor, and make sure there are no extra lines at the end of the file, else the coupon computation fails. Your very last coupon entry should have no extra blank lines after it Set up the coupons.txt like the packaged example
Note: Affiliate Rate belongs to an old referral tracking system, RTS (Referral Tracking System) v2.0, which should still work with MOF ver 2.4, and can be found in the MOFcart developer's area. We have replaced the old RTS v2.0 with ARES v2.4, an automated, web based Affiliate Referral Earnings System. If you use ARES, you cannot use the manually issued coupon numbers. What default coupon to display for New customers
? This sets the default coupon code to display when someone enters the Shipping information, insurance, tax, discount coupons screen. This allows you to give away a particular coupon number, with a rate that you designate in the coupon file, to anyone that comes to your site and doesn't have a Real Coupon number. If you don't want to give away a coupon number, then just set this to "None." It's best to set this to something, because that field won't validate without something in it. It doesn't have to be a valid coupon number to clear the form, but it does have to be a valid coupon number to compute any discount. Notes:
More ideas for using this feature: You can do a mail out for a particular promotional and assign a designated discount rate for that campaign. Set up coupon names to match some question you ask your customers. What's the best site on the net? Answer: www.yoursite.com. If they put in "yoursite" then give them a discount. Or, who sent you to this site? Answer: Roger. If they put in roger, give them a discount
Use: ARES v2.4 (Affiliate Referral Earnings System) is a powerful companion affiliate program that runs exclusively with MOF. It is a fully automated, web based, two tier system that provides purchase tracking for affiliate earnings, representative earnings, customer discounts, real time sign-up, web based Admin, web based account management for affiliates, and more. It is an exclusive MOFcart companion program, available in the MOFcart developer's area for anyone licensed at the developer's level. The best way to see it in operation is to sign up as an affiliate with MerchantPal.com services, where all MOFcart products are distributed. That will give you a tour of the system, and if you decide to actually use your affiliate links, you can earn real money. You won't be able to access the Admin control panel, but you can view a complete set of the ARES v2.4 documentation here, which may give you an idea of how the Admin works The ARES v2.4 installation docs explain how to make these settings in mof.conf $use_ARES_default_number = ('percent'); Note: You cannot use both ARES and the Coupon file feature together. ARES takes control of the secondary discount routines and overrides any other coupon files you may have. You must have ARES settings disabled to use the manual coupon file as a secondary discount. If you are using ARES, we recommend that you set up a catch all default affiliate number (yourself) to handle any orphan transactions. This makes ARES a powerful tool to track all ordering activity on the site, not just click through affiliate activity. Some folks might want to set up the system just to track ordering activity without collecting real affiliates. $use_ARES_default_number = 'YourAffiliateNumber';
Use: You can set up a simple handling fees scheme here. Note: If you need more complex computations for this feature, consult the general online support area for custom code packages, or, with a valid license (support levels only please), just send an email to: support@merchantpal.com and I can probably help. Syntax:
Notes:
Examples: Compute Handling
of 5% of subtotal after any discounts on the penny
Compute Handling
of 5% of subtotal after any discounts default (per dollar)
Compute Handling
of 2.5% of subtotal after any discounts for each $ 100.00 spent
Compute Handling
of $ 1.25 of subtotal after any discounts for each 10 products purchased
Don't compute any handling charges
Defer to custom code for handling charges
Note: If you enable custom computations, you will get the pre installed custom example:
More ideas for using this feature: The handling fee computations are a good candidate for adding a special line item in the summary, like a "Service Fee," etc. Enable custom computations, and you can reword the line item display. With some creativity, you could even tie it to only certain items, etc.
Use: Allows you to set up a dropbox or radio button group of options on the Shipping, insurance, tax, coupon discount screen for shipping insurance rates and options Note: If you need more complex computations for this feature, consult the general online support area for custom code packages, or, with a valid license (support levels only please), just send an email to: support@merchantpal.com and I can probably help. For help with Perl syntax for this setting, see: Docs > AboutConfigurations.html. Syntax: How it works: This feature is only available as custom code. For help on customizing insurance options see: Docs > Customizing.html Notes:
Rule: Insurance will compute at face value of the option value, unless you adjust the custom code in moflib.pl to act otherwise. Example: %use_insurance = ( The insurance computation in the MOF v2.4 package moflib.pl has branch conditions for 1000 and 2000. If those option values are selected by the customer the code is set to apply no insurance for 1000, and apply $ 0.75 per item for 2000 You can set up a simple No (0), Yes (1) condition by rewriting the special conditions in moflib.pl, where 0 is like we currently have it, and the branch for 1 is anything you want to make.
Use: Allows you to set up one method of shipping Note: At time of ver 2.4 release, MOF does not have any real time shipping integration with USPS, UPS, etc. Please check the web site for any announcements if you need this. It is on my wish list, and considered a medium priority. Note: I have tried to provide some basic settings for general shipping costs. This section is not intended to provide for all situations. It made more sense to simply include support for custom shipping code, where specific situations can be handled better. Note: If you need more complex computations for this feature, consult the general online support area for custom code packages, or, with a valid license (support levels only please), just send an email to: support@merchantpal.com and I can probably help. A. Set up shipping method and rates Syntax:
If the weight mode is specified, MOF will sum all ShipCodes found for products to compute overall weight of the order. Make sure you set up the ShipCode input for each product to reflect actual weights. If the amount mode is specified, MOF will not use the ShipCodes, but use the total dollar amount on the invoice. Specify custom to use custom shipping code Note: If you are not using domestic-foreign matching settings, then the default rate is the rate in the domestic-rate position in the setting. Even if you don't use domestic-foreign matching, you still need a placeholder in the foreign position, otherwise the increment will not be identified correctly. B. set up minimum rates If you have minimum settings defined, and the increment in @use_shipping is not met, then the minimum rate will apply. If you don't have minimum rates defined, and the increment is not satisfied for your shipping computations, then shipping charges will be zero.
$minimum_domestic = 0; C. set up any domestic flags For help with Perl syntax for this setting, see: Docs > AboutConfigurations.html. @domestic_city = (); MOF will flag any shipping destination input that matches your settings here for city, state, or country. Important: make sure you use state and country values to correspond with the state.txt and countries.txt lists if you use those lists. Note the hyphen in United-States, United-Kingdom, etc. Custom example, domestic, international @use_shipping = ('custom'); If you enable the custom mode, shipping will compute as per the example code installed in the MOF package moflib.pl until you install your own code.
For help on customizing default shipping see: Docs > Customizing.html Flat rate example @use_shipping = ('weight',1,1,1000000); This is a simple trick that will trigger the minimums. It says, if total weight is under a million pounds, then apply the minimum. The minimum settings are your flat rates. Other examples
Add $ 2.95 (domestic) or $3.95 (foreign) for each $ 100 spent
Add $ 1.35 (domestic) or $ 1.85 (foreign) per each pound Just trigger the shipping screen, please
This is a trick if you need to trigger the Shipping, insurance, tax, coupon discount screen, but do not want any shipping costs computed. Domestic, foreign matching reliability Forcing dropbox lists for State-Province and Countries is the most reliable matching. The "city" box is open text, allowing non standardized input. Matching is case insensitive, and matches on word boundaries. The problem with the city list you make is that you wouldn't want to declare "LA" as a domestic city, and have someone enter "La Grange," which is a city in Texas, celebrated by ZZtop, but a far cry from LA. List of US states and Canadian Provinces This list matches the packaged states.txt list @domestic_state =
( Global regions MOF ver 2.4 added better accommodation for Regions, however, I did not add Region matching. So if you are in another country and trying to standardize the matching, I suggest you create your own states.txt list and go for just changing the title "State - Province" to "Region." You'll have to do that in the main scripts. Search for "State - Province" string in mof.cgi and mofpay.cgi, which should only come up 3 times.
Use: Allows you to set up multiple shipping methods for the customer to select from. Note: At time of ver 2.4 release, MOF does not have any real time shipping integration with USPS, UPS, etc. Please check the web site for any announcements if you need this. It is on my wish list, and considered a medium priority. Note: As with the default shipping settings, I have tried to provide some basic settings for general shipping costs. This section is not intended to provide for all situations. It made more sense to simply include support for custom shipping code, where specific situations can be handled better. Custom solutions are usually far more efficient than using the general settings for multiple methods here, however, these settings were in early versions of MOF, and so I left them in, but I never use them. Note: If you need more complex computations for this feature, consult the general online support area for custom code packages, or, with a valid license (support levels only please), just send an email to: support@merchantpal.com and I can probably help. For help with Perl syntax for this setting, see: Docs > AboutConfigurations.html. 1. Set up methods and descriptions Syntax: 2. Make shipping settings for each method I recommend you read the section above on default shipping. These computations operate the same way with regard to mode, domestic-rate, foreign-rate, increment, and minimums. Here, you'll have to set those up for each MethodName defined in %use_method Syntax: Notes:
Example Here are the settings running on our demo sites. Set up four methods Set which method is the default selection Set display to radio or dropbox list Define the computation mode for each method Note: each MethodName can have a different mode, however, if you define "custom" for any MethodName, then you must have the corresponding custom branch condition and computation code in the moflib.pl For help on customizing custom shipping methods see: Docs > Customizing.html Define the domestic-rate for each method Notice in the "Pick_Up" method, we have a zero there, because that method is actually FREE shipping. If that method is selected, the mode is weight, which says to charge zero shipping for whatever weight. The zero for "Express_Delivery" is simply a placeholder. You must at least have a placeholder for each MethodName listed. In this case, the zero is meaningless, because custom code really computes shipping for Express_Delivery. Note: %method_domestic also defines the default rate if not using domestic, foreign matching. Important: domestic, foreign matching will be used as per these settings in 16. DEFAULT SHIPPING
Define the foreign-rate for each method Note: You don't need to set these unless you are using foreign-domestic matching. If MOF looks for this and it is empty, shipping will be $ 0.00. You can also set a particular foreign rate to zero if you want $ 0.00 foreign shipping charges for a particular mode. You must at least have a placeholder for each MethodName listed. Domestic, foreign matching will be used as per the settings in 16. DEFAULT SHIPPING Define the increment for computations Notes:
You can compute things on the penny or hundredth of a pound, just like in the default shipping examples, or you can compute things on the dollar or each pound, or you can compute things for each hundred dollars or each 4.2 pounds. You must have at least a placeholder for each MethodName listed. Define any minimum settings %method_min_domestic = ( %method_min_foreign = (
Use: Allows you to set up various tax computation rules. How it works: Products with a non-zero TaxCodes are flagged for potential taxation. Any product with its TaxCode set to zero (0) is flagged as a nontaxable item. MOF will compute taxes on taxable items only and by the rules you have defined in the settings below. Note: MOF does not have ability to identify different tax categories for products, like in some European countries, where items are taxed at different rates. MOF only allows you to designate whether an item is taxable or nontaxable. 1. Rules for how to compute tax Allow tax exempt status If enabled, and a VAT or ID is entered by the customer, then all tax computes to zero and the VAT or ID number appears as line item on the Order summary screen. There are no validation rules built into this feature, it is just a way of overriding the tax computations via user input. Print a flag to identify taxable items ? Set to (null) "" if you do not want to show what items are being taxed, or set to any string or image to be printed next to all taxed items in the invoice. Use a global tax on everything Tax before or after shipping, handling, insurance ? Note: this rule is reversed if any of the @exception list conditions are matched Note: the before-after rule is applied to the tax computation at large. You cannot set before for city, after for state, etc .. How to handle multiple rates found for city, state, zip, country If MOF finds multiple matches in more than one area defined in the cCity, postal code, state, and country, then you can choose to consolidate all the rates into one rate, or you can make the rate whatever is the largest of all matched rates. The consolidated rate is what you would use if you need to access a state tax, and a county tax, and a city tax. You would define the area matching lists, and enable this switch to tell Mof to consolidate any and all rates it finds. Note: Mof will quit looking in an area once it finds the first match. That way consolidate rates can't come from a tax matching area more than once. 2. Lists for identifying taxable / nontaxable shipping destinations The following lists can be set to identify taxable areas and rates by city, postal code, state, country. The lists can be as long as you want. If the shipping destination address matches anything in your lists, then MOF considers it a taxable shipping destination. The @exceptions lists are used to reverse the $tax_before_SHI rule for a match. In other words, you have two lists each for city, postal code, state, country. A matched destination in the %use list says to tax according the the $tax_before_SHI rule. A matched destination in the @exceptions list says to reverse the $tax_before_SHI rule. Again, the before-after rule is applied to the tax computation at large. You cannot set before for city, after for state, etc .. The prevailing rule is the one that emerges after all matching is performed. Syntax: Note: the rate is defined in raw percent format 0.0825 is 8.25% tax Match city: Match postal code: Note: make the postal codes text by enclosing the pattern in single quotes. Also MOF will match on the beginning of the string, with an open ending boundary, since 78745 is the same as 78745-8999. This is different from city, state, country, where MOF matches on the string boundary Match State-Province: Match Country: Note: if you are using the drop lists in states.txt and countries.txt then make sure your lists are constructed from those values. Note: matching is not case sensitive, but it is boundary sensitive, except for postal code. When MOF finds the first match it aborts searching that list any further. The match sequence is: City, PostalCode, State, Country. Leading or trailing spaces, or extra characters can prevent a match. Example: Destination : Austin, TX 78745 : taxable (yes) : rate (10.75%) before SH&I $use_global_tax = 0; %use_zipcode_tax = ( %use_state_tax = ('TX',0.0825,'CO',0.053,'CA',0.0922); Note: if you were really trying to tax United-Kingdom you would need to expand this list to include all the different listings in the countries.txt list, like Great-Britain, England, etc. Computation integrity If any discounts are applied to the invoice amount then an Adjusted Tax Amount is computed. The "Adjusted Tax Amount" is used to compute the Tax. Adjustments are made from the ratio of taxable amount to whole amount. That ratio of Discounted total(s) is subtracted from the Taxable Amount. What that means is this: Tax is computed less any discount, but only for those items that are actually taxable. If all items are taxable then an entire discount (if there is one) is subtracted from the taxable amount, so that only the actual purchase amount is taxed. What if there are mixed items in the invoice? Both taxable and non taxable? And there is a discount? Then MOF computes an adjusted taxable amount, from ratios between the taxable to non taxable items, the whole price of each, and the total discount applied to the invoice. We did things this way because tax is applied or not applied per product, yet discounts are not applied at the product level, but at the invoice level. So, when a discount is applied to an invoice of products, where each individual product may or may not be taxable, then we need to determine exactly how much of the actual taxable items will be discounted, so we can tax only the actual amount of those products and not the original price of those products prior to any discounts.
Use: Explains how the many settings in mof.conf influence what is asked for on the Shipping, insurance, tax, discount coupon screen. How It Works MOF uses an intermediate screen between the ViewCart and Order summary screen to collect any customer information that would be relevant to creating an accurate summary of the invoice: computations for shipping, tax, insurance, and coupon discounts. The default discount and handling computations do not require any customer information other than your configuration settings. The table below lists all the settings that are capable of directing MOF to trigger the intermediate page. If you have any of these settings enabled, MOF will decide that you need customer information, and therefore, enable the Shipping information, insurance, tax, discount coupon screen. When all of the settings in this list are disabled, then MOF will not ask for any customer information, and when the customer clicks the "next" button, they will be taken directly to the Order summary screen.
Examples of how shipping settings interact Enabling the customer selected shipping method (3) , always overrides any settings in the default shipping method (2)
If you want to collect only the shipping address but don't want to compute any shipping charges, then enable both these settings:
To have the shipping destination field(s) display you need at least one of the shipping methods enabled: the default (2) or customer selected (3) method. The insurance option requires that shipping fields (1) and at least one method (2) or (3) be enabled. Shipping insurance won't trigger unless you're actually shipping something.
Example of using insurance, shipping fields, with real default shipping charges:
Example of using insurance, shipping fields, but no shipping charges: Examples of how tax settings interact The basic rule is this: If you enable any of the area specific tax computations (6) (7) (8) (9), or the tax exempt status (10), then MOF will trigger the Shipping, insurance, tax, discount coupon screen and ask for whatever field(s) are listed in the %shipping_destination_fields (1) array. If you only want tax information and not any shipping destination address (you're not shipping products), then enable only the shipping destination fields to match tax areas for City, State-Prov, PostalCode, or Country. Note: if you configure MOF for tax only, then MOF will present messages that say "Tax Area" instead of "Shipping Information." To force MOF to say "Tax Area" instead of "Shipping Info:" you can't have either of the shipping methods (2) (3) or insurance (4) enabled, else MOF thinks you are wanting to use shipping data too. Real Examples Let's say you don't ship anything, but want to be able to compute a tax on any orders in the Tax Area for six Postal Codes. You must have two settings: configure the tax area to match zip codes (7) and present the zip code field so it can be entered by the customer (1). This example asks for the Postal Code to be entered, and uses tax area settings to compute a 2.5% tax on any zip codes matching our list. Settings (1) and (7) in the table above. %shipping_destination_fields = ('Ecom_ShipTo_Postal_PostalCode',4);
%use_zipcode_tax = ( Other examples: You can enable only the Coupon Discount feature. You can enable the Coupon Discount and one tax matching area. You can enable only the Shipping area and insurance, with no shipping charges. You can enable a global tax, with shipping restricted to only a local area. You can enable shipping areas instead of shipping methods, where the customer selects the shipping area they are in. You can set up any logical combination of the ten settings to collect information that may be pertinent to the Order summary screen.
Example: A computer distributor might charge shipping and tax. So only the Postal code is needed from the customer. Configure the ten settings to ask for only the Postal Code on the Shipping Information page. The customer enters
the zip code to get an exact Order summary with any applicable shipping or tax charges.
Disable all ten settings described in the above section. Of course, doing this prevents you from collecting any information for shipping address, shipping computations, shipping methods, insurance, discount coupons, or tax matching information. So, you won't be able to make any of those computations, but you will by pass the Shipping information, insurance, tax, discount coupon screen. The Order summary screen will say "ORDER INFO" and not "SHIP TO" on the top left tab of the cart.
%shipping_destination_fields = ();
These programs are copyright @ MerchantOrderForm.com, MerchantPal.com 2001 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||