Download Online VALID AD0-E716 Exam Dumps File Instantly[Nov 05, 2023]
AD0-E716 Exam Dumps For Certification Exam Preparation
NEW QUESTION # 30
A new customer registered on the Integration environment of an Adobe Commerce Cloud project but did not receive a welcome email What would be blocking the email from being sent?
- A. SendGrid has not been configured for this environment.
- B. The Outgoing Emails setting is disabled into Environment Settings in the Project Web Interface.
- C. On all Integration environments, email is always disabled.
Answer: B
Explanation:
The reason why the new customer did not receive a welcome email is that the Outgoing Emails setting is disabled in the Environment Settings in the Project Web Interface. This setting controls whether emails are sent from the application or not. By default, this setting is disabled for integration environments to prevent spamming or testing emails from being sent to real customers or recipients. The developer can enable this setting if they want to test email functionality on integration environments. Verified Reference: [Magento 2.4 DevDocs]
NEW QUESTION # 31
An Adobe Commerce Developer has written an importer and exporter for a custom entity. The client is using this to modify the exported data and then re-importing the file to batch update the entities.
There is a text attribute, which contains information related to imagery in JSON form, media_gallery. This is not a field that the client wants to change, but the software they are using to edit the exported data seems to be modifying it and not allowing it to import correctly.
How would the developer prevent this?
A) Specify a serializer class for the attribute using the $_transformAttrs class property array for both the exporter and importer so it gets converted:
B) Strip the attribute from the imported file by adding it to the s_strippedAttrs class property array:
C) Prevent it from being exported by adding it to the $_disat>iedAttrs class property array:
- A. Option C
- B. Option A
- C. Option B
Answer: B
Explanation:
The _transformAttrs class property array of the importer and exporter classes can be used to specify a serializer class for a particular attribute. The serializer class will be used to convert the attribute value from one format to another when the data is exported or imported.
In this case, the developer can specify a serializer class that will convert the JSON data in the media_gallery attribute to a string. This will prevent the software that the client is using to modify the exported data from changing the JSON data.
The following code shows how to specify a serializer class for the media_gallery attribute:
PHP
class MySerializer
{
public function serialize($value)
{
return json_encode($value);
}
public function deserialize($value)
{
return json_decode($value);
}
}
$importer->setSerializer('media_gallery', MySerializer::class);
$exporter->setSerializer('media_gallery', MySerializer::class);
Once the serializer class has been specified, the JSON data in the media_gallery attribute will be converted to a string when the data is exported or imported. This will prevent the software that the client is using to modify the exported data from changing the JSON data.
NEW QUESTION # 32
An Adobe Commerce Cloud project is using Enhanced Integration Environments with two install a new payment module.
The developer is using Cloud CLI for Commerce tool.
What would a developer do to test this new feature under the integration environment?
- A. 1. Create a new branch from integration and install the module.
2. Push the changes.
3. Branch active status check is not necessary. - B. 1. Deactivate one of the active integration environment branches.
2. Create a new active branch from integration and install the module.
3. Push the changes. - C. 1. Duplicate one of the integration environment branches.
2. Create a new active branch from integration and install the module.
3. Push the changes.
Answer: B
Explanation:
The developer can test the new feature under the integration environment by deactivating one of the active integration environment branches, creating a new active branch from integration and installing the module, and pushing the changes. This is because Enhanced Integration Environments have a limit of four active branches at a time, and each branch has its own dedicated database and services. The developer can use the Cloud CLI for Commerce tool to manage the branches and deploy the code changes. Verified Reference: [Magento 2.4 DevDocs] 1
NEW QUESTION # 33
The di. xml file of a module attaches two plugins for the class Action.
The around plugin code is:
What would be the plugin execution order?
- A.

- B.

- C.

