Firework for Developers
One-to-one Virtual ShoppingBusiness Portal
  • Welcome to Firework for Developers
  • Firework Interactive Video and One-to-many Digital Showroom
  • Web
    • Getting Started (Web)
      • Shopify
      • Magento
      • Wordpress (WooCommerce)
      • Salesforce Commerce Cloud
      • BigCommerce
    • Integration Guide for Web
      • Components
        • Hero Unit
        • Carousel / Grid
        • Storyblock (Web)
        • Player (Floating)
        • Storylink
      • Styling
      • Feed Attributes
      • Player
        • Configuration
          • Appearance
      • Video customization
        • Video Factory
        • CTA Button
        • Product cards
      • Events
        • Embed Feed and Storyblock Events
        • Video player events
        • Live stream events
        • Shopping events
      • Shopping Integration (V2)
        • Introduction
        • Shopping APIs
        • Product Hydration
        • Product Factory
        • Cart Sync
        • Tracking
          • Purchase
          • Add to cart
          • Remove from cart
          • Page viewed
        • Shopping Integration FAQ
        • Migrate from V1
      • Web SDK
      • Enhanced Picture-in-Picture
      • Privacy settings
        • Tracking settings
        • Cookies management
        • Content Security Policy
    • Telemetry console
    • Firework Service Domains
    • FAQ & Troubleshooting (Web)
  • Android SDK
    • Integration Guide for Android SDK
      • Getting Started (Android)
      • Video Feed (Android)
        • Video Feed Layouts (Android)
        • Channel Feed (Android)
        • Discover Feed (Android)
        • Playlist Feed (Android)
        • Dynamic Content Feed
        • Channel Hashtags Feed
        • Sku Feed
        • Single Content Feed
        • Configure Video Feed
      • Customization
        • CTA
      • Analytics (Android)
      • Shoppable Videos (Android)
        • Product Hydration
      • Live Stream Support (Android)
      • Video Player (Android)
      • StoryBlock (Android)
      • Share & Video Deep linking
      • Ad Support (Android)
      • Configure Video Advertisements Source (Android)
      • In-app Language Switches
      • Compose support(Android)
    • Sample App (Android)
    • FAQ & Troubleshooting (Android)
    • Changelog (Android)
  • iOS SDK
    • Integration Guide for iOS SDK
      • Getting Started (iOS)
      • ATT compliance (iOS)
      • Video Feed (iOS)
        • Discover Feed(iOS)
        • Channel Feed (iOS)
        • Playlist Feed (iOS)
        • Playlist Group Feed (iOS)
        • Dynamic Content (iOS)
        • Hashtag Playlist (iOS)
        • SKU Playlist (iOS)
        • Video Ads (iOS)
        • Video Feed Layouts (iOS)
      • Story Block (iOS)
      • Customization (iOS)
        • Video feed configurations (iOS)
        • Player configurations (iOS)
        • Shopping configurations (iOS)
          • Customize product card on videos using the custom view (iOS)
        • Customize click behaviors (iOS)
      • Shopping (iOS)
      • Live Stream Support (iOS)
      • Analytics (iOS)
      • Share & Deeplinking(iOS)
      • Ad Support (iOS)
    • Sample App (iOS)
    • FAQ & Troubleshooting (iOS)
    • Changelog (iOS)
  • React Native SDK
    • Integration Guide for React Native SDK V2
      • Getting Started (React Native)
      • ATT compliance React Native (iOS)
      • Video Feed (React Native)
      • Story Block (React Native)
      • Customization (React Native)
        • Video feed configurations (React Native)
        • Player configurations (React Native)
        • Shopping configurations (React Native)
          • Customize product card on videos using the custom view (React Native)
        • Customize click behaviors (React Native)
      • Shopping (React Native)
      • Live Stream Support (React Native)
      • Ad Support (React Native)
      • Analytics (React Native)
      • App-level Language Setting (React Native)
      • Share & Video Deeplinking (React Native)
      • Android Style (React Native)
      • Inject Android Image Loader (React Native)
      • Integrate SDKs in Hybrid React Native and native Apps
      • Reference (React Native)
      • Sample App (React Native)
      • FAQ & Troubleshooting (React Native)
      • Changelog (React Native)
  • Flutter SDK
    • Integration Guide for Flutter SDK V2
      • Getting Started (Flutter)
      • ATT compliance Flutter (iOS)
      • Video Feed (Flutter)
      • Story Block (Flutter)
      • Customization (Flutter)
        • Video feed configurations (Flutter)
        • Player configurations (Flutter)
        • Shopping configurations (Flutter)
          • Customize product card on videos using the custom view (Flutter)
        • Customize click behaviors (Flutter)
      • Live Stream Support (Flutter)
      • Shopping (Flutter)
      • Ad Support (Flutter)
      • Analytics (Flutter)
      • App-level Language Setting (Flutter)
      • Share & Video Deeplinking (Flutter)
      • Inject Android Image Loader (Flutter)
      • Android Style (Flutter)
      • Integrate SDKs in Hybrid Flutter and native Apps
      • Reference (Flutter)
      • Sample App (Flutter)
      • FAQ & Troubleshooting (Flutter)
      • Changelog (Flutter)
  • Help Articles
    • Importing Products to Firework
    • Adding products to a video
    • Displaying product videos on product pages using hashtag filtering(Web)
    • Syncing Carts
    • Encoded IDs
Powered by GitBook
On this page

Was this helpful?

  1. iOS SDK
  2. Integration Guide for iOS SDK
  3. Customization (iOS)

Shopping configurations (iOS)

Customize shopping view configuration

To customize shopping view configuration, you need to set FireworkVideoShoppingDelegate delegate first:

FireworkVideoSDK.shopping.delegate = <FireworkVideoShoppingDelegate delegate>

Then you need to implement fireworkShopping(_:willDisplayProductInfo:forVideo:) method.

func fireworkShopping(
    _ fireworkShopping: FireworkVideoShopping,
    willDisplayProductInfo productInfoViewConfigurator: ProductInfoViewConfigurable,
    forVideo video: VideoDetails
) {
    var shoppingCartIconConfig = ShoppingCartIconConfiguration()
    // Specifies if the cart icon is visible
    shoppingCartIconConfig.isHidden = false
    // Specifies if the cart icon red indicator is visible
    shoppingCartIconConfig.indicator.isHidden = false
    // Apply the shopping cart icon configuration
    productInfoViewConfigurator.shoppingCartIconConfiguration = shoppingCartIconConfig

    var productDetailsContentConfig = ProductDetailsContentConfiguration()
    // Specifies Firework PDP primary CTA button background color
    productDetailsContentConfig.ctaButton.buttonConfiguration.backgroundColor = .black
    // Specifies Firework PDP primary CTA button text color
    productDetailsContentConfig.ctaButton.buttonConfiguration.textColor = .white
    // Specifies Firework PDP primary CTA button font
    productDetailsContentConfig.ctaButton.buttonConfiguration.font = .boldSystemFont(ofSize: 14)
    // Specifies Firework PDP primary CTA button shape: roundRectangle or oval
    productDetailsContentConfig.ctaButton.buttonConfiguration.shape = .oval
    // Specifies the shopping primary CTA button text to be displayed: "Add to card" or "Shop now"
    productDetailsContentConfig.ctaButton.text = .shopNow
    
    // Specifies Firework PDP secondary CTA button background color
    productDetailsContentConfig.secondaryCtaButton.buttonConfiguration.backgroundColor = .black
    // Specifies Firework PDP secondary CTA button text color
    productDetailsContentConfig.secondaryCtaButton.buttonConfiguration.textColor = .white
    // Specifies Firework PDP secondary CTA button font
    productDetailsContentConfig.secondaryCtaButton.buttonConfiguration.font = .boldSystemFont(ofSize: 14)
    // Specifies Firework PDP secondary CTA button shape: roundRectangle or oval
    productDetailsContentConfig.secondaryCtaButton.buttonConfiguration.shape = .oval
    // Specifies Firework PDP secondary CTA button border color
    productDetailsContentConfig.secondaryCtaButton.borderColor = .black
    
    // Specifies if the Firework PDP link button is hidden
    productDetailsContentConfig.linkButtonConfiguration.isHidden = false
    // Customize unavailabe text. Default to "Unavailable".
    // The custom text need to be translated if your app supports multiple languages.
    productDetailsContentConfig.unavailableText = .custom("custom text")
    
    // Apply the product details configuration
    productInfoViewConfigurator.productDetailsConfiguration = productDetailsContentConfig

    // The config only applies to video product card
    var productCardConfig = ProductCardConfiguration()
    // Specifies the appearance of the video product card
    productCardConfig.appearance = .light
    
    // Specifies the video product card CTA button text: "Buy now" or "Shop now"
    productCardConfig.ctaConfig.text = .buyNow
    // Specifies the video product card CTA button text color
    productCardConfig.ctaConfig.textColor = .black
    // Specifies the video product card CTA button font
    productCardConfig.ctaConfig.font = .systemFont(ofSize: 12)
    // Specifies if the video product card CTA Button is visible
    productCardConfig.ctaConfig.isHidden = true
    
    // Specifies the axis the price labels should use in relation to one another
    productCardConfig.priceConfiguration.axis = horizontal
    
    // Specifies the label text color of price
    productCardConfig.priceConfiguration.priceLabel.textColor = .white
    // Specifies the label text font of price
    productCardConfig.priceConfiguration.priceLabel.font = .systemFont(ofSize: 14)
    // Specifies the number of allowed lines for the label of price
    productCardConfig.priceConfiguration.priceLabel.numberOfLines = 1
    
    // Specifies the label text color of original price
    productCardConfig.priceConfiguration.originalPriceLabel.textColor = .white
    // Specifies the label text font of original price
    productCardConfig.priceConfiguration.originalPriceLabel.font = .systemFont(ofSize: 14)
    // Specifies the number of allowed lines for the label of original price
    productCardConfig.priceConfiguration.originalPriceLabel.numberOfLines = 1
    
    // Configure the default display order is [priceLabel, originalPriceLabel]
    // When the value is `true`, the order is reversed
    productCardConfig.priceConfiguration.isPriceFirst = true

    // Specifies the corner radius to be applied to the video product card
    productCardConfig.cornerRadius = 4
    // Specifies the size of the video product card
    productCardConfig.size = CGSize(width: 218, height: 88)
    // Specifies the background color for the video product card
    productCardConfig.backgroundColor = .white
    // Specifies the corner radius to be applied to the product icon
    productCardConfig.productIcon.cornerRadius = 6
    
    // Specifies the label text color of product name
    productCardConfig.nameLabel.textColor = .white
    // Specifies the label text font of product name
    productCardConfig.nameLabel.font = .systemFont(ofSize: 14)
    // Specifies the number of allowed lines for the label of product name
    productCardConfig.nameLabel.numberOfLines = 1
    
    // Apply the product card configuration
    productInfoViewConfigurator.productCardConfiguration = productCardConfig
}
PreviousPlayer configurations (iOS)NextCustomize product card on videos using the custom view (iOS)

Last updated 2 months ago

Was this helpful?

If you wish to customize the video product card with a custom view, please refer to .

Customize product card on videos using the custom view (iOS)