We've just upgraded to 21.1 and I'm trying to util...
# suitecommerce
d
We've just upgraded to 21.1 and I'm trying to utilise cart getShipMethod(), getShipMethods() and setShipMethod(). These all seem to work in the checkout and my account pages, but not within the cart/basket view. Is this supposed to be the case?
s
I don't think these are available outside of the checkout because we generally don't allow shoppers to get/set this outside of the context of placing an order
d
Thanks Steve. The use case for this is we want to set customer's shipping charges based on the mix of items purchased using non-standard rules. As part of that, we really need to show the customer the correct charge in the basket. I suspect anyone using the set method in an extension is probably going to want the same. I'm going to have to go back to square one and try adding line service items for shipping in this case. That method failed previously, but hopefully I can use getLatestAddition() to overcome the issue we were having now we're on 21.1
s
Have you tried using the OOTB Shipping Estimator?
d
We have custom shipping fields on items. Items are class A or B. Shipping charges are based on "order just contains A", "just contains B" or "contains both". I'd assumed this was probably beyond the scope of standard shipping rules?
s
I don't know enough about how it works to answer that
d
OK, thanks anyway Steve. Going to try the line shipping item method and hope latest addition works reliably.