OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Default Price List

This topic contains 8 replies, has 2 voices, and was last updated by Andrey Yatsenko Andrey Yatsenko 2 months, 2 weeks ago.

  • Creator
    Topic
  • #40263

    marius.negoescu
    Participant

    Can I assign a default price list to a customer also ?

    Cheers, Marius

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #40264
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    See https://oroinc.com/b2b-ecommerce/doc/current/admin-guide/pricing/customer-price-lists
    The first price list in the list is the default one.

    #40265

    marius.negoescu
    Participant

    When I did that and tried to create new prices lists, when running the command:

    php bin/console oro:price-lists:recalculate –all –env=prod -vvv

    it was generating an error:

    An exception occurred while executing ‘INSERT INTO oro_cmb_pl_to_pl (sort_order, merge_allowed, combined_price_list_id, price_list_id) VALUES (?, ?, ?, ?)’ with params [1, null, 34, 6]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘merge_allowed’ cannot be null

    #40268
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Have you created the price list manually from UI or using the code?

    #40269

    marius.negoescu
    Participant

    I have created the price list and price list to customer link from code, so NOT from UI.

    First I created the Price List itself then created the Price List to Customer link.

    Cheers, Marius

    #40272
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    It’s hard to say what is wrong without debugging, but it looks like you haven’t filled some required properties, or some services were not colled when price list was created from the code.

    Please debug step-by-step how it’s done when you submit price list from UI to find what is missing.

    #40273

    marius.negoescu
    Participant

    I see what you mean.

    If I find anything I will come back.

    #40277

    marius.negoescu
    Participant

    Hi, Andrey

    I created the Price List from UI assigned it to a customer and added 1 product price to it and when running the command:

    php bin/console oro:price-lists:recalculate –all –env=prod -vvv

    I get the following error:

    [Doctrine\DBAL\Exception\NotNullConstraintViolationException]
    An exception occurred while executing ‘INSERT INTO oro_cmb_pl_to_pl (sort_order, merge_allowed, combined_price_list_id, price_list_id) VALUES (?, ?, ?, ?)’ with params [0, null, 84, 6]:

    SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘merge_allowed’ cannot be null

    Price List ID 6 is the default price list, 84 is the combined_price_list_id of the new price list.

    #40295
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    It looks like the issue is related to the customization as I can’t reproduce it by doing the same actions on a clean installation with the demo data.

    Maybe it’s related to some specific configuration, then please specify clear steps to reproduce with all the values you have entered so we’ll be able to confirm the bug.

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

You must be logged in to reply to this topic.

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

Yes No