Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping attributes #150

Open
adhocore opened this issue Apr 21, 2020 · 2 comments
Open

Skipping attributes #150

adhocore opened this issue Apr 21, 2020 · 2 comments
Assignees

Comments

@adhocore
Copy link
Contributor

adhocore commented Apr 21, 2020

for example there can be many skus in a csv and some skus have values for some attribute while other skus have values for other attributes

and it maybe desirable to skip setting values for attributes for one sku but set for another.

very minimal and probably not realistic example (only to explain):

sku,color,weight
red_sku,red,
no_color_sku,,0.1

now how can we skip checking and setting weight for red_sku ad color for no_color_sku? instead of trying to set empty or 0 or some default for example aka skipping entirely?

is it possible something like this?

sku,color,weight
red_sku,red,__SKIP__
no_color_sku,__SKIP__,0.1
@wagnert
Copy link
Member

wagnert commented May 9, 2020

@adhocore In general, if you do NOT specify a value and do NOT add the column to clean-up-empty-columns array as described in the documentation the attribute value should NOT be changed. So the __SKIP__ value should not be necessary at all. The only case where I would imagine it'll make sense is, to give you the power to do that on row level also, means that in general values will be/not be cleared but in a edge case it clean-up should be skipped when the value __SKIP__ has been set, right?

@wagnert wagnert closed this as completed May 9, 2020
@wagnert wagnert reopened this May 9, 2020
@wagnert wagnert self-assigned this May 9, 2020
@adhocore
Copy link
Contributor Author

adhocore commented May 11, 2020

right, both being able to control on row level and also really skipping everything - including validation callback and any other listeners or observers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants