My Top Selling Items
My Top Selling Items is an Account Level version of Top Selling Items feature. It displays the most ordered items for the logged in user’s account.
Types of Display
There are two views for “My Top Selling Items”. One is shown as a carousel and is shown on the shopping cart page. The other is a list section and is available to users once they log in. Both are built from the data specific to that user’s account and both are sourced from the same location. The data comes from JDE and is saved to a K-Rise table for the Account Top Selling Items. That table is refreshed by a scheduled batch job.
The top selling items for the logged in user’s account are displayed in a carousel that allows the user to quickly scroll through the items they have purchased the most.
In the carousel, each top selling item shows some basic information and allows the user to perform these actions.
This list will display the same items as the carousel, but it comes from a list in the “My Lists” feature.
If you navigate to the “My Lists” feature, each active account will have an auto created list called “Account Top Selling Items List”.
Any time items are added to the K-Rise table for the Account Top Selling Items, it is also maintained in this list.
How Items are Considered Top Selling
There is a batch job called “TopSellingItemsAccount” which can be run from the “Work with Batch Jobs” page under “Site Management” from the admin panel.
The account level batch job first selects all the active accounts, then for each account, performs the following steps
First it deletes all the records in the K-Rise table for top selling items (EC_TopSellingItemsByAccount). It then runs a query to select the most ordered items from the JDE order history detail tables (F4211 and F42119) for that account and one by one, it adds them to the K-Rise table.
The items only get added if they also exist in the K-Rise Item Master. This way, if the admin has placed restrictions on the site to only allow a certain type of items to be imported and viewable in the site, those same restrictions extend to this import. If it wasn’t found in the item import due to various filters, it won’t be added here.
It does this in a loop until it either has enough to fill the carousel or it reaches the end of the list of ordered items in JDE.
It then continues to populate the Auto Created list in EC_Lists from the EC_TopSellingItemsByAccount table it just populated. This ensures that the list in the “My Lists” feature stays in sync with the carousel.
Changing the Number of Items that Display In the Carousel
The number of items that display is stored in a configuration variable and can be edited in the Feature Configurator through the Admin panel. To edit this, log in as admin and navigate to “Feature Configurator” under “Site Management”. Find and click on the configuration “TopSellingItems” to open all the variables and find “DisplayNumberOfTopSellingItemsAccount”. Enter a numeric value in this text box to display that number of items in the carousel.
Work with Top Selling Items Admin Panel
The Work With Top Selling Items Admin Panel allows the admin to edit the items in our K-Rise table which stores the top selling items. Although the items that are auto-filled into this table come from JDE, if the admin would like to add his/her own, it can be done here. Similarly, if the admin wanted to remove one of the items from displaying, there is a delete button next to each item in the list.
This is the same Admin Panel for both Top Selling Items (Site Level) and My Top Selling Items (Account Level), so make sure the radio button at the top is set to Account when editing.
PRC-10000532 Top Selling Items: Account
PRC-10000533 Top Selling Items: Account - Insert
PRC-10000526 Top Selling Items: Account - Create List
WPT-10001262 Cycling Items Widget - Parameters