Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

[MAGETWO-43470] ImportExport Option with coma rise PHP Notice #65

Open
piotrekkaminski opened this issue Nov 18, 2017 · 6 comments
Open

Comments

@piotrekkaminski
Copy link
Contributor

Error when import product with option label which contains symbols "," (coma) maybe doesn't work with others separator symbols (|,=)

Preconditions

None

Steps to reproduce

  1. Create product with option name "green,white"
  2. Export products
  3. Import back this CSV

Expected result

  1. Import succeeds. Option with name "green,white" present.

Actual result

  1. Error message
    import_option
@dmanners dmanners added this to the Phase 2 milestone Feb 13, 2018
@tadhgbowe
Copy link

tadhgbowe commented Jun 12, 2018

Hello.
Is this when importing product customizable options? Have we got an example CSV file?
Thanks,
Tadhg

@dmanners
Copy link
Contributor

@tadhgbowe this is for attribute options for example if you setup colour on a product.

@tadhgbowe tadhgbowe self-assigned this Jun 13, 2018
@tadhgbowe
Copy link

Hello. An update from me on this one:

[TESTED on 2.3-develop branch].

Lets zoom in on product attribute "color". I created a new Option "White, Cream" in the Admin Panel and it saved fine.
I then tried to import a new virtual product with a "color" column and the value "White, Cream". It imported fine.
I then tried to import just a color change using the "additional_attributes" column with the values "color=White, Cream,size=36". Both values imported fine.

When I then tried to import a new configurable product linking to the above virtual product using the configurable_variations with a value like this "sku=SKU123,size=34,color=White, Cream" it throws the following errors:

  1. Invalid option value for attribute "color" in row(s): 1
  2. Attribute with code "cream" is not super in row(s): 1

So, if "additional_attributes" column works then we need to find a way of making the "configurable_variations" work too.

I will continue my testing.

Cheers
Tadhg

@tadhgbowe
Copy link

@dmanners - Quick Update:

I have a solution written to allow the comma character be part of a valid super attribute option value inside the configurable_variations column. For example "color=White, Cream"

I will test with other characters like "=", "-" and "|" next. If all is well then I shall submit a pull request.

Thanks,
Tadhg

@tadhgbowe
Copy link

@dmanners - Test results with "|" pipe character.

I created a color with an option value of "Yellow | Orange"

This causes a product import failure when you try to assign that value to a configurable_variations SKU e.g. sku=YellowOrange34,size=34,color=Yellow | Orange

The pipe character is the default multi-line separator for the configurable_variations column. So there's more work required here. In the above example you can see a space before and after the "|". This also presents a problem because when they get split temporarily the value is trimmed.

Product attribute option values can have space characters before and after. This also presents challenges when importing if those values are trimmed en route. More testing required here.

Regards,
Tadhg

@tadhgbowe
Copy link

Hello.
An update from me.
I've been doing extensive testing with the product import "configurable_variations" column and what happens if the super attribute option value contains a "|", "," or "=". All three will cause problems.

But I've made a discovery. You don't need to actually have a super attribute value specified. Here's an example - this is what we're used to seeing:

sku=Yellow34,size=34,color=Yellow|sku=Yellow36,size=36,color=Yellow

You only need this:

sku=Yellow34,size=,color=|sku=Yellow36,size=,color=

So, there's not much point fixing a problem when the original values are not actually needed.

The original issue listed at the top is actually linked to custom options i.e.

Error when import product with option label which contains symbols "," (coma) maybe doesn't work with others separator symbols (|,=)

So this still remains a problem I think (my next task). I got slightly side tracked with my other comments above.

Cheers
Tadhg

magento-engcom-team pushed a commit that referenced this issue Oct 8, 2018
MQE-1068: Require Issue ID for Skipped Test
@tadhgbowe tadhgbowe removed their assignment Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants