Add column headers to csv export
This commit is contained in:
@@ -132,6 +132,18 @@ class ResellerController extends ActionController
|
|||||||
|
|
||||||
$fileHandle = fopen('php://output', 'wb');
|
$fileHandle = fopen('php://output', 'wb');
|
||||||
|
|
||||||
|
fputcsv($fileHandle, [
|
||||||
|
'id',
|
||||||
|
'availability',
|
||||||
|
'condition',
|
||||||
|
'description',
|
||||||
|
'image_link',
|
||||||
|
'link',
|
||||||
|
'title',
|
||||||
|
'price',
|
||||||
|
'brand',
|
||||||
|
]);
|
||||||
|
|
||||||
foreach ($data['product'] as $product)
|
foreach ($data['product'] as $product)
|
||||||
{
|
{
|
||||||
$minPrice = null;
|
$minPrice = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user