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

Allow to import product with quantity set to 0 #6434

Merged
merged 1 commit into from Sep 24, 2016

Conversation

@kpodemski
Copy link
Contributor

commented Sep 21, 2016

Questions Answers
Branch? develop
Description? This change allow to import qty change for a product to set qty to 0
Type? improvement
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? no
How to test? Try to import .csv with 2 columns, id;qty, try to set qty 0 from import file, now you can't, after this change you can

@maximebiloe maximebiloe changed the title CO: Allow to import product with 0 qty Allow to import product with quantity set to 0 Sep 22, 2016

@maximebiloe

This comment has been minimized.

Copy link
Contributor

commented Sep 22, 2016

Hello @kpodemski,

Why are you removing all casting to integer?
I understand this modification (https://github.com/PrestaShop/PrestaShop/pull/6434/files#diff-7bdf6b540c21355166c0d726ffb9bf81R2214) but I don't get why you're removing the cast.

Regards

@aleeks

This comment has been minimized.

Copy link
Contributor

commented Sep 22, 2016

Hello

@maximebiloe For StockAvailable::setQuantity(), it's cast in the function : $stock_available->quantity = (int)$quantity;

@kpodemski But for $stock_manager->addProduct() I think it's needed because, it's not cast in this function. What do you think ?

@kpodemski kpodemski force-pushed the kpodemski:import-0-qty branch to 27fc47b Sep 23, 2016

@kpodemski

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2016

@aleeks @maximebiloe you're right guys, changed

@aleeks

This comment has been minimized.

Copy link
Contributor

commented Sep 23, 2016

Hello @kpodemski you remove your other changes ?! o_O

@kpodemski

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2016

@aleeks yeah, there were not really needed, for some reason i assumed that 0 cannot be integer, lololol 💀

@aleeks

This comment has been minimized.

Copy link
Contributor

commented Sep 23, 2016

@kpodemski okeeeeeey, test & merge ! nice!

@kpodemski

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2016

@aleeks travis not really likes me i guess...

@aleeks aleeks merged commit e79c780 into PrestaShop:develop Sep 24, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@aleeks

This comment has been minimized.

Copy link
Contributor

commented Sep 24, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.