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 the "file upload" field and process the actual CSV import?
(Choose two.)
A)
B)
C)
D)
A . Option A
B. Option B
C. Option C
D. Option D
Answer: AB
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 ControllerAdminhtmlShipmentFees 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’);
}
Latest AD0-E716 Dumps Valid Version with 69 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund