Is it possible to show a summary of the selected method of shipment below the chosen method?
For example, I choose the delivery method. Chose the first option, and under it display the description "This is self-delivery description. This is self-delivery description ..." Or, I chose the second method of delivery and disappeared description of the first method, and under it shall appear "This is Pony Expres description. This is Pony Expres description ...".


Daniel Kulbe’s picture

This possibility is available in commerce_shipping module an will be displayed as your second variation. But commerce flatrate has no callback "details_form".

It is possible to add the flatrate details as markup! It will change on the flatrate service selection.

Daniel Kulbe’s picture

Status: Active » Patch (to be ported)

Here is my solution:

@@ -165,6 +165,7 @@ function commerce_flat_rate_commerce_shipping_service_info() {
         'price_component' => $price_component_type,
         'callbacks' => array(
           'rate' => 'commerce_flat_rate_service_rate_order',
+		  'details_form' => 'commerce_flat_rate_service_rate_details',
         'base_rate' => $base_rate,
         'data' => $data,
@@ -184,6 +185,14 @@ function commerce_flat_rate_service_rate_order($shipping_service, $order) {
+ * Shipping service callback: returns the example shipping service details form.
+ */
+function commerce_flat_rate_service_rate_details($pane_form, $pane_values, $checkout_pane, $order, $shipping_service) {
+  // The details are simply defined in the service, so we return it directly.
+  return array('description' => array('#type' => 'markup', '#markup' => '<p class="help-block">'.$shipping_service['description'].'</p>'));
  * Returns an initialized flat rate shipping service array for forms.
 function commerce_flat_rate_service_new() {

Hope you put it into future releases!

dedek’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev

Yes, showing details next to shipping choice would be really perfet feature.

kafmil’s picture

I would also love to have this feature. It would then be very easy to provide a description of the different shipping services to the user at checkout time so they know what they are choosing.

srgk’s picture

this feature will be very useful

rszrama’s picture

Assigned: aa2007 » Unassigned
Status: Patch (to be ported) » Closed (works as designed)

Shipping 2.x does indeed support such a feature through its shipping service details form callbacks, it just isn't part of the Flat Rate module by default. There are simply too many configurations for us to know what core feature to add in, so right now it's best for developers to extend the module themselves through hook_commerce_shipping_service_info_alter(). You can look at the Shipping Method Example module for how to use the callbacks.

GiorgosK’s picture

I used following code to put the description of each shipping item after the DISPLAY TITLE
this only happends in the checkout page (not review and cart pages)

function MODULENAME_commerce_shipping_service_rate_options_alter(&$options, $order) {
  foreach($order->shipping_rates as $key => $shipping){
    $options[$key] = $shipping->data['shipping_service']['display_title']."
".$shipping->data['shipping_service']['description'] ; } }

hope someone finds it usefull

iMiksu’s picture

Thanks @GiorgosK for sharing the snippet. It works, but I recommend to wrap the $shipping->data['shipping_service']['display_title'] and $shipping->data['shipping_service'] by check_plain() function.