Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 ...".
Comments
Comment #1
Daniel KulbeThis 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.
Comment #2
Daniel KulbeHere is my solution:
Hope you put it into future releases!
Comment #3
dedek CreditAttribution: dedek commentedYes, showing details next to shipping choice would be really perfet feature.
Comment #4
kurtfoster CreditAttribution: kurtfoster commentedI 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.
Comment #5
srgk CreditAttribution: srgk commentedthis feature will be very useful
Comment #6
rszrama CreditAttribution: rszrama commentedShipping 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.
Comment #7
GiorgosKI 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)
hope someone finds it usefull
Comment #8
iMiksuThanks @GiorgosK for sharing the snippet. It works, but I recommend to wrap the
$shipping->data['shipping_service']['display_title']
and$shipping->data['shipping_service']
bycheck_plain()
function.Thanks!