Skip to content

Changes to Product pricing in schema #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

danielrenaud
Copy link
Contributor

@danielrenaud danielrenaud commented Sep 16, 2019

Problem

The current pricing schema has some inconsistencies and the structure is not ideal for conveying all price data (e.g. discounts).

Solution

The goal of refactoring the product pricing schema is to provide a more consistent structure for product price information.

Changes:

  • Type ProductInterface: existing type, with some field changes
    • price: deprecated because it will be replaced by price_range
    • price_range: new field, represents the min and max price of the product.
    • tier_price: deprecated
    • tier_prices: deprecated (use price_tiers)
    • price_tiers: new field to hold tier price data. Added new field because type is different (TierPrice)
  • Type ProductPrices; deprecated, replaced by PriceRange
  • Type PriceRange: new type (type for ProductInterface.price_range)
    • minimum_price: The minimum price of the product (e.g. the base price of a product with no custom options applied)
    • maximum_price: The maximum price of the product (e.g. with most expensive options applied)
  • Type ProductPrice: new type (type for PriceRange.minimum/maximum_price)
    • regular_price: The regular price of the product
    • final_price: The price of the product after discounts and things that change price
    • discounts: Product discount; reflects difference between regular and final price
  • Type ProductDiscount: new type (type for price discounts on products)
    • percent_off: the price difference represented as a percentage
    • amount_off: the price difference represented as a dollar value
  • Type FixedProductTax: new type for taxes in catalog
  • Type ProductTierPrices: deprecated (replaced by TierPrice)
  • Type TierPrice: new type for ProductInterface.price_tiers
  • Type Price (deprecated, replaced ProductPrice)
  • Type PriceAdjustment, PriceAdjustmentCodesEnum, PriceAdjustmentDescriptionEnum deprecated, replaced by FixedProductTax (ProductPrice.fixed_product_tax)

Requested Reviewers

@paliarush
@akaplya
@kokoc

@danielrenaud
Copy link
Contributor Author

@akaplya @naydav I've update the proposal to make customer_group_id and website_id deprecated.

@buskamuza buskamuza mentioned this pull request Sep 18, 2019
regular_price : Money!
final_price : Money!
discount : ProductDiscount
fixed_product_tax: [FixedProductTax]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed_product_taxes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to be plural

@akaplya akaplya merged commit f3654ba into magento:master Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants