A developer needs to uninstall two custom modules as well as the database data and schemas. The developer uses the following command:
bin/magento module:uninstall Vendor_SampleMinimal Vendor_SampleModifyContent
When the command is run from CLI, the developer fails to remove the database schema and data defined in the module Uninstall class.
Which three requirements should the Architect recommend be checked to troubleshoot this issue? (Choose three.)
Answer : C, E, F
To troubleshoot this issue, the Architect should check three requirements:
The composer.json file is present and defines the module as a composer package. This is necessary for the module:uninstall command to work properly, as it only applies to modules installed via composer.
The --remove-data option is specified as an argument for the CLI command. This will trigger the uninstallData() method in the Uninstall class and remove any database data related to the module.
The uninstall() method is implemented in the Uninstall class. This will trigger the uninstallSchema() method and remove any database schema related to the module. Alternatively, the uninstallSchema() method can be invoked directly in the Uninstall class.
An Architect is configuring the preload.keys for Redis on an Adobe Commerce on-premise instance.
The Architect discovers that the following cache keys are loaded on each frontend request: eav_entity_types,
GLOBAL_PLUGIN_LIST, DB_IS_UP_TO_DATE , SYSTEM_DEFAULT.
* The id_prefix of the frontend =>page_cache is set to 061_.
* The id_prefix of frontend => default: is not set.
* The Architect has enabled and configured Redis L2 caching.
How should the preload.keys be configured?
A)
B)
C)
D)
Answer : A
The preload.keys should be configured as shown in option A. This will allow Redis to preload the cache keys that are loaded on every page request, such as eav_entity_types, GLOBAL_PLUGIN_LIST, DB_IS_UP_TO_DATE , SYSTEM_DEFAULT. The keys should include the database prefix (061_) and the :hash suffix for L2 caching. The :hash suffix tells Redis to load only the hashes from Redis and the data from local storage. This will reduce the pressure on Redis and improve the performance of Magento.
An Architect is working to implement Adobe Commerce into a pre-built ecosystem in a company.
Communication between different company domains uses event-driven design and is driven via AMQP protocol with using RabbitMQ.
The Architect needs to establish the data flow between the ERP system and Adobe Commerce.
The ERP system stores only customer data excluding customer addresses.
The role of Adobe Commerce is to provide Customer Address data to the enterprise ecosystem.
Primary Customer data should not be changed from Adobe Commerce side; it should only be updated by messages data from ERP.
Which three AMQP configurations should be considered to meet these requirements? (Choose three.)
Answer : A, C, E
To establish the data flow between the ERP system and Adobe Commerce using AMQP protocol with RabbitMQ, you need to consider the following AMQP configurations:
Create a queue_consumer.xml and communication.xml configuration files for Customer data messages. These files will define the topics, handlers, and consumers that will receive and process the messages from the ERP system. The communication.xml file will also specify the schema for the Customer data messages.
Create a queue_publisher.xml configuration file for Customer Address messages. This file will define the exchange where the Customer Address messages will be published to. The exchange will route the messages to the appropriate queues based on the binding rules.
Create a queue_topology.xml configuration file for Customer Address messages. This file will define the message routing rules and declare the queues and exchanges for the Customer Address messages. The queue_topology.xml file will also specify the connection name and type for RabbitMQ.
1: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/message-queues/config-mq.html
In a custom module, an Architect wants to define a new xml configuration file. The module should be able to read all the xml configuration files declared in the system, merge them together, and use their values in PHP class.
Which two steps should the Architect make to meet this requirement? (Choose two.)
Answer : C, E
Based on these definitions, I would say that two possible steps that the Architect should make to meet the requirement are:
1. Create a Data class that implements ''\Magento\Framework\Config\Data''
2. Make a Reader class that implements ''\Magento\Framework\Config\Reader\Filesystem''
These steps would allow the custom module to read all the XML configuration files declared in the system, merge them together, and use their values in PHP class.
An Adobe Commerce Architect needs to customize the workflow of a monthly installments payment extension. The extension is from a partner that is contracted with the default website PSR which has its own legacy extension (a module using deprecated payment method).
The installment payment partner manages only initializing a payment, and then hands the capture to be executed by the PSP. Once the amount is successfully captured, the PSP notifies the website through an IPN. The goal of the IPN is only to create an "invoice" and save the 'capture information' to be used later for refund requests through the PSP itself.
The Architect needs the most simple solution to capture the requested behavior without side effects.
Which solution should the Architect implement?
Answer : C
The best solution for the Adobe Commerce Architect to implement in order to capture the requested behavior without side effects is to declare a capture command with type Magento\payment\Gateway\Command\NullCommand for the payment method CommandPool in di.xml. This will allow the partner to initialize the payment and then hand the capture over to the PSP, while also preventing the website from calling the $payment->capture() method. It will also allow the PSP to notify the website through an IPN, which will create an 'invoice' and save the 'capture information' to be used later for refund requests through the PSP itself.
A company wants to build an Adobe Commerce website to sell their products to customers in their country. The taxes in their country are highly complex and require customization to Adobe Commerce. An Architect is trying to solve this problem by creating a custom tax calculator that will handle the calculation of taxes for all orders in Adobe Commerce.
How should the Architect add the taxes for all orders?
Answer : B
you can create tax rules in Magento 2 by going to Stores > Taxes > Tax Rules and choosing or adding tax rates. However, this may not be enough for complex tax scenarios that require customization.
https://amasty.com/knowledge-base/how-to-configure-tax-calculation-in-magento-2.html
An Adobe Commerce Architect runs the PHP Mess Detector from the command-line interface using the coding standard provided with Adobe Commerce. The following output appears:
The Architect looks at the class and notices that the constructor has 15 parameters. Five of these parameters are scalars configuring the behavior of Kyservice.
How should the Architect fix the code so that it complies with the coding standard rule?
Answer : A
The best way to fix the code so that it complies with the coding standard rule is to introduce a new class accepting those five scalars and use it in the constructor and the remaining logic of Myservice. This will reduce the number of different classes, interfaces, and scalar types used as parameters in the constructor and other methods to less than 13, which is the limit set by the coding standard. Additionally, any extra code that is not necessary can be removed to reduce the general complexity of the class and improve readability.