LibraryEASYCommerce Reference ManualCatalog
Obsolete Item Replacement
Item Import
Item Popularity
Item Cross Reference
Item Main Page

Obsolete Item Replacement

When obsolete items are added to the cart, they are flagged as obsolete. This prompts a new window to show in the shopping cart which allows the user to select a related item. Checkout is not allowed while an obsolete item exists in the shopping cart. The user must first resolve the invalid item by either selecting the replacement item or removing the obsolete item without accepting its substitute.

What makes an Item Obsolete?

During the add to cart process, items are checked for various known statuses, one of which is “Obsolete” This is determined by the following query:

select  IBSTKT from F4102 where IBLITM = [Added Item] AND LTRIM(IBMCU) = [Current Branch Plant]

When the returned F4102.IBSTKT (ItemBranchFile.StockingType) is equal to “O”, the item is considered obsolete.

How is an Item Marked as Obsolete?

During the add to cart process, if any items are considered obsolete, the process then looks in the database for the appropriate saved message to display for this cart flag. This is done with the following query:

select  Flag, Tooltip from EC_ShoppingCart_Flags where Flag = 'Obsolete'

The returned ToolTip value is saved to the shopping cart table for the item. Here is an example of the ToolTip value that could be saved in the database for the obsolete flag:

The Shopping Cart has the following columns which save this information:



What Happens On the Shopping Cart Page with Obsolete Items?

Obsolete items are flagged in the shopping cart as Obsolete. This is visible to the user and marks the cart as invalid.

If the item has a replacement item, the user can choose to replace the invalid item with the replacement item. If there is no replacement, the user can only remove the invalid item.

Invalid carts cannot progress any further to checkout. If the user does attempt to checkout, an error message will be returned:

How are Replacement Items Found?

When the shopping cart page loads, it checks for any obsolete items (EC_ShoppingCart.Flag=’Obsolete’). If any are found, it runs the following query for each item:

select  IVCITM from F4104 where IVLITM = [Obsolete Item] AND IVXRT = 'R'


Availability is displayed in a variety of locations such as the “Check Price and Availability” and the “Item Main Page”.

This availability is calculated with the below query:


sum(LIPQOH - LIHCOM - LIPCOM) as DefQty, LIITM as ShortItemNumber

FROM F41021


ltrim(rtrim(LIMCU)) = [Current Branch Plant] AND LIITM = [ShortItemNumber]


One of the main components of this query is how it calculates the default quantity. This is determined by a configuration variable (SalesOrder_Default_AvailabilityFormula) which can be changed for the application through the admin panel. If this value is left blank, the default is set to “sum(LIPQOH - LIHCOM - LIPCOM)”

Item Popularity


The catalog has a Sort By option of Popularity. This will sort items based on high popularity to low popularity. This sorting is done based on values assigned to the CategoryCode10 column in K-Rise Item Branch Table (EC_Item_Branch).

How an Item is Considered Popular

Every time the Item Main Page is visited, Item Quick View is visited, the item is added to the cart, or the item is ordered an entry is created in the K-Rise Item Usage Table (EC_Item_Usage) where the item number and Usage Type is stored. Usage Types are Defined in The K-Rise Item Usage Types Table (EC_Item_Usage_Types). Types are MainPage, QuickView,  Cart, and Order. Each is assigned a weight.

There is a batch job called “ItemPopularity” which can be run from the “Work with Batch Jobs” page under “Site Management” from the admin panel.

The process will get all the entries in the K-Rise Item Usage Table and get the weights for each Usage Type from the Item Usage Types Table. For each item it will count how many entries there are for each type and multiple that by the weight of the type. It will then add the results up from each type and add that value to the K-Rise Item Branch Table (EC_Item_Branch) to the CategoryCode10 column. The process will the clear the Item Usage Table.

Edit Item Usage Type Weight

Log in as admin and navigate to “Work With Usage Types” under “Site Management”. Here all the Usage Types and Usage Weights will be listed.

Click on edit to change a Usage Type’s weight. A window will popup with a text box. Change the value in the text box to a numeric value and click Save. The Usage Type Weight will now be updated.

Developer Notes

K-Rise Tables





PRC-10000659 Item Popularity

Powered by EASYProcess (© 2019 K-Rise Systems, Inc).