Jump to content
Ecompx

Remove Addresses from Shopping Cart Summary

Recommended Posts

I would like to remove the two addresses displayed on the Shopping Cart Summary page for the Prestashop default theme (see screenshot attached) because their is a dedicated page for addresses further on in the checkout process.

 

post-750922-0-38968700-1458677623_thumb.png

Share this post


Link to post
Share on other sites

would be grateful for any help to remove addresses in shopping cart summary for Prestashop version 1.6.1.4.

Share this post


Link to post
Share on other sites

I removed this and it worked.


    {if !$advanced_payment_api && ((!empty($delivery_option) && (!isset($isVirtualCart) || !$isVirtualCart)) OR $delivery->id || $invoice->id) && !$opc}
        <div class="order_delivery clearfix row">
            {if !isset($formattedAddresses) || (count($formattedAddresses.invoice) == 0 && count($formattedAddresses.delivery) == 0) || (count($formattedAddresses.invoice.formated) == 0 && count($formattedAddresses.delivery.formated) == 0)}
                {if $delivery->id}
                    <div class="col-xs-12 col-sm-6"{if !$have_non_virtual_products} style="display: none;"{/if}>
                        <ul id="delivery_address" class="address item box">
                            <li><h3 class="page-subheading">{l s='Delivery address'}&nbsp;<span class="address_alias">({$delivery->alias})</span></h3></li>
                            {if $delivery->company}<li class="address_company">{$delivery->company|escape:'html':'UTF-8'}</li>{/if}
                            <li class="address_name">{$delivery->firstname|escape:'html':'UTF-8'} {$delivery->lastname|escape:'html':'UTF-8'}</li>
                            <li class="address_address1">{$delivery->address1|escape:'html':'UTF-8'}</li>
                            {if $delivery->address2}<li class="address_address2">{$delivery->address2|escape:'html':'UTF-8'}</li>{/if}
                            <li class="address_city">{$delivery->postcode|escape:'html':'UTF-8'} {$delivery->city|escape:'html':'UTF-8'}</li>
                            <li class="address_country">{$delivery->country|escape:'html':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'html':'UTF-8'}){/if}</li>
                        </ul>
                    </div>
                {/if}
                {if $invoice->id}
                    <div class="col-xs-12 col-sm-6">
                        <ul id="invoice_address" class="address alternate_item box">
                            <li><h3 class="page-subheading">{l s='Invoice address'}&nbsp;<span class="address_alias">({$invoice->alias})</span></h3></li>
                            {if $invoice->company}<li class="address_company">{$invoice->company|escape:'html':'UTF-8'}</li>{/if}
                            <li class="address_name">{$invoice->firstname|escape:'html':'UTF-8'} {$invoice->lastname|escape:'html':'UTF-8'}</li>
                            <li class="address_address1">{$invoice->address1|escape:'html':'UTF-8'}</li>
                            {if $invoice->address2}<li class="address_address2">{$invoice->address2|escape:'html':'UTF-8'}</li>{/if}
                            <li class="address_city">{$invoice->postcode|escape:'html':'UTF-8'} {$invoice->city|escape:'html':'UTF-8'}</li>
                            <li class="address_country">{$invoice->country|escape:'html':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'html':'UTF-8'}){/if}</li>
                        </ul>
                    </div>
                {/if}
            {else}
                {foreach from=$formattedAddresses key=k item=address}
                    <div class="col-xs-12 col-sm-6"{if $k == 'delivery' && !$have_non_virtual_products} style="display: none;"{/if}>
                        <ul class="address {if $address@last}last_item{elseif $address@first}first_item{/if} {if $address@index % 2}alternate_item{else}item{/if} box">
                            <li>
                                <h3 class="page-subheading">
                                    {if $k eq 'invoice'}
                                        {l s='Invoice address'}
                                    {elseif $k eq 'delivery' && $delivery->id}
                                        {l s='Delivery address'}
                                    {/if}
                                    {if isset($address.object.alias)}
                                        <span class="address_alias">({$address.object.alias})</span>
                                    {/if}
                                </h3>
                            </li>
                            {foreach $address.ordered as $pattern}
                                {assign var=addressKey value=" "|explode:$pattern}
                                {assign var=addedli value=false}
                                {foreach from=$addressKey item=key name=foo}
                                {$key_str = $key|regex_replace:AddressFormat::_CLEANING_REGEX_:""}
                                    {if isset($address.formated[$key_str]) && !empty($address.formated[$key_str])}
                                        {if (!$addedli)}
                                            {$addedli = true}
                                            <li><span class="{if isset($addresses_style[$key_str])}{$addresses_style[$key_str]}{/if}">
                                        {/if}
                                        {$address.formated[$key_str]|escape:'html':'UTF-8'}
                                    {/if}
                                    {if ($smarty.foreach.foo.last && $addedli)}
                                        </span></li>
                                    {/if}
                                {/foreach}
                            {/foreach}
                        </ul>
                    </div>
                {/foreach}
            {/if}
        </div>
    {/if}

flycart.jpg

Edited by flyclothing
Added image (I think). (see edit history)

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More