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

Fix the error of product price must be set #8712

Closed
wants to merge 1 commit into from

Conversation

Azouz-Jribi
Copy link
Contributor

@Azouz-Jribi Azouz-Jribi commented Jan 29, 2018

Questions Answers
Branch? 1.6.1.x
Description? When you create an order with the price of the product = 0 and you try to change the quantity, an error message appears "Error: the price of the product must be set".
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? http://forge.prestashop.com/browse/PSCSX-8761 and Fixes #9830
How to test? BO > create a new product (P) with price = 0, FO > order product P, BO > the order details page, try to change the quantity of the product and check if the error message "Error: The price of the product must be set" is not displayed

This change is Reviewable

@LittleBigDev
Copy link
Contributor

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


js/admin/orders.js, line 671 at r1 (raw file):

		e.preventDefault();
		var $productLineRow = $(this).closest('tr.product-line-row');

I suggest, as you started, creating all needed variables. Not only $productLineRow but also $editProductQuantity, $editProductPrice, $totalProduct, etc...
This way, you will separate selectors assignations and business logic. Logic will be easier to read and maintain.


Comments from Reviewable

Copy link
Contributor

@LittleBigDev LittleBigDev left a comment

Choose a reason for hiding this comment

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

See comment above

@Azouz-Jribi Azouz-Jribi force-pushed the PSCSX-8761 branch 2 times, most recently from cef1573 to 73b8519 Compare January 30, 2018 13:29
@Azouz-Jribi
Copy link
Contributor Author

Hi @LittleBigDev
Can you check it ?

Thanks :)

@LittleBigDev
Copy link
Contributor

:lgtm:


Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks broke.


Comments from Reviewable

@LittleBigDev LittleBigDev added the Waiting for QA Status: action required, waiting for test feedback label Jan 31, 2018
@prasanthSelvar prasanthSelvar added 1.6.1.x QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Feb 5, 2018
@mickaelandrieu mickaelandrieu added the Bug Type: Bug label Apr 3, 2018
@matks
Copy link
Contributor

matks commented Sep 12, 2019

@marionf if this bug is still happening in 1.7, we should be able to fix it thanks to this PR

@khouloudbelguith
Copy link
Contributor

@matks, @marionf => issue reported here: #9830

Thanks!

@Progi1984
Copy link
Contributor

New PR on develop branch : #16392

@matks
Copy link
Contributor

matks commented May 22, 2020

#16392 was merged 🎉 thanks @Azouz-Jribi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Type: Bug QA ✔️ Status: check done, code approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants