[2023年11月11日] 無料Adobe AD0-E718試験問題と解答 [Q19-Q34]

Share

[2023年11月11日] 無料Adobe AD0-E718試験問題と解答

検証済みAD0-E718問題集と解答は最新AD0-E718をダウンロード

質問 # 19
An Architect wants to create an Integration Test that does the following:
* Adds a product using a data fixture
* Executes $this->someLogic->execute($product) on the product
* Checks if the result is true.
Sthis->someLogic has the correct object assigned in the setup () method-Product creation and the tested logic must be executed in the context of two different store views with IDs of 3 and 4, which have been created and are available for the test.
How should the Architect meet these requirements?

  • A. Create two test Classes With one test method each. Use the @magentoExecuteInStoreContext 3 and
    @magentoExecuteInStoreContext 4 annotations on the class level.
  • B. Create one test class with one test method. Use the \Magento\testFramework\ store\Executionstorecontext class once in the fixture and another time in the test.
  • C. Create one test class with two test methods. Use the @magentoStoreContext 3 annotation in one method and @magentoStoreContext 4 in the other one.

正解:A

解説:
Explanation
The best approach for the Architect to meet the requirements is Option B. Create two test Classes With one test method each. Use the @magentoExecuteInStoreContext 3 and @magentoExecuteInStoreContext 4 annotations on the class level. This will ensure that the fixture is executed in the context of Store View 3, and the tested logic is executed in the context of Store View 4. This approach allows for more granular control of the store views and reduces the complexity of the test.


質問 # 20
An Adobe Commerce Architect is creating a new GraphQL API mutation to alter the process of adding configurable products to the cart. The mutation accepts configurable product ID. If the given product has only one variant, then the mutation should add this variant to the cart and return not nullable cart type. If the configurable product has more variants, then the mutation should return not nullable conf igurableProduct type.
The mutation declaration looks as follows:

How should the Adobe Commerce Architect declare output of this mutation?
A)

B)

C)

  • A. Option A
  • B. Option C
  • C. Option B

正解:B

解説:
According to the Adobe Commerce Developer Guide2, a union type is a special kind of object that can be one of several types.
It is useful for returning disjoint data types from a single field.
In this case, the output of the mutation can be either Cart or ConfigurableProduct, depending on the number of variants of the given product.
Therefore, a union type should be declared for the output of this mutation, as shown in option C.
The other options are not valid syntax for union types.


質問 # 21
Since the last production deployment, customers can not complete checkout. The error logs show the following message multiple times:

The Architect finds a deployed feature that should limit delivery for some specific postcodes.
The Architect sees the following code deployed in/webapi_rest \di .xml and etc\frontend\di xml

Which step should the Architect perform to solve the issue?

  • A. Change 'after' plugin with 'around' plugin. The issue is being caused by calling the result provider code after the code of the original method.
  • B. Inject an instance of \Magentro\Quote\API\CartRepostoryInterface and receive cart instance via$this->cartRepository->get($this-session->getQucteId())
  • C. Replace the injected dependency
    \Magento\Checkout\Model\Session\With\Magento\Framework\Session\SessionManagerInterface

正解:A


質問 # 22
An Adobe Commerce Architect is troubleshooting an issue on an Adobe Commerce Cloud project that is not yet live.
The developers migrate the Staging Database to Production in readiness to Go Live. However, when the developers test their Product Import feature, the new products do not appear on the frontend.
The developers suspect the Varnish Cache is not being cleared. Staging seems to work as expected. Production was working before the database migration.
What is the likely cause?

  • A. A deployment should have been done on Production to initialize Fastly caching.
  • B. The Fastly credentials in the Production Database are incorrect.
  • C. The site URLs in the Production Database are the URLs of the Staging Instance and must be updated.

正解:A

解説:
Explanation
The likely cause of the issue is that a deployment should have been done on Production to initialize Fastly caching. This is because when the database is migrated from Staging to Production, any changes made to the Staging Database will not be reflected in the Production environment until a deployment is made. This includes any changes made to the Varnish Cache, which needs to be cleared in order for the new products to appear on the frontend.


質問 # 23
A merchant is using a unified website that supports native Adobe Commerce B2B and B2C with a single store view.
The merchant wants to show the B2B account features like negotiable quotes and credit limits in the header of the site on every page for the logged-in users who are part of a B2B company account.
Each B2B company has its own individual shared catalog and customer group, and many customer groups for non B2B customers change. The merchant requests that this should not be tied to customer groups.
Which two solutions should the Architect recommend considering public data and caching? (Choose two.)

  • A. Check if the current user is part of a B2B company within a block class and modify the output accordingly.
  • B. Create 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.
  • C. Create 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.
  • D. Create a plugin that switches the theme when a user is part of a B2B company so the output can be modified accordingly in the alternate theme.
  • E. Set whether the current user is part of a B2B company in the customer session and use that data directly to modify the output accordingly.

正解:B、C

解説:
C would involve creating a new custom condition for customer segments that allow for choosing if a user is part of a B2B company, and then use this segment to modify the output accordingly. E would involve creating 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.
To show the B2B account features in the header of the site on every page for the logged-in users who are part of a B2B company account, the Architect should recommend two solutions: C) Create 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. This solution will allow the merchant to create a customer segment based on the custom condition and use it to display different content in the header for B2B users. E) Create 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. This solution will ensure that the public content cache is varied based on the custom HTTP Context variable, which can be set based on whether the user is part of a B2B company or not. Option A is incorrect because switching the theme based on the user's B2B status is not a scalable or maintainable solution, and it will also affect the entire site's appearance, not just the header. Option B is incorrect because checking the user's B2B status within a block class will not work with public content cache, as it will not vary the cache based on that condition. Option D is incorrect because setting the user's B2B status in the customer session will not work with public content cache, as it will not vary the cache based on that data. Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/segmentation.html https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cache/page-caching/public-content.html


質問 # 24
A representative of a small business needs an Adobe Commerce Architect to design a custom integration of a third-party payment solution. They want to reduce the list of controls identified in their Self-Assessment Questionnaire as much as possible to achieve PCI compliance for their existing Magento application.
Which approach meets the business needs?

  • A. Utilize a trusted signed certificate issued by a Certification Authority (CA) to secure each connection made by the payment solution protocol via HTTPS.
  • B. Utilize the payment provider Iframe system to isolate content of the embedded frame from the parent web page.
  • C. Utilize the Advanced Encryption standard (AES-256) algorithm to encrypt all customer-sensitive data from the payment module.

正解:A

解説:
Explanation
The best approach to meet the business needs is to utilize a trusted signed certificate issued by a Certification Authority (CA) to secure each connection made by the payment solution protocol via HTTPS. This will ensure that the data exchanged between the application, the payment provider, and the customer is all encrypted and secure. Additionally, this approach will help to reduce the list of controls identified in the Self-Assessment Questionnaire, as it is a secure and approved method of protecting customer data.


質問 # 25
A merchant asks for a new category attribute to allow uploading an additional mobile image against categories. The merchant utilizes the content staging and preview feature in Adobe Commerce and wants to schedule and review changes to this new mobile image field.
A developer creates the attribute via a data patch and adds it to view/adminhtml/ui_component/category_form.xml. The attribute appears against the category in the main form, but does not appear in the additional form when scheduled updates are made.
To change this attribute when scheduling new category updates, which additional action should the Architect ask the developer to take?

  • A. The attribute must have<item name=''allow_staging'' xsi:type="boolean''>true<item> set in the =category_form.xml file under the attributes config" section.
  • B. The attribute must have its apply_to field set to "staging" in the data patch file.
  • C. The attribute must also be added to view/adminhtml/ul_component/catalogstaging_category_update_form.xml.

正解:C

解説:
This is because, in order to change the attribute when scheduling new category updates, the attribute must be added to the view/adminhtml/ulcomponent/catalogstagingcategoryupdateform.xml file in order to be displayed in the additional form when scheduling updates. This additional form is used to set the values for the category attributes when scheduling updates.


