Product Details Page (PDP) Methods and Events in SuiteCommerce

Product Details Page (PDP) includes essential methods and events for managing item interactions in SuiteCommerce.

·2 min read·View Oracle Docs

The Product Details Page (PDP) is a crucial component in SuiteCommerce, specifically designed for interaction with the Product Details view. Its methods and events enhance user experience by managing various interactions effectively.

Key Methods of PDP

The following methods are available in the PDP component, each serving a distinct purpose:

Method NameDescription
getAllMatrixChilds()Retrieves all child items in a matrix configuration.
getItemInfo()Fetches detailed information about the item.
getPrice()Obtains the current price of the item.
getSelectedMatrixChildsReturns the currently selected matrix child items.
setOption()Sets options for the selected product.
setQuantity()Adjusts the quantity of the selected item.
getStockInfo()Retrieves stock information for the item.

Key Events of PDP

The PDP component also defines various events that enhance its functionality:

Event NameDescription
beforeOptionSelectionTriggered before an option is selected.
afterOptionSelectionTriggered after an option is selected.
beforeQuantityChangeTriggered before the quantity changes.
afterQuantityChangeTriggered after the quantity changes.
beforeImageChangeTriggered before the product image changes.
afterImageChangeTriggered after the product image changes.

These methods and events provide developers with the tools necessary to create a responsive and dynamic shopping experience on the Product Details Page.

Best Practices

  • Ensure to utilize before and after events properly to prevent conflicts with user selections.
  • Always validate product quantities and options before finalizing user choices to enhance user satisfaction.

By leveraging these features, developers can offer seamless interactions on the PDP.

Frequently Asked Questions (4)

Do I need to handle any events for changes in product options on the PDP?
Yes, the `beforeOptionSelection` and `afterOptionSelection` events can be triggered to manage any changes when options are selected on the PDP.
How can I retrieve stock information for an item on the Product Details Page in SuiteCommerce?
You can use the `getStockInfo()` method to retrieve stock information for an item on the Product Details Page in SuiteCommerce.
What should developers consider when using quantity change events on the PDP?
Developers should ensure to handle the `beforeQuantityChange` and `afterQuantityChange` events to properly manage changes and prevent potential conflicts.
Is it possible to obtain the current price of an item via PDP methods?
Yes, the `getPrice()` method allows you to obtain the current price of an item on the Product Details Page.
Source: ProductDetailsPage (PDP) Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →