ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 17 - AD0-E716 discussion

Report
Export

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 the 'file upload' field and process the actual CSV import? (Choose two.)

A)

B)

C)

D)

A.
Option A
Answers
A.
Option A
B.
Option B
Answers
B.
Option B
C.
Option C
Answers
C.
Option C
D.
Option D
Answers
D.
Option D
Suggested answer: A, B

Explanation:

To display the 'file upload' field and process the actual CSV import, the following two requirements must be met:

The developer must create a new system configuration setting that specifies the path to the CSV file.

The developer must create a new controller action that handles the file upload and import process.

The system.xml file is used to define system configuration settings. The following XML snippet shows how to define a new system configuration setting for the CSV file path:

XML

<config>

<system>

<config>

<shipment_fees_csv_path>/path/to/csv/file</shipment_fees_csv_path>

</config>

</system>

</config>

The Controller\Adminhtml\ShipmentFees controller class is used to handle the file upload and import process. The following code shows how to create a new controller action that handles the file upload and import process:

PHP

public function uploadAction()

{

$file = $this->getRequest()->getFile('shipment_fees_csv_file');

if ($file->isUploaded()) {

$importer = new ShipmentFeesImporter();

$importer->import($file);

}

return $this->redirect('adminhtml/system_config/edit/section/shipment_fees');

}

asked 02/10/2024
Kanik Sachdeva
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first