Purpose of Module
The Force Multiples module allows you to require that certain products can only be purchased in certain increments. For instance, you may have a widget XYZ123 that is sold in packs of 4. Force Multiples can be used to require customers to purchase XYZ123 in multiples of 4 (4, 8, 12, etc). Any or all products in the store can be required to have multiples. Products not flagged as requiring multiples are not affected by the module.
Checks are performed when products are added to the basket, or when the quantity in the basket is changed. By default the error message, which tells the customer that they are attempting to add an invalid quantity, can appear on the product, category, basket, and search screens. The error message text and formatting is completely customizable.
Force Multiples is fully template-compatible, supporting templating systems such as OpenUI SuperMod, Dynamic Templates, Category and Product Page Templates, and OpenDesigner. Tokens are provided for the error message and for the multiple required for each product.
How to Install
- Installing the Module
- Unzip the module's ZIP file to your hard drive
- Log into your Miva admin utility
- Expand the navigation tree next to Modules
- Click the link "Add Module"
- Click the "Upload File" graphic
- Click the "Browse" button
- Browse to the location where you stored the contents of the ZIP file
- Select nbforcemult.mv(c)
- Click the "Upload" button
- When the graphic has been uploaded, the small "Upload File" window will disappear, leaving you with the main Miva admin screen visible
- Click the "Add" button on the main Miva admin screen
- Repeat the above process for the import file, nbforcemult.mv(c)
- Associating the Modules with a Store
- Log into your Miva admin utility
- Expand the navigation tree next to Stores
- Expand the navigation tree next to the store with which you wish to associate this module
- Click the "System Extension Configuration" link under the store
- In the list of modules, you should see an entry for NetBlazon's Force Multiples. Check the box next to this module and then click the Update button.
- Above the list of modules should be a new link labelled "Force Multiples". Click this link.
- Enter your license key and click the "Update" button
Administrator Interface - Global Settings
To access the module's administration screens, click the System Extension Configuration link under your store. Then, on the right side, click the link labelled "Force Multiples". Customize the error message as desired. The field accepts HTML and there is no limit on the length.
Administrator Interface - Setting the Multiple for a Product
To specify that a product has to be purchased in multiples of a certain number, click Products on the left side, and browse or search for the product with which you wish to work. When you edit the product, there is a link (tab) across the top that says "Force Multiples". Click that link. Check the box and enter the multiple required for this product, then click the "Update" button. To remove the multiple from a product, simply uncheck the box and click the "Update" button.
Using Force Multiples with Templating Systems
Force Multiples provides several OpenTokens for use with various templating systems. The OpenTokens provided are:
- error: If the customer attempts to add an invalid quantity of a given product, this token will display the error message as defined by the store administrator. It should be placed on the basket screen (BASK) template. You may also wish to include it on the product screen (PROD), category screen (CTGY), search screen (SRCH), and/or product list screen (PLST)
- multiple: Returns the multiple required for the current product (defined by the current row in the Products database). The result is blank if the current product does not require multiples, or if the Products database is not open. Use this token to indicate to customers the multiple or increment required for each product.
Before tokens can be used in most templating systems, Force Multiples must be registered as a third-party token. This is done in different locations depending on which templating system is in use. To register Force Multiples as a third-party OpenToken, log into Miva Merchant, click the triangle next to Stores, and then click the name of your store. Then on the right side, click the OpenUI Tokens link. Next, click the round "New" button. For module code, enter "NBFORCEMULT" (without the quotes), and for token, also enter "NBFORCEMULT" (without the quotes). To register Force Multiples as a third-party token with other templating sytems, please refer to those systems' documentation for instructions.
Now, within your templates, you can reference Force Multiples's tokens in the following manner:
(For Product and Category Page Templates, make sure to add an extra pipe as shown:
The string after the last pipe ("|") character should be replaced with the appropriate token from the list above.