Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums OroCommerce Price list rules

This topic contains 5 replies, has 3 voices, and was last updated by Dmitry Khrysev Dmitry Khrysev 1 year, 6 months ago.

  • Creator
  • #31494



    I know that price list in Oro have very useful functions like:
    – Product Assignment
    – Price Calculation Rules

    The only problem is that there are no documentation or I couldn’t find it.
    1) I need to know how to use product assignemnt and prices caluclations rules?
    2) How should example expressions look like? (what entities/fields can be used in expressions)
    3) Can I use product assigment for fileter price list by category?
    4) What about performance if complex expressions were used?

    I will be grateful for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
  • #31495



    When adding or editing a price list you have the options to add new product assignment rules or price calculations for products that belong to this price list.

    Let’s say we want to add a new price list and assign to it all products from a category. For example if we want all products from category with id 2 then we add this condition to product assignment rule: product.category==2. In this expressions you can use attributes from other price lists, you can refer to a price list using: pricelist[1].prices.currency where 1 is the id of the price list that you refer to. Also you can use product attributes like . You can combine this rules using operands like or, and.

    In price calculations you can add the quantity for a product unit and the price for the specified quantity. Here you can also use expressions but also you can specify exact values. You can switch to expression and for each field you can write something like: Qty: pricelist[1].prices.quantity, Unit: pricelist[1].prices.unit, Currency: pricelist[1].prices.currency . And in the calculate as field pricelist[1].prices.value+10 if we want to add 10$ to the prices set in the price list with id 1.

    You can use the product assignment to select only products from a category like in the example above.

    This expressions will generate a new sql query and it will run in one go, so depending on how many price lists you will use it will make additional joins.

    Hope this helps.



    First of all I would like to thanks for previous answer!

    I have a problem with generate auto prices. I will describe what have I done:

    1) I created price list A with:
    rule: product.sku==”1GS46″
    Price for quantity: 1 each $
    Calculate as: 100
    2) I assigned price list A to product P1 group or even customer C1.
    3) I know (because tested) that normal price list working OK (when I add price to product). Price is changing on frontend.
    4) I executed “Recalculate” on price list A
    5) I executed “app/console oro:price-lists:recalculate –all”

    Price doesn’t change on frontend. Price is always taking from default price list. There isn’t price for product P1 on price list details on backend. I saw that there is column “Type”. I suppose that generated prices will have type “Auto”.

    What am I doing wrong?

    Dmitry Khrysev
    Dmitry Khrysev


    Prices are generated by queue message processors. To run queue messages processing execute

    Also note, that prices generation is limited to price list enabled currencies and to product units,
    so no prices will be generated if USD is not enabled for price list or in case when “each” is not supported unit for product with SKU ”1GS46″



    Hi Dimitry,

    You are right! “Each” was not supported unit for my product. I didin’t notice.

    However Would be nice to have some logs or something. Where can i find some logs about price generation? Should I up verbosity somewhere?


    Dmitry Khrysev
    Dmitry Khrysev

    Prices are generated with single Database query that is constructed per each rule.
    There are no individual restrictions or per entity generation information.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No