• Resolved piexxer

    (@piexxer)


    Please could you advise on:

    USPS shipping increases only when unique products added to cart,

    If you have say, 1x Product (A), it’s quoted as $6.44 shipping, add 5x more of Product (A), it’s still $6.44 shipping. Add 1x Product (B), shipping increases to $11.60. Add 1x Product (C), shipping increases to usd $17.15, add 10x more of Product (C), shipping stays as $17.15.

    Is this the correct logic for this packing method? I would have thought individually packed, means any product in the cart is individual?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support IQComputing Alex

    (@iqcalex)

    Hello @piexxer

    Apologies for the radio silence, but thank you for bringing this to our attention. This appears to be an issue with Individual Shipping not being able to access the cart hash and is unable to retrieve the quantity. If you’re development savvy you may be able to use the Upcoming Release to override the current version which would resolve this issue.

    https://github.com/IQComputing/live-rates-for-shipstation/tree/upcoming

    Otherwise, we plan to ship this with further updates to the plugin early next week. In the meantime should you have further questions you may reply back to this thread and our team will response in due time. Have a wonderful rest of your week!

    Thread Starter piexxer

    (@piexxer)

    Everything in your code clearly shows it’s not related to “Individual Shipping not being able to access the cart hash and is unable to retrieve the quantity”.

    It’s a logic choice, by whoever coded this plugin, I’m guessing to avoid excessive API calls, after running a lot of tests to change this from “per product line” to “full qty per product”, I can see the issues they ran into on the calls, but also, I did re-work it to be much more efficient in it’s calls to avoid any unnecessary, as there are also other hidden areas to consider on this for performance, which your plugin does not if it was to be simply changed to full qty support logic, however it also calls in areas where it’s not ideal in it’s current logic, so there is room for improvements.

    I just wanted a quick answer without digging (Time), the reason why I approached via e-mail to decide my next option for the client, because I am not charging them for this assistance, just a goodwill support for them, though they are changing direction now, so my re-work is no longer required, I did however collect enough information in the end for any future changes if they continue to use this.

    All the best with the updates, I will keep an eye out on changes, I appreciate this is a free plugin and can be used as wished, I will make sure the client is aware of this.

    Plugin Support IQComputing Alex

    (@iqcalex)

    Hello @piexxer

    The core issue occurred when we moved the Shipping Calculator over to using Cart Hashes as Keys instead of Product IDs. Looking at the Upcoming Github Branch changes to see what was different between the previous version and now.

    https://github.com/IQComputing/live-rates-for-shipstation/commit/6c64e59fc73bc5c830adba33b858509c6b71033b

    Previously, the get_requestsby_individual() method was returning request results keyed by Product ID, as you can see on line 517 in red. We need the Cart Hash for later so that we can re-access the cart and get the quantity.

    In the process_available_rate() method, which accepts the ShipStation Rate result and 1 Package result, on line 952 in red and green, is where we’re getting the actual quantity from the cart – in which we need the cart hash to do so and not the Product ID.

    Finally, if you’re looking to modify the Calculator Object or API we do have a hook where you may completely switch out the Shipping Calculator Class, allowing you to supplement your own ShipStation API Handler Class as well, using the iqlrss/shipping/calculator_object filter hook. Using this hook you can provide an object to override the base calculator methods (as your class must inherit the base calculator class) and override the api() method. This should allow you to add in the customizations you need without having to worry about not keeping the plugin up-to-date or feeling like you have to modify the core plugin code.

    https://github.com/IQComputing/live-rates-for-shipstation/blob/main/core/shipping-method-shipstation.php#L735

    I did re-work it to be much more efficient in it’s calls to avoid any unnecessary, as there are also other hidden areas to consider on this for performance, which your plugin does not if it was to be simply changed to full qty support logic, however it also calls in areas where it’s not ideal in it’s current logic, so there is room for improvements.

    The plugin is Open Source and on Github. If you would like to make contributions based on your investigations, I’m sure everyone using this plugin would be grateful. Otherwise, if you would like to extrapolate further, our team could look at implementing these improvements.

    https://github.com/IQComputing/live-rates-for-shipstation/

    In any case we’re glad you were able to find a solution. Have a wonderful rest of your week!

    Thread Starter piexxer

    (@piexxer)

    I wasn’t working from the Github files, or seen what’s on there, though once I have time I will look at suggestions, I’ll look out for your update release to see what’s been changed.

    Plugin Support IQComputing Alex

    (@iqcalex)

    Hello @piexxer

    We wanted to let you know that the latest update pushed this morning should have the patched individual packaging in place. Hopefully this resolves the issues you were running into. If you have any further questions or find that this doesn’t fully resolves your issue, you may reply back to this thread and we may investigate further. Have a wonderful rest of your week!

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.