Jump to content

Shipping carrier name in cart page


robb84

Recommended Posts

Hello. I'm trying to show the carrier name in the cart page next to the "shipping" label. At the moment I can see only the label "shipping" and the price, but not the carrier name associated with that shipping rate showed. The file is cart-detailed-totals.tpl inside folder /themes/mytheme/templates/checkout/_partials/steps. Code interested is the following:

{foreach from=$cart.subtotals item="subtotal"}
      {if $subtotal.value && $subtotal.type !== 'tax'}
        <div class="cart-summary-line" id="cart-subtotal-{$subtotal.type}">
          <span class="label{if 'products' === $subtotal.type} js-subtotal{/if}">
            {if 'products' == $subtotal.type}
              {$cart.summary_string}
            {else}
              {$subtotal.label}
            {/if}
          </span>
          {if $subtotal.type === 'discount'}
            <span class="value">-{$subtotal.value}</span>
          {else}
            <span class="value">{$subtotal.value}</span>
          {/if}
          {if $subtotal.type === 'shipping'}
              <div><small class="value">{hook h='displayCheckoutSubtotalDetails' subtotal=$subtotal}</small></div>
          {/if}
        </div>
      {/if}
    {/foreach}

Thank you,

Prestashop 1.7.2.4

Link to comment
Share on other sites

  • 2 months later...

for you shipping geeks, I don't think having carrie in cart such a good idea....but you might like this idea....who would not?

https://www.prestaheroes.com/en-us/modules/geo-localization/prestashop-shipping-commander

six months of dev/testing...hence the reason I don't think 'in cart' that useful...

Cheers, el

Edited by El Patron (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...