- Posts: 640
- Thank you received: 16
Exportin product_code looses 0 in front of number
- PeterChain
-
Topic Author
- Offline
Less
More
10 years 11 months ago #223589
by PeterChain
Exportin product_code looses 0 in front of number was created by PeterChain
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
I have to export products that can include a 0 at the start of the product code - 00250
HikaShop is managing them correctly inside the HikaShop universe but when exporting to CSV is loosing the zeros in front so a 00250 is reduced to 250.
I analyzed the result file with plain text editor so it is not a missconversion from excel.
How can this be fixed?
-- Joomla version -- : 3.4.5
I have to export products that can include a 0 at the start of the product code - 00250
HikaShop is managing them correctly inside the HikaShop universe but when exporting to CSV is loosing the zeros in front so a 00250 is reduced to 250.
I analyzed the result file with plain text editor so it is not a missconversion from excel.
How can this be fixed?
Please Log in or Create an account to join the conversation.
10 years 11 months ago #223617
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Exportin product_code looses 0 in front of number
Hi,
It comes from the HikaShop spreadsheet helper
The value is considered as numeric by the PHP "is_numeric" function, so a number is added in the export file.
I suppose that a check as to be added to avoid that specific case.
Regards,
It comes from the HikaShop spreadsheet helper
Code:
if( is_numeric($value) ) {
$this->writeNumber($this->currLine, $i++, $value, $lastOne);
} else {
$this->writeText($this->currLine, $i++, $value, $lastOne);
}
I suppose that a check as to be added to avoid that specific case.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: PeterChain
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds