Reputation: 559
I am grouping multiple products of an order and ask buyer to select a shipping service for each group.(because they get dispatched from different locations and have different delivery options)
This works ok, I can see the summarised shipping services at the checkout review (e.g. a line for each service with a value of service cost times number of groups this has been selected for).
However I cannot manage to label each shipping line item properly so that we would know what shipping was selected for which group/product. I am using the flat rate module. The label on checkout review pane is still the title of the shipping service as defined in the backend.
After modifying the line_item_label, the line item shipping service display_title or title, I still get the name of the shipping service instead of my custom text.
I am not using Rules because my logic is too complex. dpm-ing the line items shows the altered title.
Any ideas what to do?
Upvotes: 2
Views: 432
Reputation: 2207
Try the module https://www.drupal.org/project/commerce_payment_alter. In that case no custom development would be required.
Upvotes: 0
Reputation: 370
According to commerce_shipping.api.php
you could use the following hook:
If you need to add additional information for your shipping services or alter the apperance of other modules' shipping services, you can use this hook to do so with the order object available.
function hook_commerce_shipping_service_rate_options_alter(&$options, $order, &$form_state) {
// No example.
}
Upvotes: 1