Hi,
I'm using the module Commerce Shipping 7.x-2.x-dev that allows customized display_title for shipping services.
I'm from Brazil and I'm using the module Commerce Correios --dev as a shipping method, with two shipping services enabled, SEDEX and PAC. I also applied this patch to show delivery estimates.
Is working well, but when I use this module to enable free shipping to one of my services (PAC), the price is changed to 0 as expected, but the delivery estimate is not working to this service and I'm getting this error:
Notice: Undefined index: delivery_estimates em commerce_correios_commerce_shipping_line_item_new_alter() (linha 159 de /home/brunorios/www/cmc.dev/sites/all/modules/commerce_correios/commerce_correios.module).
Screenshot:

Thank you!
| Comment | File | Size | Author |
|---|
Comments
Comment #1
delta commenteddo you need delivery_estimates ? can you explain to me what is it ?
I believe that the price data array is supposed to contain sub-prices components only.
And to avoid this error i think you simply need to check in the module commerce_correios the existent of the key 'delivery_estimate' and then assume maybe the price has been overidded somewhere, the shipping line item must be "create-able" with a total price with or without components.
Comment #2
brunorios1 commentedyes i need.
the delivery estimate is the estimated time that the service will need to deliver the order to the client.
you can see in the image that is working to the service SEDEX.
is showed like this: "2 dias úteis" ("2 business days" in brazilian portuguese).
the number of days are not being displayed in the service PAC because of the free shipping, if i remove the "free shipping" that is causing the conflict, the number of days are displayed correctly and I get no error.
Comment #3
delta commentedoh ok i understand that commerce correios (with the patch applied) use the data array to pass info for display.
I can restore the data array without the price components array. so you got back the delivery estimate or whatever a shipping service module want to pass through the data array.
Comment #4
brunorios1 commentedGreat! I will be very grateful!
Comment #5
delta commentedPlease give a try with the latest dev release and let us know if it's work in here.
If you like it. please post a word on our blog post, and let us know if you have some idea to make it more useful.
Thanks !
Comment #6
delta commentedComment #7
brunorios1 commentedGreat!!! Working perfectly!
Thanks for the quick support!