I'll note that this is a 'base' Zen Cart issue, not specific to OPC. I've opened the issue on the Zen Cart GitHub repository: https://github.com/zencart/zencart/issues/6023
Printable View
I'll note that this is a 'base' Zen Cart issue, not specific to OPC. I've opened the issue on the Zen Cart GitHub repository: https://github.com/zencart/zencart/issues/6023
Please note that DrByte has provided a correction on the Zen Cart GitHub (https://github.com/zencart/zencart/p...b01164048b9c77).
@jpda, could you confirm that those changes correct the issue that you identified?
@lat9
Short answer: no, they didn't.
Explanation:
I am testing on:
zc157d
OPC 2.4.6 (OPC is essential))
shipping method: storepickup with 5 locations, each with their own price.
Problem was: shipping methods are shown but none selected -> payment choices are not shown.
To test the github version of shipping.php, I only replaced its public function cheapest() in the v157d shipping.php.
(The entire github version of shipping.php doesn't work in my v157d environment.)
Tested, but no joy.
Did some debugging:
Changed line 272:
in:Code:} elseif ($size === 1) {
Reason:Code:} elseif (count($modules_with_quotes) === 1) {
module storepickup with more than one location has a $size that equals the number of locations (5 in my example).
Now it works. :smile:
Even whith more shipping modules than only storepickup, it is still working.
Tried with flat rate and table and storepickup together.
The lowest price is selected by OPC, even if it is one of the storepickup locations. Payment choices are shown.
Tested without OPC enabled. Three or four page checkout, no cheapest selected, user needs to select shipping to continue to next screen.
Would this be a solution?
Thanks,
jpda
@jpda, would you post your "Pickup Locations" setting for the storepickup module (or send to me via PM) so that I can (a) replicate the issue and (b) give your solution a try?
@lat9
Forgot this:
Shipping Cost
0.00
Tax Basis
Shipping
Thanks for the info, @jpda. I'll look at that over the weekend.
The change in shipping.php that I posted was:
is not correct if storepickup is not the only method available because count($modules_with_quotes) > 1.Code:} elseif (count($modules_with_quotes) === 1) {
I changed that line to: (rather weird...)
and then it works also when other shipping methods are available.Code:} elseif (true) {
The selected price is not always the cheapest.:(
If I find a better solution, I will let you know.
@jpda