Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E716 Topic 3 Question 40 Discussion

Actual exam question for Adobe's AD0-E716 exam
Question #: 40
Topic #: 3
[All AD0-E716 Questions]

An Adobe Commerce developer is tasked with adding custom data to orders fetched from the API. While keeping best practices in mind, how would the developer achieve this?

Show Suggested Answer Hide Answer
Suggested Answer: C

The type of environment that will be provisioned when launching the CLI for Commerce command magento-cloud environment:branch <environment-name> is an integration environment with the code and database from the parent environment. Integration environments are temporary environments that are used for testing and development purposes on the Adobe Commerce Cloud platform. They can be created from any branch of code and have their own dedicated database and services. When creating an integration environment using the CLI for Commerce command, the code and database from the parent environment are copied to the new integration environment, creating an exact replica of the parent environment. Verified Reference: [Magento 2.4 DevDocs]


Contribute your Thoughts:

Nelida
24 days ago
Option A sounds like the way to go. Extending the API interface is the cleanest approach, and the after plugin is a nice way to encapsulate the custom data injection.
upvoted 0 times
Precious
3 days ago
I think option A is the best choice. It keeps the code clean and organized.
upvoted 0 times
...
...
Nana
26 days ago
Option A all the way! Clean, extensible, and follows best practices. Plus, it's the easiest to maintain in the long run.
upvoted 0 times
...
Percy
1 months ago
Haha, Option C is a bit of a hack, isn't it? Altering the collection query directly? That's a bit too much work if you ask me.
upvoted 0 times
Twana
20 days ago
User 1: Option A seems like the best approach, creating an extension attribute and using an after plugin.
upvoted 0 times
...
...
Chauncey
1 months ago
I was considering Option B, but you're right, Option A is probably the more robust solution. Extending the API interface is a better practice than modifying the repository.
upvoted 0 times
...
Karan
2 months ago
I personally prefer option B because it involves creating an extension attribute on the order interface and using an after plugin on the order repository interface. This way, the custom data can be easily accessed when fetching orders from the API.
upvoted 0 times
...
Tammara
2 months ago
I agree with Franklyn. Option A follows best practices and ensures that the custom data is added in a clean and efficient way.
upvoted 0 times
...
Lindsey
2 months ago
Option A seems the best approach to me. Extending the OrderInterface is the recommended way to add custom data, and using an after plugin on getExtensionAttributes() is a clean way to inject it.
upvoted 0 times
Ashton
16 days ago
User 2: I agree, it's the recommended approach for adding custom data to orders fetched from the API.
upvoted 0 times
...
Carmelina
18 days ago
User 1: I think option A is the way to go. Extending the OrderInterface and using an after plugin seems clean.
upvoted 0 times
...
...
Franklyn
2 months ago
I think option A is the best approach because it involves creating an extension attribute on the order interface and using an after plugin to add custom data.
upvoted 0 times
...

Save Cancel