Forums

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

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 161 total)
  • Author
    Replies
  • in reply to: Add context to calendar event using API or REST #41321

    Yurii Muratov
    Participant

    Hi, @wizhippo.

    Unfortunately, current JSON API has no resource to do this.

    But you can do this with the plain REST API.

    For example, if you want to add the lead with id 10 as the context to the calendar event with id 1, you can send a POST request to the api/rest/latest/activities/calendarevents/1/relations.json API resource (here 1 is the id of calendar event) with data:

    Here 10 is the id of the lead.

    This request should return empty response with 204 status code if the lead was added to the calendar event.

    Please note that request should have Content-Type header with application/json value.

    in reply to: I get no result at advanced search API #41123

    Yurii Muratov
    Participant

    Hello.
    The search alias for CustmerUser entity is oro_customer_customer_user, not the customeruser.

    in reply to: Orocommerce Oauth2: What Api-endpoints to use? #40950

    Yurii Muratov
    Participant

    Yes. The limitations are the same.You should have an access to the same order.
    Please check the log files for exception description. Another option is to send the request in dev mode (to http://<hostname_of_my_custom_oro_application>/index_dev.php/api/orders/73). In this case, the response will have much more information about exception.

    in reply to: Orocommerce Oauth2: What Api-endpoints to use? #40947

    Yurii Muratov
    Participant

    Ahh, sorry, for the back-office, you should use your_domain/admin/api/your_resource endpoints.
    So, valid endpoint for users will be:

    http://<hostname_of_my_custom_oro_application>/admin/api/users

    in reply to: Orocommerce Oauth2: What Api-endpoints to use? #40943

    Yurii Muratov
    Participant

    In this case, please try to make request in dev mode (to index_dev.php/api/users) and see the dev.log file for the reason why your auth token is invalid.

    in reply to: Orocommerce Oauth2: What Api-endpoints to use? #40941

    Yurii Muratov
    Participant

    Hello, Frank.

    To get access to storefront API you should get an auth token with client id and client secret from the storefront OAuth application. This auth token will not grant access to the back-office API.

    The same, to get access to back-office API you should get an auth token with client id and client secret from the back-office OAuth application. This auth token will not grant access to the storefront API.


    Yurii Muratov
    Participant

    Hello, @spyout98.

    The value should be “1,2,3”.

    Several values for a filter should be delimited by comma, without any additional symbols and spaces.
    More information about filters you can find in https://oroinc.com/b2b-ecommerce/doc/1.6/dev-guide/web-api#filters.


    Yurii Muratov
    Participant

    Hello, @sachingk.30.

    Please let me know which version of Oro Commerce you are use.
    I’ve tested the product API on the latest version of 2.6 and master and this API returns localized fields.


    Yurii Muratov
    Participant

    Hi @spyout98.

    You can set one or several ids for the filter ‘groups’. In case if several ids was set, the ANY criteria is used.

    In case if you need AND criteria, you need to create own type of filter. As example you can see ‘primaryField’ filter:

    https://github.com/oroinc/platform/blob/2.6/src/Oro/Bundle/ApiBundle/Filter/PrimaryFieldFilter.php
    https://github.com/oroinc/platform/blob/2.6/src/Oro/Bundle/ApiBundle/Resources/config/oro/app.yml#L80-L81
    https://github.com/oroinc/crm/blob/2.6/src/Oro/Bundle/ContactBundle/Resources/config/oro/api.yml#L36-L40


    Yurii Muratov
    Participant

    Hi @spyout98.

    The filters by to-many associations are not enabled by default. It is known issue and we are going to fix it soon.
    Fo now to enable the filter by the contact group you can add the following config in Resources/config/oro/api.yml of any of your bundle:

    After that run cache:clear CLI command.

    in reply to: problem oro:message-queue:consume crash #32436

    Yurii Muratov
    Participant

    Hello again, @irina.k.melnikova.

    I’ve looked at the code and unfortunately for now i do not know exact reason of this issue.

    But i have some guess why this issue may happens, for example, getmypid function returns false at https://github.com/oroinc/platform/blob/master/src/Oro/Component/MessageQueue/Consumption/Dbal/DbalPidFileManager.php#L50. In this case, an empty pid files will be created in /tmp/oro-message-queue. And this leads to further repeating failures.

    To be able to run consumers, please clean oro-message-queue directory that should be located at your system tmp directory (by default, this directory is /tmp) from the files that exists at this directory. After that, you will be able to run consumers.

    in reply to: problem oro:message-queue:consume crash #32435

    Yurii Muratov
    Participant

    Hello, @irina.k.melnikova.

    I just have download latest Bitnami virtual mashine image and test it. In my instance, consumer works without errors so that is why could you please describe, how did you install your allpication.

    Thanks.

    in reply to: Email, notification problem #36583

    Yurii Muratov
    Participant

    Hello, t.qadi.

    Please recheck your mailer settings at app/config/parameters.yml file.
    The list of parameters have to be checked:

    As i can see from the log, you have configured mail settings with host 127.0.0.1 and the application cannot connect to your local mail server.

    in reply to: Segments how to debug #29662

    Yurii Muratov
    Participant

    Hello, Adam.

    You can add debug breakpoint at https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/DataGridBundle/Twig/DataGridExtension.php#L167 and try to debug your exception.


    Yurii Muratov
    Participant

    Hello, oliver3.

    To do this, you can create your own widget based on the Ecommerce Statistics widget and modify queries that select data.

    For example, if MagentoOrder entity have one-to-many relation to user and this relation called sellers, the code you have to implement may be the next:

    – create own class MagentoSellerBigNumberProvider that extends MagentoBigNumberProvider in your bundle (in my example i use Acme\DemoBundle):

    At this class i rewrite some of metrics methods from the parent class and add the limitation on seller relation with addSellerLimitationToQuery function.

    – register this class as new big number (the type of widget) provider. In my example, the alias of this provider will be magento_seller:

    – Add new widget declaration in dashboards.yml file. This widget is a copy of big_numbers_widget widget but with another label and data_provider parameters in items:

    – Clear the cache.

    After that, you will be able to add new widget with title Ecommerce Seller statistics at your dashboard as well as standart Ecommerce Statistics widget.

Viewing 15 replies - 1 through 15 (of 161 total)

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

Yes No