質問 # 26
An Adobe Commerce Architect designs a data flow that contains a new product type with its own custom pricing logic to meet a merchant requirement.
Which three developments are valid when reviewing the implementation? (Choose three.)

  • A. A new class with custom pricing logic, extending the abstract Product model class
  • B. New price model extending \Magento\Catalog\Model\Product\Type\Price
  • C. Data patch to register the new product type
  • D. Content of the etc/product_types.xml file
  • E. Custom type model extended from the abstract Product Type model
  • F. Hydrator for attributes belonging to the new product type

正解:B、D、E

解説:
To create a new product type with its own custom pricing logic, you need to consider the following developments:
Content of the etc/product_types.xml file. This file will define the name, label, modelInstance, and priceModel of the new product type. The modelInstance will specify the custom type model that extends from the abstract Product Type model. The priceModel will specify the new price model that extends \Magento\Catalog\Model\Product\Type\Price.
Custom type model extended from the abstract Product Type model. This model will implement the logic and behavior of the new product type, such as how to prepare product for cart, how to process buy request, how to check product options, etc.
New price model extended \Magento\Catalog\Model\Product\Type\Price. This model will implement the custom pricing logic for the new product type, such as how to calculate final price, tier price, minimal price, etc.
Reference:
1: https://meetanshi.com/blog/create-custom-product-type-in-magento-2/


質問 # 27
While reviewing a newly developed pull request that refactors multiple custom payment methods, the Architect notices multiple classes that depend on \Magento\Framework\Encryption\EncryptorInterf ace to decrypt credentials for sensitive data. The code that is commonly repeated is as follows:

In each module, the user_secret config is declared as follows:

The Architect needs to recommend an optimal solution to avoid redundant dependency and duplicate code among the methods. Which solution should the Architect recommend?

  • A. Add a plugin after the getvalue method of $sccpeConfig, remove the $encryptor from dependency and use it in the plugin to decrypt the value if the config name is 'user.secret?
  • B. Replace all Vendor\PaymentModule\Gateway\Config\Config Classes With virtualTyp- Of Magento\Payxer.t\Gateway\Conflg\Config and Set <user_secret backend_Model="Magento\Config\Model\Config\Backend\Encrypted" /> under ccnfig.xml
  • C. Create a common config service class vendor\Payment\Gateway\config\Config under Vendor.Payment and use it as a parent class for all of the Vender \EaymentModule\Gateway\Config\Config Classes and remove $sccpeConfig and $encryptor dependencies

正解:C


質問 # 28
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?

  • A. Modify the code of Myserviceso that the number of different classes and interfaces referenced anywhere inside the class is less than 13
  • B. Introduce a new class accepting those five scalars and use it in the constructor and the remaining logic of Myservice
  • C. Modify the code of Myserviceso the number of different classes, interfaces, and scalar types used as parameters in the constructor and other methods is less than 13

正解:B

解説:
Explanation
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.


質問 # 29
An Adobe Commerce Architect is supporting deployment and building tools for on-premises Adobe Commerce projects. The tool is executing build scripts on a centralized server and using an SSH connection to deploy to project servers.
A client reports that users cannot work with Admin Panel because the site breaks every time they change interface locale.
Considering maintainability, which solution should the Architect implement?

  • A. Modify project config.php file, configure 'admin_locales_for_deploy' value, and specify all required locales
  • B. Edit project env.php file, configure 'admin_locales_for.build' value, and specify all required locales
  • C. Adjust the tool's build script and specify required locales during 'setup:static-content:deploy' command

正解:C

解説:
The 'setup:static-content:deploy' command allows you to generate static view files for specific locales. If you do not specify any locales, the command uses the default locale that is set in the configuration. To avoid breaking the site when changing interface locale in the Admin Panel, you need to generate static view files for all the locales that you want to use. You can do this by adjusting the tool's build script and adding the locales as arguments to the 'setup:static-content:deploy' command. For example:
bin/magento setup:static-content:deploy en_US fr_FR de_DE
This will generate static view files for English, French, and German locales. Reference: https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/setup/static-view.html?lang=en#generate-static-view-files


質問 # 30
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?

  • A. Write a before plugin to \Magento\Quote\Model\QuoteManagement::placeOrder() and add the custom tax to the quote
  • B. Declare a new total collector in "etc/sales.xml" in a custom module
  • C. Add a new observer to the event 'sales_quote_collect_totals_before" and add the custom tax to the quote

