You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.
in app/code/community/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail.php you have
foreach ($allowedMethods as $allowedMethod) {
foreach ($calculatedMethods as $methodItem) {
if ($allowedMethod[1] == $methodItem->shippingMethodNameClean) {
is that required ? I was testing with just a single loop
foreach ($calculatedMethods as $methodItem) {
and that seemed to produce the same results ? (Or are there cases where it wouldn't )
The text was updated successfully, but these errors were encountered:
In my fork I have change the loop order, as calculated methods is in order of price, and we wanted to give free postage only on the cheapest option, hence I was wondering about this code.
it was just a fluke the order seemed right after switching - I see the order looks like that of the CSV so I will do a sort (but still require the loop swapped).
That extra loop through allowedMethods is to account for the System Configuration values, where methods might be enabled or disabled. Users might have deselected options and this should account for that. Good idea to sort them though, that should speed the loop.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
in app/code/community/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail.php you have
is that required ? I was testing with just a single loop
and that seemed to produce the same results ? (Or are there cases where it wouldn't )
The text was updated successfully, but these errors were encountered: