Skip to content
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

Backoffice::GetPrice API - Simple products #446

Open
magento-engcom-team opened this issue Nov 24, 2020 · 3 comments
Open

Backoffice::GetPrice API - Simple products #446

magento-engcom-team opened this issue Nov 24, 2020 · 3 comments
Milestone

Comments

@magento-engcom-team
Copy link

magento-engcom-team commented Nov 24, 2020

Add new API to in Magento Backoffice to retrieve product prices

There are 2 main reasons to introduce a new API to get raw prices from Backoffice:

  • full sync: propagate all prices from Magento to Pricing Service (via Message Broker)
  • get the price after “price changed” event and send to Pricing service (via Message Broker)

AC:

  • raw prices of simple products should be returned (without relying on the existing price indexer)
  • next prices should be honored:
    • simple/virtual prices
  • the only price for requested scopes should be returned
  • WebAPI end point created to return price data

Cover with web-api tests

repo: <https://github.com/magento/commerce-data-export]

Tech details:

  • Catalog price rule, marketing rules are not taking into account
  • "id" field in Request/Response object is a string that represents a specific entity, e.g.
    • Introduce Interface to build product id (refactor existing providers, e.g. Magento\CatalogDataExporter\Model\Provider\Product\ProductOptions\OptionValueUid)
    • for product: regular Magento Product ID returned, e.g. "42"
    • for custom option: "option/<customoption_id>/<custom_option_valueid>"

 

Get Prices Request

{
    ids:[product_ids,option ids>,
    website: <website|null>, // if null provided AND price_scope != Global return empty result
    customer*group: <customer group> // if null provided "group*price" should not be calculated 
}

Response format:

message ProductPrice {
  // Represent Product ID or Option ID like custom option, downloadable link, etc.
  // E.g. option/<product_id>/<custom_option_id>
  string entity_id = 2;

  // price without any discount
  float regular_price = 3;

  // customer group price
  float group_price = 4;

  // customer group price type (fixed,percent)
  string group_price_type = 66;

  // absolute value of special price
  float special_price = 5;

  // special price affective from date
  string special_price_from = 6;

  // special price affective to date
  string special_price_to = 7;

   // Represent quantity for given price to build tier prices. If not specified assumes it as "1"
  float qty = 55;
}
@magento-engcom-team
Copy link
Author

The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/SFAPP-164

@m2-assistant
Copy link

m2-assistant bot commented Nov 24, 2020

Hi @magento-engcom-team. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@bricht
Copy link
Contributor

bricht commented Nov 30, 2020

@magento I am working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants