Shopping Pad
Copyright © 2001, William Weiland
Overview
The Shopping Pad module allows you to display a quick order form. This is useful for your customers who routinely order the same thing frequently. They can create a shopping pad under their Account screen after signing in. Once created, they do not need to sign in to open their shopping pad. They enter their sign in code and it brings up the form. They can delete items or change quantities. This saves time since they do not have to do time consuming searches or browse categories and products looking for the items they want to order.
Initial Setup
Use the Merchant admin upload feature to upload the module shoppad.mv(c). Click the Add button to add it to the mall/domain.

In admin, under your store, click on the link for the Utilities. Assign the Shopping Pad module and Update it to install it in your store.

Click the Shopping Pad tab to enter the configuration setting. Complete the inputs as applicable.

The compiled version of this module licensed on or after November 7, 2003 has a new file called cim_new.mvc which you need to install. Install through admin as a store system extension module.


Configuration Settings
Enter data into the applicable input fields.

Product Code Heading
Enter the label you want for the top of the column for product codes.

Quantity Heading
Enter the label you want for the top of the column for product quantities.

Form Text
Enter the font, color, size and background for the shopping pad form.

Prompt Button
Text and optional image for the button which goes in the category tree bottom.

Submit Button
Text and optional image for the button which goes on the shopping pad form.

Create Button
Text and optional image for the button which goes on the creation form in the Account screen.

Create Pad Message
This is the help text that appears on the pad creation form.

Screen Header and Footer
Header and Footer text for the Shopping Pad screen.


Editing Requirements (skip if using the OpenUI)
If you are using the Miva Merchant User Interface (mmui) you will need to make some very simple edits to the core files. Be sure to do that with a text editor (NO WYSIWYG editors) such as Programmer's File Editor (PFE) so as not to damage the mv files. ALWAYS BACKUP your unmodified mv files in case you make a mistake.

Several edits are required in the mmui.mv file.

1) Skip this paragraph if using compiled Merchant and you licensed this module after Nov 7, 2003. In the mmui.mv file, function UIModule_Dispatch, include the following code. Put this code in the latter half of the function, not near the beginning of the UIModule_Dispatch function.
<MvIF EXPR = "{ g.Screen EQ 'SHPD'}">
<MvDO FILE="{g.Module_Root$'modules/util/shoppad.mv'}" NAME = "l.ok" VALUE = "{ MMUI_Shop_Pad() }">
</MvIF>

2) Skip this paragraph if using compiled Merchant and you licensed this module after Nov 7, 2003. You can put a button on your nav bar, category column, the store front description area or even a static HTML page for Shop Pad ordering. Here is the code I inserted in the mmui.mv MMUI_Begin_Screen function just above the last </TABLE> tag in that function.
<MvDO FILE="{g.Module_Root$'modules/util/shoppad.mv'}" NAME = "l.ok" VALUE = "{ ShopPad_Open_Store() }">
<FORM METHOD = "post" ACTION = "&[ g.sessionurl ]">
<TR><TD>
<INPUT TYPE = "hidden" NAME = "Store_Code" VALUE = "&[ Stores.d.code:entities ]">
<INPUT TYPE = "hidden" NAME = "Screen" VALUE = "SHPD">
<MvIF EXPR = "{Customers.d.login}">
<INPUT TYPE = "text" NAME = "pad" VALUE = "&[Customers.d.login:entities]" size="15">
<MvELSE>
<INPUT TYPE = "text" NAME = "pad" VALUE = "default" size="15">
</MvIF>
<MvIF EXPR = "{ShopPad.d.imageurl}">
<INPUT TYPE = "image" ALT = "&[ShopPad.d.prompt:entities]" SRC = "&[ShopPad.d.imageurl:entities]" BORDER = 0>
<MvELSE>
<INPUT TYPE = "submit" VALUE = "&[ShopPad.d.prompt:entities]">
</MvIF>
</TD></TR>
</FORM>
<MvDO FILE="{g.Module_Root$'modules/util/shoppad.mv'}" NAME = "l.ok" VALUE = "{ ShopPad_Close_Store() }">

3) Use this paragraph if using compiled Merchant and you licensed this module after Nov 7, 2003. You can display this form in any screen header or footer. Fill in the info for your domain. No editing of the mmui.mv is required.
<FORM METHOD = "post" ACTION = "your full merchant.mvc url">
<TR><TD>
<INPUT TYPE = "hidden" NAME = "Store_Code" VALUE = "your store code">
<INPUT TYPE = "hidden" NAME = "Screen" VALUE = "NEW">
<INPUT TYPE = "hidden" NAME = "SubScreen" VALUE = "SHPD">
<INPUT TYPE = "text" NAME = "pad" VALUE = "" size="15">
<INPUT TYPE = "image" ALT = "Shopping Pad" SRC = "your button path url" BORDER = 0>
</TD></TR>
</FORM>

4) In the MMUI_CustomerAddEdit function you will insert 4 lines. This is a fairly long function. Scroll down to a few lines before the end of the function. You will see the line marked with the asterisk below. Place the added lines directly above that line but after the </FORM> tag.
<MvIF EXPR = "{Customers.d.login}">
<MvDO FILE="{g.Module_Root$'modules/util/shoppad.mv'}" NAME = "l.pad_on_file" VALUE = "{Display_Shop_Pad()}">
</MvIF>
* <MIVA STANDARDOUTPUTLEVEL = "text, html"><MvEVAL EXPR = "{ l.footer }"><MIVA STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">


Upgrade Note
If you are upgrading from a previous version of this module to the compiled version, this paragraph may apply to you. The compiled version of this module licensed on or after November 7, 2003 has a new link for calling the customer entry screen. So if you have a button or link on a static page to call the customer entry screen, you will need to change the Screen to NEW and include SubScreen=SHPD. You will also be installing a new file called cim_new.mvc.