Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
Forum Replies Created
-
AuthorReplies
-
January 16, 2020 at 2:23 am in reply to: Order Processing Workflow: Which form type for custom status select field? #41286
Hi Andrey,
thanks for your reply. I adapted the code:
PHP123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657workflows:dergraf_workflow_order_processing:entity: Oro\Bundle\OrderBundle\Entity\Orderentity_attribute: order # order will be accessible by '$order' in actions and conditionsstart_step: opensteps_display_ordered: truesteps:open:order: 10allowed_transitions:- start_progressin_progress:order: 20allowed_transitions:- closeclosed:order: 30allowed_transitions:- reopenattributes:status:type: arrayproperty_path: order.manufac_status_stage1 ????po_number:property_path: order.poNumbership_until:property_path: order.shipUntilshipping_method:property_path: order.shippingMethodcustomer_notes:property_path: order.customerNotestask: # temporary attribute to store reopen tasktype: entityoptions:class: Oro\Bundle\TaskBundle\Entity\Tasktransitions:start_progress:step_to: in_progresstransition_definition: start_progress_definitionfrontend_options:icon: 'icon-play'class: 'btn-primary'form_options:attribute_fields:status: ???form_type: ~options:enum_code: stage_status ???required: trueplaceholder: falseconstraints:- NotBlank: ~choice_label: nameClicking the ‘Start Progress-Button’ in a specific order record, it results in an error, like:
‘Loading widget content failed’
and
Processor failed: “oro_workflow.transit.create_form.processor”. Reason: Parameter “form_type” must be defined for attribute “status” in workflow “dergraf_workflow_order_processing”.
My questions:
—1) line #26
custom order-entity field definition name is: manufac_status_1stage
for attributes.status.propertyPath CalmelCase should be used, or not?
both not working:
attributes.status.propertyPath: order.manufac_status_stage1
attributes.status.propertyPath: order.manufacStatusStage12) line #49
transitions.form_options:
Is ‘status’ the right value aI have to use for?3) line #52
transitions.form_options.status.options.enum_code:
I have used ‘stage_status’, which is a custom definition, used here only
Is this right, or what I have to refer to?Some explanation would be great, even for other users, having similiar problems.
Furthermore, it would be great, if you could adapt my code, including your experience to avoid missunderstanding.
Thanks a lot!!!!
Kind regards
Frank—
custom ‘dergraf_workflow_order_processing’ was created in direct analogy to oro’s
‘opportunity_flow’ provided by SalesBundle:– Custom dergraf_workflow_order_processing – attribute ‘status’ refers to custom order-entity-field ‘manufac_status_stage1’, created via backend-entity-manager, and in analogy corresponds to
– System opportunity_flow – attribute ‘status’, refering to system opportunity-entity-field ‘status’.-
This reply was modified 2 years, 5 months ago by
Frank.
November 27, 2019 at 3:30 am in reply to: Orocommerce internal order processing: May I add additional statuses to order? #41004Embarrassing.
Of course you can find the options in the internal_status field and not on the Entity edit level.Everything is good!
Frank.November 27, 2019 at 3:19 am in reply to: Orocommerce internal order processing: May I add additional statuses to order? #41003Sorry, how to enable ?
Order > Entity Management > Options
THanks a lot.
FrankNovember 27, 2019 at 2:54 am in reply to: Orocommerce internal order processing: May I add additional statuses to order? #41001Hi Michael,
thanks a lot. Very helpful. Sorry, that I did not found the Entity-managment-solution you suggested by myself.
:-)Kind regards
FrankHi Dima,
thanks a lot.
This (however its obious) helped me really a lot!
Kind regards from Germany
FrankTo renew my question as the last post in this thread …
—
FINAL QUESTION(s) in this concern:I want to build up a shopping-cart-microservice consuming/based on the web api.
1) Do I have to use the frontend api for that?
2) There a few endpoints only (none for products, cart, checkout …). Do I have to build my own ressources for that? Or can a make use of the existing checkout-workflow in some manner instead?Do you have some instructions ‘how to extend the oro web services api’ for my custom usecase?
Thanks again & regards
FrankI meen instructions concerning the web api (build new ressources …etc.) not the shopping-cart-client-microservice. The last one is another topic. I know.
:-)—
I found the error
http://<hostname_of_my_custom_oro_application>/index_dev.php/api/orders/73
in dev.log
Useful remark. Thanks a lot.Frank
I looked into dev.log, but I think it will be rather in prod.log due to the prod-endpoint.
Thanks for the urgent help!—
LAST QUESTION(s) in this concern:I want to build up a shopping-cart-microservice consuming/based on the web api.
1) Do I have to use the frontend api for that?
2) There a few endpoints only (none for products, cart, checkout …). Do I have to build my own ressources for that? Or can a make use of the existing checkout-workflow in some manner instead?
Do you have some instructions for me, how to realize this with my low skills? :-)Thanks again & regards
FrankAha!
http://<hostname_of_my_custom_oro_application>/admin/api/users
This works!!! Thanks.
—
Another topic in this regards:Am I right, that the Oauth-application (regardless wether back- or frontend) has the same access-limitations as the user or customerUser respectively?
Example to illustrate my question:
—
* CustomerUser JohnDoe has frontend-access to his order no. 73 (in result of a successfull checkout …).
* I created an Aouth-application for customerUser JohnDoe,
* Used the clientID/Secretof this Aouth-application to request an Aouth-access-token.Thean I should have access to:
http://<hostname_of_my_custom_oro_application>/api/orders/73?
I tried that, but it did not work.
Response give me:
{“errors”:[{“status”:”500″,”title”:”error exception”}]}string(466) “HTTP/1.1 500 Internal Server ErrorThanks
FrankI am working in dev-mode.
oroapp/var/logs/dev.log is empty.
FRank
Hi Yurii,
yes, this is (obviously, and), what I have done!
:-)No access for backend-outh-application, requesting endpoint /api/users … as above described.
Thanks for any recommandations.
Kind regards
FrankNovember 17, 2019 at 1:36 am in reply to: OAuth 2.0 Server: code-example for multistep client-application/microservice? #40906Hi Michael,
thanks for your reply on Saturday :-)
Ok. Though I will have to drive deeper into the application technology stacks.
Kind regards.
FrankNovember 15, 2019 at 9:10 am in reply to: OAuth 2.0 Server: code-example for multistep client-application/microservice? #40900To illustrate my problem further:
I am looking for an code-example, which makes use of the orocommerce web api to build a client frontend application.
Finally I want to build something similiar to the shopping-cart-example from imega:
http://shopcart.imega.club/Thanks for help
FrankNovember 15, 2019 at 8:56 am in reply to: OAuth 2.0 Server: code-example for multistep client-application/microservice? #40898Hi Andrey,
yes, I know about different backend/storefront api-ressources, and I know about sandboxes (swagger ui). . But this tests only one certain request/response interaction.
What I am looking for is an client application with multiple steps. In other words, how to connect the single steps to each other.
In a typical web-application I use a SessionId for that, but an api do not have/make use of it.Best way, in order to understand the pronciple, how to build an whole client application would be a complete code-example….?!
Thanks a lot.
FrankNovember 15, 2019 at 8:26 am in reply to: OAuth 2.0 Server: code-example for multistep client-application/microservice? #40895oops. I am sorry. WSSE was the wrong way. You did mentioned OAuth above ..
I have thought that the Oauth described in the userguide
https://doc.oroinc.com/user/back-office/getting-started/user-menu/oauth/#user-guide-my-profile-oauth
made use of the OAuth 2.0 extension …Obviously this was a missunderstanding.
—
However, I created an application for OAuth as described in the userguide, and followed the steps to the end. Third Party Side: Generatation of Token was succesfull:I received response from the authorization server with a JSON object (token_type, expires_in, access_token) exactly as descibed.
But how to go further on the client side?
The guide says:
Use the generated access token to make requests to the API.Hm.
I can do that once for 1 URL. But how to build a full workflow, like shopping cart, or other I do not have an imagination at all.Could you give me a practical code-example for the Client-Application (web based microservice)? This would really help.
Thanks for your effort.
Kind regard
Frank. -
This reply was modified 2 years, 5 months ago by
-
AuthorReplies