[TYPO3-shop] csv-fields dont match headline
Franz Holzinger
franz at ttproducts.de
Sat Sep 17 18:06:24 CEST 2011
On 24/08/11 10:06, Uli Linn wrote:
> Hello!
>
> Im using tt_products 2.7.2 and have a problem with the .csv-files. They
> contain everything I need, but the headlines do not match the content.
>
> Until "payment_no_tax" everything is prefect, then there are a few empty
> fields (correct), but then "first_name" is empty, "last_name" contains
> the first name, "salutation" the last name and so on until the end of
> the table.
>
> I know this problam has been described here by Robert Markula ("CSV
> fields not in sync" many years ago and was reported to be fixed - but
> somehow it's stell there (also with former versions of tt_products I used).
>
> Is this a bug or can I influence this myself?
>
> Thanks a lot for your help!
>
> Uli
Hello Uli,
maybe the HTML shop template which you use is wrong. I have no other
explanation why in your case the first_name field contains the last name.
I cannot follow why the header does not fit to the columns below. It is
generated inside of a loop and the new columns are added to both rows
inside of the same loop.
The bug reported by Robert Markula has already been fixed years ago.
- Franz
Here is the corresponding PHP code:
$infoFields =
explode(',','feusers_uid,name,cnum,first_name,last_name,salutation,address,telephone,fax,email,company,city,zip,state,country,agb,business_partner,organisation_form');
foreach($infoFields as $fName) {
if ($csvlinehead != '') {
$csvlinehead .= ';';
$csvlineperson .= ';';
$csvlinedelivery .= ';';
}
$csvlinehead .= '"' . $fName . '"';
$csvlineperson .= '"' . str_replace(chr(13).chr(10), '|',
$address->infoArray['billing'][$fName]) . '"';
$csvlinedelivery .= '"' . $address->infoArray['delivery'][$fName] . '"';
}
More information about the TYPO3-project-tt-products
mailing list