verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

Default template for displaying rates uses deprecated method for Commerce 3 #36

Closed sparkalow closed 4 years ago

sparkalow commented 4 years ago

Description

The default template for displaying rates uses a method that results in a deprecation warning.

The warning:

Order::getAvailableShippingMethods() has been deprecated. Use Order::getAvailableShippingMethodOptions()

I'm my case switching to cart.availableShippingMethodOptions from cart.availableShippingMethods works for showing methods in the loop, but prices do not come through. [craft\commerce\models\ShippingMethodOption:_price] => null

Steps to reproduce

  1. Install Postie & Craft Commerce 3
  2. Use default template markup
  3. Observe shipping methods during checkout

Additional info

engram-design commented 4 years ago

I’ve been working with Luke on this one, and I believe its a Commerce issue - now fixed in https://github.com/craftcms/commerce/issues/1532

RitterKnightCreative commented 4 years ago

@engram-design Looks like method.getShippingRules is returning a blank array?

For example the transit time in FedEx is no longer available.

engram-design commented 4 years ago

@RitterKnightCreative Can you confirm what version of Commerce you're on?

RitterKnightCreative commented 4 years ago

Tested on latest, 3.2.3.

RitterKnightCreative commented 4 years ago

@engram-design Looks like this could be a Commerce issue then?

engram-design commented 4 years ago

Sorry to leave you hanging, seems that's the case. I might make a new issue to give it some attention.

RitterKnightCreative commented 3 years ago

@engram-design I chimed in as well on the Commerce thread, looks ike no update? Guess we''ll have to live with the deprecations for now using the old method, hopefully it sticks around...

engram-design commented 3 years ago

@RitterKnightCreative Yeah, sadly not looking good. I'll keep an eye on it all though...

RitterKnightCreative commented 3 years ago

@engram-design looks like nothing has changed thus far?

engram-design commented 3 years ago

@RitterKnightCreative Nothing new I'm afraid 🦗