MOD Item Results
Modify LDLIB RPC$MODPRODUCTITEM_GETBYFILTER as follows to return a MOD result:
First, move this program from LDLIB into DEV.DATA BP, but leave the RPC$ prefix. Track this via PRC. *** LEAVE THIS IN LDLIB FOR NOW (YOU CAN ACCESS BY LOGGING TO DEV925 OR USING THE POINTER FROM DEV.DATA. REMEMBER THAT THIS SHOULD ONLY BE CATALOGED IN DEV925.
You can assume that the website will not launch the MOD GETBYFILTER process unless one or less exact stock matches were found. If multiple exact stock matches were found, the assumption is that they didn't enter enough info on the shop widget for us to make a MOD item. We will check further if it passes this first test.
This program should call the following routines in this order:
- WEB.MODITEM.CHECK – this program determines if a MOD item can be created. If this program sends back a return code of zero, you can continue with the following program calls. If not, we cannot make this item and no MOD result should be returned to the web. We should return to the web the return code (of 1 or 2) so that the web can decide which message (if any) to display to the user about why no MOD result was returned. Return Code 1 means 'incomplete data' and Return Code 2 means 'incompatible data'.
- You will need the defaults for quote qty, packout, and Freight. You can call the following functions to get these defaults. As long as you include LAD.FUNCTIONS at the top of your program, you can do function calls. For example, FOBCD = FCT.FREIGHTOPT.DEFAULT.VALUE(). You do not need to execute a "CALL" to these programs.
- FCT.FREIGHTOPT.DEFAULT.VALUE (PPD/P&A)
- FCT.PACKOUT.DEFAULT.VALUE (Bags per CS/RL Default)
- FCT.REQUESTEDQTY.DEFAULT.VALUE (Minimum Qty default)
-
-
- Note: if the SHOP. variables for REQUESTED.QTY, SHOP.FREIGHTOPT and SHOP.PACKOUT already have data, use that data instead of getting defaults.
-
- You can then call either your (Wayne's) MOD Pricing program or your (Wayne's) MARKETPLACE Pricing Program (based on SHOP.RULESET). You (Wayne) will be passing back to this program the quote unit price, total price, and up to 6 price breaks for passing back to the web. It will also be sending back an array of 171+ pieces of info that will need to be passed to Joe's create config/create order program (if they s/b created at this time). Marketplace will be called for rulesets 201,205,207. These programs will return all info needed in case we are ready to create a MOD Quote and Configuration. NOTE: At some point, you will be checking flags sent to you by the web to determine whether you should use today's resin prices or use the original resin prices from the configuration.
- Call WEB.MOD.LEADTIME to get the leadtime date for the MOD item. This date is returned in PARAM<5>. You will pass this along to the web.
- Call the program that puts together a MOD item description (not sure what this is called – John should know).
- *** THIS PROGRAM WILL NOT CALL THE PROGRAM THAT CREATES CONFIG/QUOTE. THAT PROGRAM WILL BE CALLED DIRECTLY FROM THE WEB. If the 'save or create quote' flags are on (not defined yet), call programs that increment configuration revision or create new quote/new configuration. These programs don't exist yet … Joe will be working on them.
- At the end, return to the web (via RETURN.VALUE):
- Price
- Up to 3 std price break quantities and prices
- Up to 3 custom price break quantities and prices
- NO Quote Number
- Leadtime Date
- Item Description
- Anything else you see in the GETBYFILTER program already