Skip to main content

Exportin product_code looses 0 in front of number

10 years 11 months ago #223589 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?

Please Log in or Create an account to join the conversation.

10 years 11 months ago #223617 by Jerome
Hi,

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); }
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,

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
Powered by Kunena Forum