Favourite page for sitebuilder site

PLP page add to favourites:

In item cell the wishlist button is given and onclick getCustomerDetails() is called with parameters ‘this’ which hold the tag attributes, and itemid. getCustomerDetails() function is defined in new_add-cart-popup-new.js.From the button elements customerid, itemid, item name, item image, item url, data-price-fav etc are taking and calling the suitelet PCIC-34Add Items to Customer Record.js.

Th favourites of a customer is stored in Wishlist Custom Record. Each favourite item is stored in wish list as a record with customer id and item details. For getting a customer’s favourite items a saved search is using to get the items.

In PCIC-34Add Items to Customer Record.js suitelet checking duplicate wishlist record for a customer with same item.on clicking add to wishlist for same item exists in wishlist record then alert for already exists will show for that customer.Setting values to Custom Record, Checking the duplicate record is done in the suitelet.

PDP page add to favourites:

From item template getCustomerDetails() is calling same as item cell to new_Add_cart_favourites.js.

Favourite Page

Favourites page is made in Commerce > Site Builder > Information Items >favourites page.

From favourite page PCIC-37Add Items to Favourite Page.js suitelet is used to get the favourite items for the customer.it return each item record from wishlist.For deleting the favourite item PCIC-112 Delete Record on Click (2).js, PCIC-112 Delete Selected Record.js etc are using.

Leave a comment

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