Within a custom module, an Architect needs to define a new XML configuration file. The module must be able to read every XML configuration file declared in the system, merge them, and use their values in a PHP class.
Which two steps should the Architect take to satisfy this requirement?
Choose two
AInject a “reader” dependency for “Magento\Framework\Config\Data” in di.xml
BWrite a plugin for \Magento\Framework\Config\Data::get() and read the custom xml files
CCreate a Data class that implements “\Magento\Framework\Config\Data”
DAppend the custom xml file name in “Magento\Config\Model\Config\Structure\Reader” in di.xml
EMake a Reader class that implements “\Magento\Framework\Config\Reader\Filesystem”
0
Community Discussion
No comments yet. Be the first to start the discussion!
A third-party company needs to build an application that integrates with the Adobe Commerce system to retrieve order data for reporting. The integration requires access to the GET /V1/orders endpoint. It will invoke this endpoint automatically every hour, around the clock. The merchant wants to be able to restrict or expand access to resources and revoke that access through the Admin Panel.
Which authentication type available in Adobe Commerce should be used and implemented in the third-party system for this integration?
AUse token-based authentication to obtain the Admin Token. The third-party system will utilize the REST endpoint using the admin username and password to get the Admin Token, which will be used as the Bearer Token to authorize.
BUse token-based authentication to obtain an Integration Token. Integration will be created and activated in the admin panel using default integration token settings to get access to the token, which will be used as the Bearer Token to authorize.
CUse OAuth-based authentication to provide access to system resources. Integration will be registered by the merchant in the admin panel with an OAuth handshake during activation. The third-party system should follow OAuth protocol to authorize.
0
Community Discussion
No comments yet. Be the first to start the discussion!
What is the correct way to change the stopwords directory within the custom module?
AAdd stopwords to the stopwordsDirectory and CustomVendor_Elasticsearch to the stopwordsModule parameter of the \Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords class via di.xml
BAdd a new class implementing \Magento\Framework\Setup\Patch\PatchInterface to modify the default Value of elasticsearch\custom\stopwordspath in core_config_data table.
CAdd stopwords to the stopwordsDirectory parameter of the \Magento\Elasticsearch\Model\Adapter\Document\DirectoryBuilder class via stopwords/it.xml and Adobe Commerce will automatically detect the current module.
0
Community Discussion
No comments yet. Be the first to start the discussion!
Design and implement optimal solutions for Adobe Commerce to meet business needs
While reviewing a newly created pull request that refactors several custom payment methods, the Architect observes that multiple classes rely on \Magento\Framework\Encryption\EncryptorInterface to decrypt sensitive credential data. The commonly duplicated code is:
In every module, the user_secret configuration is declared as follows:
The Architect must recommend an optimal approach to eliminate redundant dependencies and duplicated code across the methods.
Which solution should the Architect recommend?
ACreate a common config service class Vendor\Payment\Gateway\Config\Config under Vendor_Payment and use it as a parent class for all of the Vendor\PaymentModule\Gateway\Config\Config classes and remove $scopeConfig and $encryptor dependencies
BReplace all Vendor\PaymentModule\Gateway\Config\Config classes with virtualType of Magento\Payment\Gateway\Config\Config and set <user_secret backend_model=“Magento\Config\Model\Config\Backend\Encrypted” /> under config.xml
CAdd a plugin after the getValue method of $scopeConfig, remove the $encryptor from dependency and use it in the plugin to decrypt the value if the config name is ‘user_secret’
0
Community Discussion
No comments yet. Be the first to start the discussion!
Design and implement optimal solutions for Adobe Commerce to meet business needs
An Adobe Commerce store owner creates a custom customer attribute, my_attribute.
An Architect must show additional content on the home page only to customers whose my_attribute has a specified value; the content must be identical for all such customers. The website uses Full Page Cache.
With simplicity in mind, which two steps should the Architect take to implement these requirements?
Choose two
AAdd a new context value of “my.attribute” to Magento\Framework\App\Http\Context
BCreate a Customer Segment and use “my_attribute” in the conditions
CAdd a custom block and a pHTML template with the content to the cmsjndexjndex.xml layout
DAdd a dynamic block with the content to the Home Page
EUse customer-data JS library to retrieve “my_attribute” value
0
Community Discussion
No comments yet. Be the first to start the discussion!
That's the end of the preview
It's free
100% of the questions are free for all users. No strings attached.
Design and implement optimal solutions for Adobe Commerce to meet business needsConfigure all aspects of Adobe Commerce CloudTroubleshoot to identify the root cause of issues with Adobe CommerceTroubleshoot design flowsConfigure and DeployEnforce coding standardsTroubleshoot infrastructure and configuration issuesUtilize Commerce test frameworks throughout the whole workflowCustomize Commerce features
Troubleshoot infrastructure and configuration issues
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
An Adobe Commerce Architect designs and implements functionality that adds a new Complex Product Type to an existing Adobe Commerce website. In addition to a visual demonstration of the new product type, the changes include price-index adjustments.
The website uses a multi-dimensional indexer feature to store the price index. The Architect decides to cover this with integration tests. After creating and running one test, the Architect finds that database storage is not fully cleaned.
The test method includes the following annotation declaration:
Which change should the Architect make to resolve this issue?
AAdd annotation @magentoAppIsolation enabled to method PHPDoc
BModify method PHPDoc and change annotation @magentoDbIsoiation to enabled
CCreate Custom_ProductType::Test/_files/{fixture_name}_rollback.php for every fixture
A client operates multiple warehouses from which orders can be fulfilled. The shipping cost from each warehouse changes daily because the number of available workers varies. The Architect must ensure that an order is shipped from the open warehouse with the lowest cost.
How should this functionality be implemented?
ACreate a new class as a preference for Magento\InventoryShipping\Plugin\Sales\Shipment\AssignSourceCodeToShipmentPlugin to set the lowest-cost warehouse on a shipment.
BCreate a new class implementing Magento\InventorySourceSelectionApi\Model\SourceSelectionInterface, which returns open warehouses sorted by cost.
CCreate an after plugin on Magento\InventoryDistanceBasedSourceSelection\Model\Algorithms\DistanceBasedAlgorithm to sort Warehouse sources by cost.
A merchant uses a unified website that supports native Adobe Commerce B2B and B2C through one store view.
The merchant wants B2B account features, such as negotiable quotes and credit limits, displayed in the site header on every page for logged-in users who belong to a B2B company account.
Each B2B company has its own shared catalog and customer group, while many customer groups for non-B2B customers change. The merchant requires that this association not be tied to customer groups.
Which two solutions should the Architect recommend for consideration, accounting for public data and caching?
Choose two
ACreate a Virtual Type that switches the theme when a user is part of a B2B company so the output can be modified accordingly in the alternate theme.
BCreate a new HTTP Context variable to allow for separate public content to be cached for users in B2B companies where the output can be modified accordingly.
CSet whether the current user is part of a B2B company in the customer session and use that data directly to modify the output accordingly.
DCreate a new custom condition for customer segments that allow for choosing whether a user is part of a B2B company and then use this segment to modify the output accordingly.
ECheck if the current user is part of a B2B company within a block class and modify the output accordingly.
An Adobe Commerce Architect must customize the workflow for a monthly-installments payment extension. The extension is supplied by a partner contracted with the default website Payment Service Provider (PSP), which has its own legacy extension—a module that uses a deprecated payment method.
The installments payment partner only manages payment initialization and then delegates capture execution to the PSP. After the amount is successfully captured, the PSP notifies the website by webhook. The webhook’s sole purpose is to create an “invoice” and save the “capture information” for later refund requests through the PSP itself.
The Architect needs the simplest solution to achieve the requested behavior.
Which solution should the Architect implement?
AAdd a plugin before the $invoice->capture() and change its input to prevent the call of the $payment->capture()
BChange the can_capture attribute for the payment method under config.xml to be <can_capture>0</can_capture>
CDeclare a capture command with type Magento\Payment\Gateway\Command\NullCommand for the payment method CommandPool in di.xml
An Adobe Commerce Architect is investigating an issue in which some EAV product attributes are no longer being updated.
The catalog contains 20,000 products, each with 100 attributes. Product updates run through recurring Adobe Commerce imports multiple times per day.
The Architect finds an error in the logs indicating an integrity constraint while attempting to insert a row with ID 2147483647.
What is causing this error?
AMagento framework uses INSERT on DUPLICATE, which leads to reaching the max limit of the increment of the column.
BIntegrity constraints were dropped after upgrading to the latest version, and the integrity checks were missed.
CEAV attribute import uses REPLACE, which leads to reaching the max limit of the increment of the column.
An Adobe Commerce Architect plans to create a new action that adds gift registry items to a customer’s quote.
What should the Architect do to ensure private-content blocks are updated?
AMark the controller by setting no-cache HTTP headers
BInvalidate the status of gift registry indexers
CSpecify a new action in a sections.xml configuration file
An Adobe Commerce Architect must scope a bespoke news section for a merchant’s Adobe Commerce storefront. The merchant’s SEO agency requests the following URL structure: news/\{date\}/\{article_url_key\}, where \{date\} is the article’s publication date and \{article_url_key\} is the article URL key.
The Architect determines that a news entity type will be created. The date and URL-key data will be stored on each record and generated automatically on save. Both values can be manually overridden.
The Architect needs to manage routing for this functionality while following best practice.
Which two options should the Architect consider to meet these requirements?
Choose two
ACreate a standard controller route and mapping the internal URLs (such as news/article/view/id/1) to rewrites that are generated on save and then stored in the URL rewrites table.
BCreate a custom router that runs before the standard router and matches the news portion of the URL, then looks for and loads a news article by matching the date and URL key parts of the URL.
CCreate a plugin that intercepts Magento\Framework\App\Action::execute(), looks for the news portion of the URL, and if it matches, loads the relevant news article by matching the URL date and URL key parts.
DCreate a standard controller route and an Index/Index controller class that loads the relevant news article by matching the URL date and URL key parts.
ECreate an observer that listens to the controller_front_send_response_before event, looks for the news portion of the URL, and if it matches, loads the relevant news article by matching the URL date and URL key parts.
An Adobe Commerce Architect designs a data flow that includes a new product type with custom pricing logic to satisfy a merchant requirement.
Which three steps are required to add a product type with custom pricing?
Choose three
AContent of the etc/product_types.xml file
BData patch to register the new product type
CHydrator for attributes belonging to the new product type
DNew price model extending \Magento\Catalog\Model\Product\Type\Price
ECustom type model extended from the abstract Product Type model
FA new class with custom pricing logic, extending the abstract Product model class
An Adobe Commerce Architect must log the result of a ServiceClass::getData method execution after every plugin has run. The method is public, and several plugins are declared for it. These include after and around types, all with a specified sortOrder.
Which solution should be used to fulfill this requirement?
ADeclare a new plugin with the sortOrder value lower than the lowest declared plugin sortOrder and implement aroundGetData method.
BDeclare a new plugin with the sortOrder value higher than the highest declared plugin sortOrder and implement afterGetData method.
CDeclare a new plugin with the sortOrder value higher than the highest declared plugin sortOrder and implement aroundGetData method.
A small-business representative requires an Adobe Commerce Architect to create a custom integration for a third-party payment solution. They want to minimize the controls identified in their Self-Assessment Questionnaire as much as possible in order to achieve PCI compliance for their current Magento application.
Which approach satisfies the business requirements?
AUtilize the Advanced Encryption Standard (AES-256) algorithm to encrypt all customer-sensitive data from the payment module.
BUtilize the payment provider iframe system to isolate content of the embedded frame from the parent web page.
CUtilize a trusted signed certificate issued by a Certification Authority (CA) to secure each connection made by the payment solution protocol via HTTPS.
A merchant requests a new category attribute that permits an additional mobile image to be uploaded for categories. The merchant uses Adobe Commerce Content Staging and Preview and needs to schedule and review updates to this new mobile-image field.
A developer creates the attribute using a data patch and adds it to view/adminhtml/ui_component/category_form.xml. The attribute displays on the category’s main form, but it is absent from the additional form used when scheduled updates are created.
What additional action should the Architect ask the developer to take so this attribute can be changed when scheduling new category updates?
AThe attribute must have its apply_to field set to “staging” in the data patch file.
BThe attribute must have <item name=“allow_staging” xsi:type=“boolean”>true</item> set in the category_form.xml file under the attributes ‘config’ section.
CThe attribute must also be added to view/adminhtml/ui_component/catalogstaging_category_update_form.xml.
An external system integrates product-catalog search functionality by using the Adobe Commerce GraphQL API. An Architect creates a new my_attribute attribute in the Admin panel with the frontend type select.
Later, the Architect finds that ProductInterface already includes the my_attribute field, but it returns an Int value. The Architect wants this field to use a new type that contains both the option ID and label.
To meet this requirement, an Adobe Commerce Architect creates a new module and an etc/schema.graphqls file that declares the following:
After running the setup:upgrade command, introspection still shows the ProductInterface field my_attribute as Int.
What prevented the value type of the my_attribute field from changing?
AThe Magento_CatalogGraphQI module occurs later in sequence than the Magento_GraphQI module and merging output of dynamic attributes schema reader overrides types declared in schema.graphqls
BThe fields of ProductInterface are checked during processing schema.graphqls files. If they have a corresponding attribute, then the backend_type of product attribute is set for field type.
CThe interface ProductInterface is already declared in Magento.CatalogGraphQI module. Extending requires use of the keyword extend before a new declaration of ProductInterface.
An Architect must integrate an Adobe Commerce store with a new Shipping Carrier. Cart data is sent to the Shipping Carrier’s API to obtain the price and show it to the customer. After the feature is implemented on the store, the API reaches its quota and returns the error “Too many requests”. The Shipping Carrier cautions the store that it is sending too many requests with identical content to the API.
In the carrier model, what should the Architect change to resolve the issue?
AIn _doShipmentRequest(), call canCollectRates() before sending request to the API.
BOverride getResponse(), save the response to a variable, check if the response exists, then return.
CImplement _setCachedQuotes() and _getCachedQuotes(), return the data if the request matches.
An existing Adobe Commerce website is being moved to a headless implementation.
The existing site includes an All Brands page and separate pages for every brand. All brand-related pages are cached in Varnish with tags, in the same way as products and categories.
Two new GraphQL queries have been created to expose this information to the frontend for the new headless implementation:
During testing, the queries occasionally return stale information. How should this issue be resolved while preserving performance?
ASpecify a $cache(cacheable: false) directive for each GraphQL query, making sure that the data returned is not cached, and is up to date
BSpecify a @cache(cacheIdentity: Path\To\IdentityClass) directive for each GraphQL query, corresponding to a class that adds cache tags for relevant brands and associated products
CEach GraphQL query’s resolver class should inject \Magento\GraphQlCache\Model\CacheableQuery and call setCacheValidity(true) on it as part of the resolver’s resolve function
A single Adobe Commerce Cloud instance is configured with two websites, each containing one store view and using different domains.
The default website is website_one, with store view store_one and domain storeone.com.
The second website is website_two, with store view store_two and domain storetwo.com.
The magento-vars.php file is configured as follows to determine which website each request runs against:
During testing of a new GraphQL integration, every request returned data for the default website, irrespective of the domain.
What is the cause of this issue?
AThe magento-vars.php file is not processed for any GraphQL requests, so the default website is always processed.
B$_SERVER[“MAGE_RUN_CODE”] needs to be set to store and $_SERVER[“MAGE_RUN_TYPE”] needs to be set to the store code instead.
CGraphQL requests are always run against the default store view unless a Store header or store cookie is provided.
Community Discussion