Closed (fixed)
Project:
Commerce Shipping
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 May 2013 at 01:49 UTC
Updated:
8 Oct 2013 at 07:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
pedrorocha commentedLooking deeper, i think that the place to change is the function commerce_shipping_service_rate_options($order). As i don't know the module code as a whole, i don't know yet if the only place to change is this one.
Comment #2
barrapontoI think
hook_commerce_shipping_service_options_altershould be enough to implement this. Of course, it could be made more friendly to data operations, like adding estimated time. I think it should at least take an array of strings and then implode them with a customizable separator. Because right now I have to assume what is the separator (usually:) before manipulating the data. Not to mention the custom text from user-generated flat rate services that brings unpredictable strings to the table :PComment #3
barrapontoSo, it seems
shipping serviceandpriceis still available as data at the timehook_commerce_shipping_line_item_new_alteris called. But unfortunately,commerce_shipping_service_rate_optionswill ignore$line_item->databy callingcommerce_shipping_service_get_titlewhich loads from straight fromcommerce_shipping_service_info. The fix is already in the current code: usecommerce_shipping_line_item_titlewhich considers$line_item->data, falls back tohook_shipping_service_infodefinitions and finally falls back to eventual custom$line_item->line_item_label.Since we already have a
$line_itemincommerce_shipping_service_rate_options, this change is swift.Comment #4
barrapontoHere's an example of adding shipping delivery estimates to the display title, made possible thanks to this patch: #1370874-5: Shipping Time.
Comment #5
Byfred commentedI've tested and the barraponto's patch worked just fine
Comment #6
googletorp commentedLooks good, sorry for the long wait time.
Committed to dev.
Comment #7
googletorp commentedForgot status update.