PROPOSAL FOR DISPLAYING PURCHASING HISTORY ON PDP PAGE.

TASK : https://jobinandjismi.atlassian.net/browse/ALWE-2

Proposal Summary 

This proposal covers To show purchase history details of an item on the product detail page (PDP) for a logged-in customer who has purchased the item before. 

Requirement 

When a customer is logged in and then goes to PDP page, It should show the purchase history details of that item, if it is purchased before by that user. 

Pre Requisitions 

  • The user should have the role Administrator or SC Deployer. 
  • Need to fetch Theme. 
  • The corresponding bundles should be installed. 
  • An extension has to be created for the requirement to be displayed. 
     

Deliverables 

Solution : 

1. Create a saved search in NetSuite that retrieves the purchase history of the logged-in customer for the specific item. To create a saved search: 

  • Go to Lists > Search > Saved Searches > New. 
  • Select Transaction as the record type. 
  • Choose the following criteria:  
Type is any of Invoice, Cash Sale 
Main Line is false 
COGS Line is false 
Shipping Line is false 
Tax Line is false 
Item is not none 
Item : Type is any of Assembly/Bill of Materials, Inventory Item, Item Group, Kit/Package, Service, Other Charge, Non-inventory Item 
Customer : Internal ID is 2444 
  • Add the columns that you want to display, such as Date, Quantity, and Amount. 

Now we need to create HTML div for the purchase history to be displayed in the PDP, and a suitescript that will run when the page loads and retrieve the purchase history from the saved search we created before. The script adds filters to the search for the logged-in customer and the specific item, runs the search, and displays the results in a table within the purchase history div. 

When a logged-in customer views the PDP for an item they have purchased before, the purchase history details will be displayed below the item information. The details will include the date of the purchase, the quantity purchased, and the amount paid. 

Assumptions 

  • We need the proper role in the netsuite to get the values of the saved search. 
  • Criteria and columns has to be given according to the need. 

Leave a comment

Your email address will not be published. Required fields are marked *