Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I've noticed a product kit often losing its sort order. It goes back to some funky sort order, and all the row weights are 0. I edit the kit to set the order how it has to be. It seems fine. When I check later, the product order is messed up again.
These are products kits for which I have been editing the individual products. That might have something to do with it.
Comment | File | Size | Author |
---|---|---|---|
#9 | 1919376-product-kit-ordering-9.patch | 1.05 KB | longwave |
#8 | ubercart-product-kit-ordering-1919376-8.patch | 1.55 KB | Jordan_Fei |
#6 | ubercart-product-kit-ordering-1919376.patch | 1.55 KB | Jordan_Fei |
#5 | ubercart-product-kit-ordering-1919376-5.patch | 1.18 KB | DanZ |
#3 | ubercart-product-kit-ordering-1919376.patch | 1.56 KB | Jordan_Fei |
Comments
Comment #1
Jordan_Fei CreditAttribution: Jordan_Fei commentedHi DanZ,
I just wonder how to set the order of a kit, if you don't set it via row weights?
I am willing to fix this bug if I can duplicate this bug. So if possible, could you provide a simple test example?
Thanks,
DanZ
Comment #2
DanZ CreditAttribution: DanZ commentedMake a kit with multiple products.
Save the kit.
Edit the kit. There's an option (with row weights or without) to change the order of the products in the kit. Change the order.
Save the kit again.
Edit, modify, and save one of the products in the kit. Any change seems to do it.
View the kit. The row weights reverted to whatever they were before before you changed them.
Edit the kit. All the row weights are 0.
Comment #3
Jordan_Fei CreditAttribution: Jordan_Fei commentedhi DanZ,
Thanks for your test case. I did a patch to fix this bug. Please review and test it.
Regards,
Jordan
Comment #4
DanZ CreditAttribution: DanZ commentedI tested this and it solved the problem.
I'd call this "Reviewed and tested by the community," except running "git apply" on the patch complains:
This is because you added a space at the end of line 242 in uc_product_kit.module. The following patch is the same as yours, but eliminates the space.
Comment #5
DanZ CreditAttribution: DanZ commentedHere's the patch.
Comment #6
Jordan_Fei CreditAttribution: Jordan_Fei commentedHi DanZ,
Thanks! I eliminated the space and attach this patch again. Hope this patch will be applied to git soon.
Jordan
Comment #8
Jordan_Fei CreditAttribution: Jordan_Fei commentedHi system,
Sorry I patched the bug fixing based on and old revision, now re-patched it.
Thanks,
Jordan
Comment #9
longwaveSimpler patch that removes the need for a database query.
Comment #10
Jordan_Fei CreditAttribution: Jordan_Fei commentedhi longwave,
Thanks for reviewing and refining it simpler.
Jordan
Comment #11
longwave@DanZ: can you test the patch in #9?
Comment #12
DanZ CreditAttribution: DanZ commentedSorry, been out of town. I'll test it this weekend.
Comment #13
DanZ CreditAttribution: DanZ commentedI tested it, and it does indeed fix the bug. I set up a test kit with three test kit and messed with the order and subsequently edited the products. The sort order stayed where it was supposed to be. I didn't note any other problems in my test.
Thanks for you both for your work fixing this annoyance.
Comment #14
longwaveCommitted.