Restock Shelves
Copyright © 2001, William Weiland
Overview
The Miva Corp inventory management system for Merchant 4.0 has resulted in numerous stores having their shelves temporarily cleared. As customers place products in their baskets, the store inventory level is decremented. If the customer decides not to buy at that time and leaves the store, the products in that abandoned basket remain unavailable. When the store owner manually deletes expired baskets in admin, those basket contents are reclaimed and the products are placed back in the store inventory. Stores which have one-of-a-kind or low inventory levels of products are significantly impacted as the products are not available for purchase by other customers until the store is manually restocked. Stores which have high traffic are similarly impacted when many baskets are abandoned. This module eliminates the need for the store owner to manually restock. At a frequency determined by the store owner, this module will reclaim the expired baskets and restock the shelves. This module may not be required in future versions of Miva Merchant as a similar fix has been requested through the Miva Corp wishlist.
Initial Setup
1) In admin, Under store utilities, select the Delete Shopping Baskets and then delete the expired baskets. This will clear any huge backlog which may have existed before you install this module. Follow this up with Pack Data Files to ensure you do not have pre-existing index corruption.
2) In admin, click Add Modules
3) Click the file upload button
4) Browse to find the restock.mv (restock.mvc compiled) file on your hard drive and upload
5) Click Add to add it to the domain
6) Click the image to the left of your store name
7) Click on the Utilities link
8) Check the box to the left of Restock Shelves and select Update
9) Click the Restock Shelves tab to enter the configuration settings.
10) Click on Add Modules again
11) Click the file upload button
12) Browse to find the cim_logr.mv (cim_logr.mvc compiled) file on your hard drive and upload
13) Click Add to add it to the domain
14) Click the image to the left of your store name
15) Click on the Logging Configuration link
16) Check the box to the left of CIM Log Restock and select Update
17) If using Merchant 4.14 or newer, FTP the bluebox.gif and whitebox.gif to the Merchant2/ directory on your server

Configuration Settings
Enter data into the applicable input fields.

Recover Order Numbers
When a basket is abandoned, the order number when assigned, is also abandoned. This gives the appearance of some order numbers being skipped. In most stores, this is not a problem. However, some store owners feel they must maintain a complete sequence of order numbers. Over the years, the most common form of index corruption in Miva Merchant has been with the reclaiming of order numbers which were skipped. Unless you absolutely need the complete sequence, you should not recover order numbers; it saves time processing and minimizes the risk of index corruption.

Run restock every XXX minutes
The module uses this time (in minutes) to determine if it is time to restock. When a customer clicks on a product screen and this time has been reached, the restocking will execute. A slight delay may be noticed by the customer at the time this occurs. The timer will be reset. Hence, if you set the restock timer to 120 minutes, every two hours one customer may experience a slight delay displaying one product screen.

Optionally send email to
The module can send an email every time it runs the restock routine. If you leave this blank it will not send the email. If you fill in an email address, it will send to that address. Here's an example email from Merchant 4.14 and newer.


Usage
When customers visit your store the timer will be checked to determine the last time expired baskets were deleted. If deletion is due, the next customer who clicks to a product screen will launch the shelf restocking routine.