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

Importer/Exporter backorder compatibility #17875

Merged
merged 3 commits into from Nov 27, 2017

Conversation

claudiulodro
Copy link
Contributor

Related #11259

Adds a backorder option to the 'In stock?' CSV importer/exporter field. After this is merged the available options will be 0, 1, and backorder.

Also fixes a bug where negative numbers weren't working properly in the importer because of the ' prepended to the number.

To test: create a product with the backorder status, export a CSV, then import the generated CSV (exclude ID and SKU fields when importing to create new products).

Copy link
Member

@mikejolley mikejolley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once change then go ahead and merge 👍

* @return string
*/
protected function unescape_negative_number( $value ) {
$unescaped = str_replace( "'-", '-', $value );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use some improvement because it will replace at any point in the string. We only want to remove if it's at the beginning of the string.

@mikejolley mikejolley added needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. and removed Status: Needs Review labels Nov 23, 2017
@claudiulodro claudiulodro removed the needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. label Nov 27, 2017
@claudiulodro claudiulodro merged commit 06a9352 into feature/11259 Nov 27, 2017
@claudiulodro claudiulodro deleted the feature/csvimportexportbackorder branch November 27, 2017 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants