[iOS SDK] Added sales price

Release Note:

a new example to the demo app

  • how to access the example: Launch the app > main screen > tap Product UI Example button

[Data] Added new fields to PXLProduct

  • these fields are added to provide discount price information
public struct PXLProduct {
    public let salesPrice: Double?
    public let salesStartDate: Date?
    public let salesEndDate: Date?

[UI] Added a new option to PXLPhotoProductView for sales price

  • let discountPrice: DiscountPrice? is added to PXLProductCellConfiguration
    • discountLayout: DiscountLayout has tree options [CROSS_THROUGH, WAS_OLD_PRICE, WITH_DISCOUNT_LABEL]
    • isCurrencyLeading: Bool
      • true: display currency symbol in front of the price
      • false: display currency symbol after the price

isCurrencyLeading is nil or false


isCurrencyLeading is true

No Option selected or no sales priceDemo
  • Code Example
    • To display sales price, you need to pass PXLProductCellConfiguration(discountPrice: discountPrice) to PXLPhotoProductView.. Please see the example codes below.
      let discountPrice = DiscountPrice(discountLayout: DiscountLayout.WITH_DISCOUNT_LABEL, isCurrencyLeading: true)
      let widget = PXLPhotoProductView.widgetForPhoto(photo: photo,
              delegate: self,
              cellConfiguration: PXLProductCellConfiguration(discountPrice: discountPrice))