StorylyVerticalFeedProductDelegate

@objc(StorylyVerticalFeedProductDelegate)
public protocol StorylyVerticalFeedProductDelegate

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

  • This function will notify you to get ids of products

    Declaration

    Swift

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

    Parameters

    view

    STRVerticalFeedView 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: STRVerticalFeedView,
                               event: VerticalFeedEvent)

    Parameters

    view

    STRVerticalFeedView 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: STRVerticalFeedView,
        event: VerticalFeedEvent,
        cart: STRCart?,
        change: STRCartItem?,
        onSuccess: ((STRCart?) -> Void)?,
        onFail: ((STRCartEventResult) -> Void)?
    )

    Parameters

    view

    STRVerticalFeedView 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