Skip to content

strtolower issue with dropdown/multiselect attributes #408

Closed
@infabo

Description

@infabo

This is a breaker:

? $attrParams['options'][Mage::helper('fastsimpleimport')->strtolower($rowData[$attrCode])]

If available, mb_strtolower is used instead of PHP strtolower.
See here:

https://github.com/avstudnitz/AvS_FastSimpleImport/blob/develop/src/app/code/community/AvS/FastSimpleImport/Helper/Data.php#L23

But ImportExport uses PHP strtolower for "getAttributeOptions":

https://github.com/firegento/magento/blob/magento-1.9.3.6/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php#L377

It leads to a PHP notice and an not imported attribute value - when the option contains "Umlaute".

Notice: Undefined index: überspannungsschutz in /var/www/xyz/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product/Type/Simple.php on line 33

Attribute Option (actual value): Überspannungsschutz

$str = 'Überspannungsschutz';
strtolower($str) => Überspannungsschutz
mb_strtolower($str, mb_detect_encoding($str)) => überspannungsschutz

So my question to the original author of these lines

? $attrParams['options'][Mage::helper('fastsimpleimport')->strtolower($rowData[$attrCode])]

and or the helper fuction:
Why was it needed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions