What is the problem with this xml snippet?
An Adobe Commerce developer adds a new extension attribute to add an array of values to the invoices that are fetched through the APIs. After a while, their technical manager reviews their work and notices something wrong with the extension_attributes.xml file that the developer created in their module: extension_attributes for="MagentoSalesHotelOrderInvoiceRepository">...
Given that const ADMIN_RESOURCE was NOT set on the controller of customreports-financial/index and the secret key is not enabled in the URL which users can access the page?
An Adobe Commerce developer is asked to restrict access onboth the admin menu item Custom_Reports: :Financial and the admin pagecustomreport/financial/index attached to the menu. The developer has added the resource Customreports/financial in etc/ael.xml. and the following code on etc/adninhtml/nenu.xml : Given that const ADMIN_RESOURCE was NOT set on the controller...
What is wrong with the code?
An Adobe Commerce developer has been tasked to create a new rest API endpoint to get a list of items for a CustomEntity. When testing the endpoint, it throws an exception. This is the code the developer has written forMyVendorModuleApiCustomEntityRepositoryInterface: And this is the implement method within MyVendorMyModulemodelCustomEntityRepository: What is...
What is the implication of this when php bin/magento setup:upgrade is run?
A Data Patch in a module being investigated implements MagentoFrameworkSetupPatchPatchversionlnterface and contains a getversion method which returns the string '2.4.2'. What is the implication of this when php bin/magento setup:upgrade is run?A . The patch will only apply if the version specified in the data_version column of the setbpjnodule table...
Where do you define the class that provides options for the select field that enables or disables the provider in the file etc/adminhtml/system.xml?
A Magento industry partner shipping provider has tasked you to build their integration module called MyCompany_ShippingProvider. Where do you define the class that provides options for the select field that enables or disables the provider in the file etc/adminhtml/system.xml?A . <option_model>MagentoConfigModelConfigOptionYesno</option_model>B . <source_model>MagentoConfigModelConfigSourceYesno</source_model>C . <frontend_model>MagentoConfigModelConfigFrontendYesno</frontend_model>D . <backend_model>MagentoConfigModelConfigBackendYesno</backend_model>View AnswerAnswer: B
What are the two requirements to display the "file upload' field and process the actual CSV import?
A logistics company with an Adobe Commerce extension sends a list of reviewed shipment fees to all its clients every month in a CSV file. The merchant then uploads this CSV file to a "file upload" field in admin configuration of Adobe Commerce. What are the two requirements to display...
What is wrong with the code?
An Adobe Commerce developer has been tasked to create a new rest API endpoint to get a list of items for a CustomEntity. When testing the endpoint, it throws an exception. This is the code the developer has written forMyVendorModuleApiCustomEntityRepositoryInterface: And this is the implement method within MyVendorMyModulemodelCustomEntityRepository: What is...
How would the developer resolve this?
An Adobe Commerce Developer has created a new custom block extending MagentoFrameworkviewElementAbstractBlock and has set the cache_lifetime data property for the block so that the output gets cached. The block is inserted into the sidebar, and displays differing content depending on which currency is being used. The developer finds that...
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?
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 MagentoSelesApiDataOrderInterface and an after plugin on MagentoSalesModelOrder: :getExtensionAttributes() to add the custom data.B . Create a...
Keeping performance and best practices in mind, what would be the best approach to achieve this?
An Adobe Commerce developer is developing a class that is executed in both the frontend and crontab areas. When executed in the frontend MagntoCustomerModelsession::getCu5tonteria() is called but when executed in the crontab this section of code is skipped. Keeping performance and best practices in mind, what would be the best...