I have 3 columns that I export as csv
/xcls
using PHP
.
Here is the code that export those 3 columns
case 'root':
return !empty($image->product->sku) ? $image->product->sku : '';
case 'productconjugation':
return !empty($image->{$field}) ? $image->{$field}->short_name : "";
case 'sku':
if(!empty($image->{$field})){
return $image->product->sku.'-'.$image->{$field}->short_name;
}else{
return $image->product->sku;
}
It exported to production conjugation column, but for some reasons , when I tried to concatenate it in my sku colum. It never did.
I've been staring at my code all morning, and I couldn't really spot what I did wrong.
Is this something that I did wrong in my switch case statement ?
How would one go about and debug this ?
I'm opening to any suggestions at this moment.
Any hints / suggestions / helps on this be will be much appreciated !