正解: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
To add a new total to the order, the Architect should declare a new total collector in the "etc/sales.xml" file of a custom module.
This file defines the order of calculation and rendering of totals.
The Architect should also implement a model class that extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal and overrides the collect() and fetch() methods to handle the logic of adding the custom tax to the quote and order.
Reference: https://devdocs.magento.com/guides/v2.4/howdoi/checkout/checkout_new_total.html


質問 # 31
An Architect agrees to improve company coding standards and discourage using Helper classes in the code by introducing a new check with PHPCS.
The Architect creates the following:
* A new composer package under the AwesomeAgency\CodingStandard\ namespace
* The ruleset. xml file extending the Magento 2 Coding Standard
What should the Architect do to implement the new code rule?

  • A.
  • B.
  • C.

正解:C


質問 # 32
A merchant is using a unified website that supports native Adobe Commerce B2B and B2C with a single store view.
The merchant wants to show the B2B account features like negotiable quotes and credit limits in the header of the site on every page for the logged-in users who are part of a B2B company account.
Each B2B company has its own individual shared catalog and customer group, and many customer groups for non B2B customers change. The merchant requests that this should not be tied to customer groups.
Which two solutions should the Architect recommend considering public data and caching? (Choose two.)

  • A. Check if the current user is part of a B2B company within a block class and modify the output accordingly.
  • B. Create 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.
  • C. Create 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.
  • D. Create a plugin that switches the theme when a user is part of a B2B company so the output can be modified accordingly in the alternate theme.
  • E. Set whether the current user is part of a B2B company in the customer session and use that data directly to modify the output accordingly.

正解:B、C

解説:
C would involve creating a new custom condition for customer segments that allow for choosing if a user is part of a B2B company, and then use this segment to modify the output accordingly. E would involve creating 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.
To show the B2B account features in the header of the site on every page for the logged-in users who are part of a B2B company account, the Architect should recommend two solutions: C) Create 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. This solution will allow the merchant to create a customer segment based on the custom condition and use it to display different content in the header for B2B users. E) Create 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. This solution will ensure that the public content cache is varied based on the custom HTTP Context variable, which can be set based on whether the user is part of a B2B company or not. Option A is incorrect because switching the theme based on the user's B2B status is not a scalable or maintainable solution, and it will also affect the entire site's appearance, not just the header. Option B is incorrect because checking the user's B2B status within a block class will not work with public content cache, as it will not vary the cache based on that condition. Option D is incorrect because setting the user's B2B status in the customer session will not work with public content cache, as it will not vary the cache based on that data. Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/segmentation.html https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cache/page-caching/public-content.html


質問 # 33
An Architect is reviewing a custom module that is logging customer activity data on storefront using observers. The client reports that logs were recorded while the client was previewing storefront catalog pages from Admin Panel for a future scheduled campaign, using Adobe Commerce staging preview functionality.
What should the Architect check first to address this issue9

  • A. The plugin for the public method isAllowedObserver() from \Magento\Staging\Model\Event\Manager that alters the return value
  • B. The list of logging observers in bannedObservers parameter of \Magento\staging\Model\Event\Managertype in di.xml
  • C. The logging observers being copied from etc\events.xml to etc\adminhtml\events.xml with the attribute disabled=''true"

正解:B

解説:
It will allow you to exclude logging observers from being executed during staging preview functionality by adding them to bannedObservers parameter of \Magento\staging\Model\Event\Manager type in di.xml file. This will prevent customer activity data from being logged while previewing storefront catalog pages from Admin Panel for a future scheduled campaign.
The Architect should check the list of logging observers in bannedObservers parameter of \Magento\Staging\Model\Event\Manager type in di.xml. This parameter defines the list of observers that should not be executed during staging preview. The Architect should add the logging observers to this list to prevent them from recording customer activity data while previewing the storefront catalog pages from Admin Panel. Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/staging.html


質問 # 34
......

リアル問題集を使おう 100%無料AD0-E718試験問題集:https://www.goshiken.com/Adobe/AD0-E718-mondaishu.html