StorylyVerticalFeedPresenterProductDelegate

@objc(StorylyVerticalFeedPresenterProductDelegate)
public protocol StorylyVerticalFeedPresenterProductDelegate

This delegate represents the class which notifies application when an product related event occurs in StorylyVerticalFeedPresenterView.

  • This function will notify you to get ids of products

    Declaration

    Swift

    @objc
    optional func verticalFeedHydration(_ view: StorylyVerticalFeedPresenterView, products: [STRProductInformation])

    Parameters

    view

    StorylyVerticalFeedPresenterView feed instance in which the user interacted with a component

    products

    Found list of product information in vertical feed

  • This function will notify you about all Vertical feed events and let you to send these events to specific data platforms

    Declaration

    Swift

    @objc
    optional func verticalFeedEvent(_ view: StorylyVerticalFeedPresenterView,
                               event: VerticalFeedEvent)

    Parameters

    view

    StorylyVerticalFeedPresenterView instance in which the event is received

    event

    Vertical feed event type which is received

  • This function will notify you about updates the cart in a Vertical feed component

    Declaration

    Swift

    @objc
    optional func  verticalFeedUpdateCartEvent(
        view: StorylyVerticalFeedPresenterView,
        event: VerticalFeedEvent,
        cart: STRCart?,
        change: STRCartItem?,
        onSuccess: ((STRCart?) -> Void)?,
        onFail: ((STRCartEventResult) -> Void)?
    )

    Parameters

    view

    StorylyVerticalFeedPresenterView instance in which the event is received

    event

    Storyly event type which is received

    cart

    Contains information about the items in the cart

    change

    Represents the item being changed in the cart.

    onSuccess

    It represents a callback function that will be executed if the “update cart” operation is successful

    onFail

    It represents a callback function that will be executed if the “update cart” operation fails