External Product Purchase
Copyright © 2000, William Weiland
Overview
The purpose of external.mv is to allow a customer to purchase items which are not in your Merchant database. This is particularly suited for auction winnings, printed catalog items, and classified ad items. It could also be used for sale of services or negotiated price items.
Initial Setup
1) In admin, click Add Modules
2) Click the file upload button
3) Browse to find the external.mv file on your hard drive and upload
4) Click Add to add it to the domain
5) Click the image to the left of your store name
6) Click on the Utilities link
7) Check the box to the left of External Product Purchase and select Update
8) Click on Add Modules again
9) Click the file upload button
10) Browse to find the cim_log.mv file on your hard drive and upload
11) Click Add to add it to the domain
12) Click the image to the left of your store name
13) Click on the Logging Configuration link
14) Check the box to the left of CIM Activity Log and select Update
15) Click on Add Modules again
16) Click the file upload button
17) Browse to find the cim_ext.mv file on your hard drive and upload
18) Click Add to add it to the domain
19) Click the image to the left of your store name
20) Click on the System Extension Configuration link
21) Check the box to the left of CIM System External Product Purchase and select Update

Editing Option (skip if using the OpenUI)
If you want to hide the starting price of an external product, which is zero, you can add the following code around the lines which display the price in the mmui.mv function MMUI_ProductDisplay:
<MvIF EXPR = "{Products.d.code NE 'EXTERNAL'}">
..... standard display of price code
</MvIF>
This will check to make sure the product code is NOT EXTERNAL before it displays the price. If you are using the oui look and feel, you won't need to edit the mmui.mv. However, if you are using other oui extension modules which change the display of price, they might override the action of this module.
Additionally, you can remove the weight display the same way. It is directly after the price display. If you are using the oui look and feel, this hiding is already done automatically.
The External Product
When installed to the store, the module will add a wildcard product to your products database. Search for keyword EXTERNAL to find it and modify characteristics. The product code for this wildcard product is EXTERNAL. You MUST not change that. The default name of the product is Catalog Item. You can edit the product name, like any other product in your store. For example, you could change it to Auction Item or Classifed Ad, etc. You can also change the code for the attributes, NAME and CODE. But you MUST not change the codes for PRICE or WEIGHT. You can change the prompt that is used in all four attributes. The price of the item will be zero ($0.00). You should also verify the taxable status for items or services that will be sold through this external product. You can even add text to the narrative field which would be displayed if they displayed the record in individual product view.

When the user selects the EXTERNAL item, they enter the item name, code, price, and optionally weight. When Merchant process the transaction, if it sees a product code with the name EXTERNAL and an attribute code of PRICE, it uses the customer entered price to override the zero.


Usage with Inventory Management
The following applies ONLY if you are using CIM Inventory Management. If you are using the CIM Inventory Management (IM) module, you will need to establish an "in stock" level with the EXTERNAL product so that it will be available for purchase, ie Add and Buy buttons will be visible. When you install this module to your store, a level of 9 will be established if you have a field called quantity in your products database. You will need to increase that level if using CIM IM, since it decrements by the quantity of the product purchased. Use Customer and Product Management or the prodquan.mv applet to update the quantity or your item will quickly be out-of-stock.
Usage
Most likely you are going to use this External Product Purchase from a link on a static web page, an email, in a classified ad, or in your auction ad. The href link would have the form of:
http://www.emporiumplus.com/Merchant/merchant.mv?Action=ADPR&Attributes=Yes&Product_Code=EXTERNAL&Quantity=1&Screen=BASK&Store_Code=wcw
For your site, change the name of the domain at the beginning and the store code at the end of this link. Also, you may spell your directory as merchant instead of Merchant or even Merchant3. If you are using a cgi-bin URL, you will need to reformat the link accordingly.