Answer: A
Explanation:
The plugin execution order is as follows:
PluginA::beforeDispatch()
PluginB::beforeDispatch()
PluginA::aroundDispatch()
The code in the around plugin
PluginB::afterDispatch()
PluginA::afterDispatch()
The aroundDispatch() method is executed in a separate scope, so the code in the around plugin will be executed after the beforeDispatch() methods of both plugins, but before the afterDispatch() methods of both plugins.
Here is a diagram that shows the plugin execution order:
PluginA
beforeDispatch()
aroundDispatch()
afterDispatch()
PluginB
beforeDispatch()
afterDispatch()
NEW QUESTION # 34
An Adobe Commerce Cloud merchant has been experiencing significant downtime during production deployment. They have already checked that the application is in ideal state.
In addition to the configuration of the SCD.MATRIX variable to reduce amount of unnecessary theme files, what would be the next steps to reduce the downtime?
- A. 1. Check SCD is configured under the build phase.
2. Increase the SCD.THREADS to speed up the build process. - B. 1. Check SCD is configured under the build phase.
2. Check if Adobe Commerce Cloud automatically adjusts SCD.THREADS. - C. 1. Check SCD is configured under deploy phase.
2. Decrease the SCD.THREADS to speed up the build process
Answer: A
Explanation:
The next steps to reduce the downtime are to check that the SCD is configured under the build phase and to increase the SCD.THREADS to speed up the build process. The SCD stands for static content deployment, which is the process of generating and deploying static files such as CSS, JS, images, etc. By configuring the SCD under the build phase, the static files are generated before the code is deployed to the production environment, which reduces the downtime during deployment. The SCD.THREADS is a variable that determines how many threads are used for parallel processing during the SCD. By increasing the SCD.THREADS, the developer can improve the performance and efficiency of the SCD process. Verified Reference: [Magento 2.4 DevDocs] 12
NEW QUESTION # 35
Which hashing algorithm will Adobe Commerce choose to hash customer passwords?
- A. If the Sodium extension is installed, SHA256 will be chosen, otherwise MD5 will be used as the Magento default hashing algorithm.
- B. It does not matter if the Sodium extension is installed or not, the Magento hashing default algorithm will be SHA256.
- C. If the Sodium extension is installed, Argon 2ID13 will be chosen, otherwise SHA256 will be used as the Magento default hashing algorithm.
Answer: C
Explanation:
If the Sodium extension is installed, Argon 2ID13 will be chosen as the Magento default hashing algorithm. Otherwise, SHA256 will be used.
The Sodium extension is a PHP extension that provides cryptographic functions. Argon 2ID13 is a password hashing algorithm that is considered to be more secure than SHA256.
If the Sodium extension is installed, Magento will use Argon 2ID13 as the default hashing algorithm for customer passwords. If the Sodium extension is not installed, Magento will use SHA256 as the default hashing algorithm.
NEW QUESTION # 36
An Adobe Commerce developer is asked to change the tracking level on a custom module for free downloading of pdf and images.
The module contains following models:
Download class has a parameter for tracking_level.
How will the developer configure the tracking_level parameter, in di.xml.to have a value of 4 for Download class and all classes that extend Download?
- A.

- B.

- C.

Answer: C
Explanation:
To configure the tracking_level parameter in di.xml to have a value of 4 for the Download class and all classes that extend Download, the developer would use the following code:
<config>
<global>
<models>
<Vendor\FreeDownload\Model\Download>
<setting name="tracking_level" value="4"/>
</Vendor\FreeDownload\Model\Download>
<Vendor\FreeDownload\Model\DownloadPdf>
<rewrite name="tracking_level" value="4"/>
</Vendor\FreeDownload\Model\DownloadPdf>
<Vendor\FreeDownload\Model\DownloadImage>
<rewrite name="tracking_level" value="4"/>
</Vendor\FreeDownload\Model\DownloadImage>
</models>
</global>
</config>
The setting element is used to set a configuration value for a specific model. The rewrite element is used to override the default configuration value for a specific model. In this case, the tracking_level parameter is set to 4 for all models that extend Download.
NEW QUESTION # 37
An Adobe Commerce developer is creating a new module to extend the functionality of the cart. The module is installed in app/code/CompanyName/ModuleName/.
How would an Adobe Commerce developer extend the existing CartltemPrices GraphQL schema to include a custom base_price field?
- A. Add the following to the module's etc/graphqi/di.xmi file:

- B. Add the following to the module's etc/schema.graphqis file:

- C. Create and Configure a <prefffrence> for Hagento\QuoteGraphQl\Model\Resolver\CartItemPrices that adds the base_price field in the resolve() function.
Answer: B
Explanation:
The developer can extend the existing CartltemPrices GraphQL schema to include a custom base_price field by adding the following code to the module's etc/schema.graphqls file:
extend type CartltemPrices { base_price: Money! @doc(description: "The base price of the cart item") } This code adds a new field called base_price to the CartltemPrices type and specifies that it is of type Money and it is not nullable. The @doc directive adds a description for the field that will be shown in the schema documentation. The developer also needs to create a custom resolver class for the base_price field and declare it in the di.xml file of the module. Verified Reference: [Magento 2.4 DevDocs] [Magento Stack Exchange]
NEW QUESTION # 38
How would a developer turn on outgoing emails on an Adobe Commerce Cloud Staging environment?
- A. From the command line
magento-cloud environment:info -p <project-id> -e <environment-id> enable_smtp true - B. Access the Project Web Interface and select the Staging environment.
Select Configure environment. - C. From the command line
ece-tools enable_smtp true
Answer: B
Explanation:
Toggle Outgoing emails On
Explanation:
The developer can turn on outgoing emails on an Adobe Commerce Cloud Staging environment by accessing the Project Web Interface and selecting the Staging environment. Then, the developer can select Configure environment and toggle Outgoing emails On. This will enable the SMTP service for the Staging environment and allow emails to be sent from the application. Verified Reference: [Magento 2.4 DevDocs] 1
NEW QUESTION # 39
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?
- A. Create an extension attribute On Magento\Sales\Api\Data\OrderInterface and an after plugin On Magento\Sales\Api\OrderRepositoryInterface On geto and getListo to add the custom data.
- B. Create a before plugin on Magento\sales\model\ResourceModel\order\collection: :load and alter the query to fetch the additional data. Data will then be automatically added to the items fetched from the API.
- C. Create an extension attribute on Nagento\sales\Api\E)ata\orderinterface and an after plugin on Magento\Sales\Model\Order: :getExtensionAttributes() to add the custom data.
Answer: A
Explanation:
The developer should create an extension attribute on the Magento\Sales\Api\Data\OrderInterface interface and an after plugin on the Magento\Sales\Api\OrderRepositoryInterface::get() and Magento\Sales\Api\OrderRepositoryInterface::getList() methods.
The extension attribute will store the custom data. The after plugin will be used to add the custom data to the order object when it is fetched from the API.
Here is the code for the extension attribute and after plugin:
PHP
namespace MyVendor\MyModule\Api\Data;
interface OrderExtensionInterface extends \Magento\Sales\Api\Data\OrderInterface
{
/**
* Get custom data.
* * @return string|null
*/
public function getCustomData();
/**
* Set custom data.
* * @param string $customData
* @return $this
*/
public function setCustomData($customData);
}
namespace MyVendor\MyModule\Model;
class OrderRepository extends \Magento\Sales\Api\OrderRepositoryInterface
{
/**
* After get order.
* * @param \Magento\Sales\Api\OrderRepositoryInterface $subject
* @param \Magento\Sales\Api\Data\OrderInterface $order
* @return \Magento\Sales\Api\Data\OrderInterface
*/
public function afterGetOrder($subject, $order)
{
if ($order instanceof OrderExtensionInterface) {
$order->setCustomData('This is custom data');
}
return $order;
}
/**
* After get list.
* * @param \Magento\Sales\Api\OrderRepositoryInterface $subject
* @param \Magento\Sales\Api\Data\OrderInterface[] $orders
* @return \Magento\Sales\Api\Data\OrderInterface[]
*/
public function afterGetList($subject, $orders)
{
foreach ($orders as $order) {
if ($order instanceof OrderExtensionInterface) {
$order->setCustomData('This is custom data');
}
}
return $orders;
}
}
Once the extension attribute and after plugin are created, the custom data will be added to orders fetched from the API.
NEW QUESTION # 40
A Project Architect needs to add a new developer who needs to be able to push code in an Adobe Commerce Cloud project. No integration with a third-party repository provider is setup.
What two actions would be required to ensure the developer has access? (Choose Two.)
- A. The developer needs to add SSH public key in the Cloud Account dashboard settings
- B. The developer's email must be added under Users in the Cloud Project Web Ul
- C. The developer's SSH public key must be added into a file named ~/.ssh/authorized_keys
- D. The Adobe Commerce admin user must be created and the developer's SSH public key must be added on their local system
Answer: A,B
Explanation:
To ensure the developer has access to push code in an Adobe Commerce Cloud project, the developer's email must be added under Users in the Cloud Project Web UI and the developer needs to add SSH public key in the Cloud Account dashboard settings. The Cloud Project Web UI is a web interface that allows managing and configuring Adobe Commerce Cloud projects and environments. The developer's email must be added under Users to grant them access to the project and assign them a role and permissions. The Cloud Account dashboard settings is a web interface that allows managing and configuring Adobe Commerce Cloud accounts and SSH keys. The developer needs to add SSH public key in the settings to enable secure connection to the project and environments via SSH. Verified Reference: [Magento 2.4 DevDocs]
NEW QUESTION # 41
An Adobe Commerce developer is working on a Magento 2 instance which contains a B2C and a B2B website, each of which contains 3 different store views for English, Welsh, and French language users. The developer is tasked with adding a link between the B2C and B2B websites using a generic link template which is used throughout the sites, but wants these links to display in English regardless of the store view.
The developer creates a custom block for use with this template, before rendering sets the translate locale and begins environment emulation using the following code:
They find that the template text is still being translated into each stores language. Why does this occur?
- A. startEnvironmentEmuiation() resets the translation locale to the one of the emulated stores, which overrides the locale the developer has set when the order of setLocate and startEnvironmentEmulation is used as displayed above.
- B. startEnvironmffntEmulation() SetS and locks the locale by Using the setLocale() Optional Second $lock parameter, i.e. setLocale($newLocaleCode, true), to override and lock the locale of the emulated store. If this is set and locked initially then the environment emulation will not be able to override this.
- C. setLocate() does not change translation locale after it has been initially set, the $this->_translate->emulate($newLocaiecode) method exists to temporarily modify this by pushing the new locale to the top of the current emuiatedLocales stack.
Answer: A
Explanation:
The startEnvironmentEmulation() method resets the translation locale to the one of the emulated stores, which overrides the locale the developer has set when the order of setLocale() and startEnvironmentEmulation() is used as displayed above.
The correct way to achieve the desired result is to use the emulate() method to temporarily modify the translation locale. The following code shows how to do this:
PHP
$this->_translate->emulate('en_US');
// Render the template
$this->_translate->revert();
This code will set the translation locale to English before rendering the template, and then revert the locale back to the default value after the template has been rendered.
The startEnvironmentEmulation() method is used to emulate a different store view or website. This can be useful for testing purposes, or for developing features that need to work in different environments.
The emulate() method is used to temporarily modify the translation locale. This can be useful for rendering templates in a specific language, or for testing features that need to work in different languages.
NEW QUESTION # 42
An Adobe Commerce Developer wishes to add an action to a pre-existing route, but does not wish to interfere with the functionality of the actions from the original route.
What must the developer do to ensure that their action works without any side effects in the original module?
- A. Add the action into to the controllers/front_name/ in My.Module, Magento will automatically detect and use it.
- B. In the route declaration, use the before or after parameters to load their module in before or after the original module.
- C. Inject the new action into the standard router constructor's $actiomist parameter.
Answer: B
Explanation:
To add an action to a pre-existing route without interfering with the functionality of the original route, the developer must use the before or after parameters in the route declaration. This will load the developer's module in before or after the original module, respectively.
For example, the following code would add an action to the my_module/index route before the action from the original module:
<route id="my_module/index">
<before>my_module_before</before>
<action class="MyModule\Controller\Index">
<arguments>
<argument name="context" type="Magento\Framework\App\Action\Context"/>
</arguments>
</action>
</route>
The my_module_before action would be executed before the MyModule\Controller\Index action, which would allow the developer to perform any necessary setup before the original action is executed.
NEW QUESTION # 43
An Adobe Commerce developer is being tasked with creating a new cron job to run a method that has already been written. What are the minimally required steps to accomplish this?
- A. Create a crontab.xmi file and a new system configuration in system.xmi for the schedule.
- B. Create crontab.xmi and cron_groups.xmi files to assign the new job to a cron group.
- C. Create a crontab.xmi file and set a schedule for the new cron job.
Answer: C
Explanation:
According to the Configure and run cron guide for Magento 2 developers, the crontab.xmi file is used to declare and configure cron jobs for a module. The file should specify the name, instance, method and schedule of the cron job. Therefore, creating a crontab.xmi file and setting a schedule for the new cron job are the minimally required steps to accomplish this task. Verified Reference: https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cron.html
NEW QUESTION # 44
An Adobe Commerce developer was asked to provide additional information on a quote. When getting several quotes, the extension attributes are returned, however, when getting a single quote it fails to be returned.
What is one reason the extension attributes are missing?
- A. The developer neglected to provide a plugin On Hagento\Quote\Api\CartRepositoryInterface: :get.
- B. The developer neglected to add coiiection="trueM to their attribute in etc/extension_attributes.xmi file. O ottribute code="my_attributesM type="MyVendor\MyModule\Api\Data\^AttributeInterface[]M collection="true" />
- C. The developer neglected to implement an observer on the coiiection_ioad_after event.
Answer: B
Explanation:
The extension attributes are missing because the collection="true" attribute is not set in the etc/extension_attributes.xmi file. This attribute tells Magento that the extension attributes should be returned when the quote is retrieved.
To fix this issue, the developer needs to add the collection="true" attribute to the my_attributes extension attribute.
<attribute code="my_attributes" type="MyVendor\MyModule\Api\Data\AttributeInterface[]" collection="true" /> Once the collection="true" attribute is set, the extension attributes will be returned when the quote is retrieved.
NEW QUESTION # 45
On an Adobe Commerce Cloud platform, at what level is the variable env: composer_auth located in the Project Web Interface?
- A. In the Project variables.
- B. In the Integration variables.
- C. In the Environment-specific variables.
Answer: A
Explanation:
The variable env: composer_auth is located in the Project variables section in the Project Web Interface. This variable is used to store the authentication credentials for Composer repositories that require access keys or tokens. The developer can set this variable at the project level to apply it to all environments, or override it at the environment level if needed. Verified Reference: [Magento 2.4 DevDocs] 2
NEW QUESTION # 46
A developer is working on an Adobe Commerce Cloud project and wants to get connection data for the environment's deployed services. The developer has all of the necessary permissions to do this.
Which two options would the developer take to get the connection credentials? (Choose Two.)
- A. Get the data from the Project Web Interface dedicated section.
- B. Connect to server via SSH and read $_ENV['services'] variable.
- C. Execute ece-tools env:config:show services Command.
- D. Run the magento-cloud relationships CLI Command.
Answer: B,D
Explanation:
Two options to get the connection credentials for the environment's deployed services are to run the magento-cloud relationships CLI command and to connect to the server via SSH and read $_ENV['services'] variable. The magento-cloud relationships CLI command displays information about the relationships between an environment and its services, such as database, cache, search, etc. The developer can use this command to get the connection data for each service in JSON format. Alternatively, the developer can connect to the server via SSH and read the $_ENV['services'] variable, which contains the same information as the CLI command output. Verified Reference: [Magento 2.4 DevDocs] 3
NEW QUESTION # 47
A message queue currently has queue/consumer-wait-for-messages set to true, which allows the consumer process to run until a message is inserted into the queue. A piece of functionality is driven by data stored in the model
\Magento\variable\Model\variable and this value is only loaded once during the consumer run. If the variable is updated we want the consumer to restart so that the new value is loaded into memory without having to reload the variable on each message consumed.
The Adobe Commerce developer has created an after plugin on the \Magento\Variable\Model\variable:: save() function.
How would the developer use the plugin to trigger the consumer restart?
- A. Set the global Cache key trigger_consumer_restart t0 1.
- B. Call the function \Magento\Framework\MessageQueue\Consumers\TriggerRe5tartInterface:trigger().
- C. Call the function \Magento\Framework\MessageQueue\PoisonPill\Poi5onPillPutInterface::put().
Answer: B
Explanation:
The developer can use the plugin to trigger the consumer restart by calling the function \Magento\Framework\MessageQueue\Consumers\TriggerRe5tartInterface:trigger(). This function will write a flag to the cache storage that will be checked by the consumer process. If the flag is set, the consumer process will terminate itself and restart with the updated configuration. Verified Reference: [Magento 2.4 DevDocs] 1
NEW QUESTION # 48
On an Adobe Commerce Cloud platform, in which order does the ECE-Tools package apply patches?
- A. 1. All required Magento patches included in the Cloud Patches for Commerce package.
2. Selected optional Magento patches included in the Quality Patches Tool.
3. Custom patches in the /m2-hotfixes directory in alphabetical order by patch name. - B. 1. Custom patches in the /m2-hotfixes directory in alphabetical order by patch name.
2. All required Magento patches included in the Cloud Patches for Commerce package.
3. Selected optional Magento patches included in the Quality Patches Tool. - C. 1. All required Magento patches included in the Cloud Patches for Commerce package.
2. Custom patches in the /m2-hotfixes directory in alphabetical order by patch name.
3. Selected optional Magento patches included in the Quality Patches Tool.
Answer: A
Explanation:
The order in which the ECE-Tools package applies patches is as follows:
All required Magento patches included in the Cloud Patches for Commerce package.
Selected optional Magento patches included in the Quality Patches Tool.
Custom patches in the /m2-hotfixes directory in alphabetical order by patch name.
The ECE-Tools package is a set of scripts and tools designed to manage and deploy Adobe Commerce Cloud projects. The Cloud Patches for Commerce package is a dependency of ECE-Tools that provides a set of required patches for Magento core issues that affect Adobe Commerce Cloud functionality. The Quality Patches Tool is an optional tool that allows developers to apply individual patches for specific Magento issues without waiting for a full product release. The /m2-hotfixes directory is a directory where developers can place their own custom patches for their Adobe Commerce Cloud projects. Verified Reference: [Magento 2.4 DevDocs]
NEW QUESTION # 49
The developer is required to convert a modules database scripts from old install/upgrade setup files to a data patches format and does not want to apply database changes that were already done by install/upgrade scripts.
The current module version is 1.5.4.
What would be the recommended solution to skip changes that were already applied via old format (install/upgrade scripts)?
- A. This is not possible. A module cannot implement both data patch and install scripts.
- B. Inside apply() method, check for module version and run the code if version is less than 1.5.4.
- C. Implement Patchversioninterface and return 1.5.4 on the getversion() method.
Answer: C
Explanation:
According to the Develop data and schema patches guide for Magento 2 developers, data patches are classes that contain data modification instructions. They are defined in a <Vendor>/<Module_Name>/Setup/Patch/Data/<Patch_Name>.php file and implement MagentoFrameworkSetupPatchDataPatchInterface. Data patches can also implement Patchversioninterface to specify the module version that the patch is associated with. The getVersion() method returns the module version as a string. To skip changes that were already applied via old format (install/upgrade scripts), the developer should implement Patchversioninterface and return 1.5.4 on the getVersion() method. This way, the data patch will only be applied if the module version is greater than or equal to 1.5.4. Verified Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/data-patches.html
NEW QUESTION # 50
An Adobe Commerce developer has added a new configuration field to the admin are a. The path for this option is general/store_information/out_of_hours_phone.
Keeping simplicity in mind, how would the developer ensure this option contains a valid US telephone number?
- A. Add <validate type="phoneUS"/> to the field in system.xml.
- B. Create a backend model to check the validity of the phone number entered.
- C. Add <validate>phoneUS</validate> to the field in system.xml.
Answer: C
Explanation:
According to the Magento Stack Exchange answer, system.xml is a file that defines the configuration fields for the admin area. Each field can have a validate attribute that specifies a validation rule for the field value. Magento provides some built-in validation rules, such as phoneUS, which validates a US telephone number. Therefore, to ensure that the option contains a valid US telephone number, the developer needs to add <validate>phoneUS</validate> to the field in system.xml. Verified Reference: https://magento.stackexchange.com/questions/104570/magento-2-system-xml-validation-rules
NEW QUESTION # 51
There is the task to create a custom product attribute that controls the display of a message below the product title on the cart page, in order to identify products that might be delivered late.
The new EAV attribute is_delayed has been created as a boolean and is working correctly in the admin panel and product page.
What would be the next implementation to allow the is_delayed EAV attribute to be used in the .phtml cart page such as $block->getProduct()->getIsDelayed()?
A)
Create a new file etc/catalog_attributes.xmi:
B)
Create a new file etc/extension attributes.xmi:
Create a new file etc/eav attributes.xmi:
- A. Option C
- B. Option A
- C. Option B
Answer: B
Explanation:
To allow the is_delayed EAV attribute to be used in the .phtml cart page, the developer needs to create a new file called etc/catalog_attributes.xmi. This file will contain the definition of the is_delayed attribute.
The following code shows how to create the etc/catalog_attributes.xmi file:
XML
<?xml version="1.0"?>
<catalog_attributes>
<attribute code="is_delayed" type="int">
<label>Is Delayed</label>
<note>This attribute indicates whether the product is delayed.</note>
<sort_order>10</sort_order>
<required>false</required>
</attribute>
</catalog_attributes>
Once the etc/catalog_attributes.xmi file has been created, the is_delayed attribute will be available in the .phtml cart page. The attribute can be accessed using the getIsDelayed() method of the Product class.
PHP
$product = $block->getProduct();
$isDelayed = $product->getIsDelayed();
The isDelayed variable will contain the value of the is_delayed attribute. If the value of the attribute is 1, then the product is delayed. If the value of the attribute is 0, then the product is not delayed.
NEW QUESTION # 52
......
Latest Verified & Correct AD0-E716 Questions: https://www.prep4away.com/Adobe-certification/braindumps.AD0-E716.ete.file.html
100% Pass Guaranteed Download Adobe Commerce Exam PDF Q&A: https://drive.google.com/open?id=19GN_rRPguGiIfHcUmKnjEgzGNQD7uMFf