magento - PHP : Frustrated with string encoding -
i using magento advance dataflow import importing products , have csv of products me import problem because of 1 colum in csv giving me error notice: unserialize() [function.unserialize]: error @ offset 2570 of 2616 bytes in /home/content/58/10476058/html/aaron/app/code/core/mage/dataflow/model/batch/abstract.php on line 66
i have tried removing column , working fine have tried taking care of special characters while creating csv using htmlspcialchars
, urf_encode
fot 1 column behaving odd
i have code me :
/*start getting bundle items*/ $bundle_items=''; foreach($html('.input-box option') $option){ if($option->getplaintext()!='choose selection...'){ $bundle_items.=$option->getplaintext().'|'; } } $bundle_items = rtrim($bundle_items,'|'); $bundle_items = trim($bundle_items);
the $bundle_items
string of items coming
12' round emerald isle unibead liner 52" +$137.95|15' round emerald isle unibead liner 52" +$167.95|18" round emerald isle unibead liner 52" +$204.95|21' round emerald isle unibead liner 52" +$247.95|27' round emerald isle unibead liner 52" +$376.95|28' round emerald isle unibead liner 52" +$427.95|30' round emerald isle unibead liner 52" +$491.95|33' round emerald isle unibead liner 52" +$556.95
i have tried
$bundle_items.=utf8_encode($option->getplaintext()).'|'; $bundle_items.=htmlspecialchars($option->getplaintext()).'|';
but after $bundle_items
has nothing in it.. not getting how work around 3 days frustrating.
any idea folks how rid this. edit : --------------------------------------------------------------------------------
i have thought char ' , " giving problem in unserialize() have test test string test' 12"
, working fine original string throwing error.
Comments
Post a Comment