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

Quantity of a product cannot be modified when you try to make a return #366

Open
FranRomero opened this issue Jan 10, 2024 · 6 comments
Open
Labels
4.0.0 bug Something isn't working theme

Comments

@FranRomero
Copy link

Description

If you try to make a return of an order, you cannot select the quantity of product you want to return. Instead, when you click on quantity select, it checks/uncheck the row of the product in which you click on.

Node.js version

v18.17.0

php version

v8.1

OS and it's version

MacOs Ventura 13.6.1

Browsers

No response

Required module/theme

theme

Reproduction steps

Prestashop Version: v.8.0.4

1. BO: You have to activate returns. You can do it on "Customer Service > Merchandise Returns" and click on "Enable returns" button.
2. FO: you have to make an order with more than 1 product (f.ex 3 items of a product)
3. BO: Change the state of the order to "Delivered".
4. FO: Log in with the same customer that you have placed the order and go to details of the order that you have placed before. Try to make a return. A modal will appear and you will see that you cannot modify the quantity of products that you want to return because when you click on quantity select, the checkbox of the row just check/uncheck when you click on the full row, but the quantity select, cannot be modified.

PS: Understand BO as Back Office and FO as Front Office

I have tried to make a return on a clean PS v.8.0.4 and modal does not appear so I guess it is something related about this theme.

Thank you!

Logs

No response

@FranRomero FranRomero added the bug Something isn't working label Jan 10, 2024
@FranRomero
Copy link
Author

I have confirmed that is something related with falcon theme and the way it is handling each product row. I guess it is blocking default behaviour with Javascript when any click on a row is executed. I have made a video in which you can see the wrong behaviour. It should allow modify the quantity of product to return.

cannot.select.quantity.on.a.return.mov

@Oksydan
Copy link
Owner

Oksydan commented Jan 12, 2024

HI @FranRomero,

I was able to reproduce the problem.
I am adding this to Falcon 4 road map.
Thank you for your contribution.

@maofree
Copy link
Sponsor

maofree commented Jan 20, 2024

Hi @FranRomero
the problem is into templates/customer/_partials/order-details-return-table.tpl
find this code
$product.product.is_virtual

replace it with

$product.is_virtual

1

to fix the second problem (to select the product quantity) it is necessary to use this css code

`#order-detail .product-line__checkbox-block {
cursor: pointer !important;
}

#order-detail .product-line__checkbox-block:before {
content: none;
}`

bye

@FranRomero
Copy link
Author

Thank you @maofree, with your fix the problem that I described above is solved.

But doing some test, I have seen that there is another bug related with this screen @Oksydan. If you select one row clicking on the product row checkbox, it is marked correctly, but if you click on "Select all" checkbox and then try to mark any of the product rows checkbox, you are not able to select them.

Should I create a new ticket or does this ticket can be used for both as they are totally related?

Thanks!

@maofree
Copy link
Sponsor

maofree commented Jan 22, 2024

Hi
yes you are right, there is also a problem on that checkbox to select all items
I think it is present also in the classic theme
I've done several tests but I still can't find the error, it should be a problem in javascript

@Oksydan
Copy link
Owner

Oksydan commented Jan 22, 2024

Hi @maofree,

if you would like to fix it for version 3.X. You can submit PR.
Make sure that you create a branch from 3.X.X branch and make sure to target this branch for you PR.
Current develop branch contains multiple changes for version 4.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0.0 bug Something isn't working theme
Projects
Development

No branches or pull requests

3 participants