Shipping Estimation Format

I just caught onto this and it was bugging me that when the shipping estimate was calculated, the results showed up above the location inputs which was kind of confusing. I just simply swapped the code around so that the results would show up below the location inputs.



This is the complete file and I have highlighted what I moved in [COLOR=“Blue”]blue[/COLOR]. The only other difference in this file is that I have the estimator set to show instead of hidden.



/skins/your_skin/customer/views/checkout/components/shipping_estimation.tpl:

```php {* $Id: shipping_estimation.tpl 8072 2009-10-09 09:53:58Z zeke $ *}



{if $location == “sidebox”}

{assign var=“prefix” value=“sidebox_”}

{/if}

{if $additional_id}

{assign var=“class_suffix” value=“-$additional_id”}

{assign var=“id_suffix” value=“_$additional_id”}

{/if}



{if $location != “sidebox”}



{include file=“buttons/button.tpl” but_role=“text” but_text=$lang.estimate_shipping_cost but_id=“sw_est_box$id_suffix” but_meta=“cm-combination$class_suffix”}


{/if}

{if $location != “sidebox”}



{/if}
{if !$smarty.capture.states_built}
{include file="views/profiles/components/profiles_scripts.tpl" states=$smarty.const.CART_LANGUAGE|fn_get_all_states:false:true}
{capture name="states_built"}Y{/capture}
{/if}



{if $location == "sidebox"}{/if}
{if $additional_id}{/if}


{$lang.country}:

- {$lang.select_country} -
{assign var="countries" value=1|fn_get_simple_countries}
{foreach from=$countries item=country key=ccode}
{if $block.properties.positions == "left" || $block.properties.positions == "right"}{$country|truncate:18}{else}{$country}{/if}
{/foreach}




{$lang.state}:


- {$lang.select_state} -




{$lang.zip_postal_code}:




{include file="buttons/button.tpl" but_text=$lang.estimate but_name="dispatch[checkout.shipping_estimation]" but_role="text"}


[COLOR="Blue"]

{if $mode == "shipping_estimation" || $smarty.request.show_shippings == "Y"}

{if !$cart.shipping_failed}




{hook name="checkout:shipping_estimation"}
{foreach from=$shipping_rates key=shipping_id item=s_rate name="fee"}
{assign var="rate" value="0"}
{foreach from=$s_rate.rates key=key_id item=r}{math equation="x + y" x=$rate y=$r assign="rate"}{/foreach}


{$s_rate.name}{if $s_rate.delivery_time} ({$s_rate.delivery_time}){/if} - {include file="common_templates/price.tpl" value=$rate}


{/foreach}
{/hook}


{include file="buttons/button.tpl" but_text=$lang.select but_role="text" but_name="dispatch[checkout.update_shipping]"}



{else}


{$lang.text_no_shipping_methods}


{/if}



{/if}
[/COLOR]


{if $location != "sidebox"}


{/if} ```

Excellent, thanks for this, makes more sense this way.



Just out of interest, what is the specific code to have the estimator showing instead of hidden?



Regards,

Aleks

Removed [COLOR=“Blue”]class=“hidden”[/COLOR] from this line:


Thanks :slight_smile:



Regards,

Aleks

[quote name=‘Tool Outfitters’]Removed [COLOR=“Blue”]class=“hidden”[/COLOR] from this line:


[/QUOTE]



Thanks for this

Great post…



After estimating the shipping, we choose a shipping method and click select… shipping charges disappears therefore we have to estimate again in order to view shipping charges… is there any way that charges don’t hide?



Thanks

It’s probably due to ajax. Disable it and see if it still occurs.

I tried it still disappears Tool Outfitters … any other suggestions???

What version are you using and what changes did you make? I do not have any issues on 2.0.15.

Changed this in my 2.0.15 cart and works be-u-tifully! Thanks Tool!

[quote name='impactreact' timestamp='1285059255' post='89932']

Great post…



After estimating the shipping, we choose a shipping method and click select… shipping charges disappears therefore we have to estimate again in order to view shipping charges… is there any way that charges don't hide?



Thanks

[/quote]



I agree with this, I don't like when it hides either. I'm using the latest version. Anyone know how to change this so it doesn't hide everytime?

Anyone do this is 2.2.4? Code appears to be different

I agree the shipping estimater is confusing for customers in 2.1.4.

I actually modified mine so that it didnt need the "Select Button to be pressed as cutromers these days expect thiungs to update automatically.

Works well now in that the Shipping method the customer selects by the radio button updates the cart as soon as selected, but the estimator still collapses and the Stae is not remmbered. … maybe my cut-n-paste coder skills still need honing.



Now the other thin that customers complain of is that they dont realise they need to press the “Update” button when changing the Quantity of an item they added to the cart.

Is there some way to force an Update of the cart contents when the customer hits the “Check out” Button ?



Cheers