2017-12-20 36 views
0

お客様のチェックアウトのPrestashop 1.6カートサマリページで、お客様の請求書アドレスセクションを削除しようとしています(画像参照)。Prestashop 1.6(addresses.tplファイル?)から請求書セクションを削除してください

私はコメントする必要があります/ボックスをaddresses.tplファイルからボックスを削除する必要がありますか?テーマフォルダに保存します。また、私は物事を壊すのを避けるために、htmlを知る必要があります。

Iveはhtmlやphpの本を読んでいますが、私がしなければならないことは見つけていません。私はちょうどコメントしたり、追加するために何かを知っているか、あるいはおそらく編集するために間違ったファイルを知るのに十分ではありません。

誰でも助けてください。

ここに私のaddresses.tplファイルからコードです:あなたが探している正しいファイルがフォルダ内にある

{capture name=path} 
    <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" title="{l s='My account'}">{l s='My account'}</a> 
    <span class="navigation-pipe">{$navigationPipe}</span> 
    <span class="navigation_page">{l s='My addresses'}</span> 
{/capture} 

<h1 class="page-heading">{l s='My addresses'}</h1> 

<p>{l s='Please configure your default billing and delivery addresses when placing an order. You may also add additional addresses, which can be useful for sending gifts or receiving an order at your office.'}</p> 

{if isset($multipleAddresses) && $multipleAddresses} 
    <div class="addresses"> 
     <p><strong class="dark">{l s='Your addresses are listed below.'}</strong></p> 
     <p class="p-indent">{l s='Be sure to update your personal information if it has changed.'}</p> 
     {assign var="adrs_style" value=$addresses_style} 
     <div class="bloc_adresses row"> 
      {foreach from=$multipleAddresses item=address name=myLoop} 
       <div class="col-xs-12 col-sm-6 address"> 
        <ul class="{if $smarty.foreach.myLoop.last}last_item{elseif $smarty.foreach.myLoop.first}first_item{/if}{if $smarty.foreach.myLoop.index % 2} alternate_item{else} item{/if} box"> 
         <li> 
          <h3 class="page-subheading">{$address.object.alias}</h3> 
         </li> 
         {foreach from=$address.ordered name=adr_loop item=pattern} 
          {assign var=addressKey value=" "|explode:$pattern} 
          <li> 
           {foreach from=$addressKey item=key name="word_loop"} 
            <span {if isset($addresses_style[$key])} class="{$addresses_style[$key]}"{/if}> 
             {$address.formated[$key|replace:',':'']|escape:'html':'UTF-8'} 
            </span> 
           {/foreach} 
          </li> 
         {/foreach} 
         <li class="address_update"> 
          <a class="btn btn-success btn-sm" href="{$link->getPageLink('address', true, null, "id_address={$address.object.id|intval}")|escape:'html':'UTF-8'}" title="{l s='Update'}"> 
           <span> 
            {l s='Update'} 
            <i class="fa fa-refresh right"></i> 
           </span> 
          </a> 
          <a class="btn btn-danger btn-sm" href="{$link->getPageLink('address', true, null, "id_address={$address.object.id|intval}&delete")|escape:'html':'UTF-8'}" onclick="return confirm('{l s='Are you sure?' js=1}');" title="{l s='Delete'}"> 
           <span> 
            {l s='Delete'} 
            <i class="fa fa-times right"></i> 
           </span> 
          </a> 
         </li> 
        </ul> 
       </div> 
       {if $smarty.foreach.myLoop.index % 2 && !$smarty.foreach.myLoop.last} 
       </div> 
       <div class="bloc_adresses row"> 
       {/if} 
      {/foreach} 
     </div> 
    </div> 
{else} 
    <p class="alert alert-warning">{l s='No addresses are available.'}&nbsp; 
     <a href="{$link->getPageLink('address', true)|escape:'html':'UTF-8'}" title="{l s='Add a new address'}">{l s='Add a new address'}</a> 
    </p> 
{/if} 

<div class="clearfix main-page-indent"> 
    <a href="{$link->getPageLink('address', true)|escape:'html':'UTF-8'}" title="{l s='Add an address'}" class="btn btn-default btn-md icon-right"> 
     <span> 
      {l s='Add a new address'} 
     </span> 
    </a> 
</div> 

<ul class="footer_links clearfix"> 
    <li> 
     <a class="btn btn-default btn-sm icon-left" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" title="{l s='Back to your account'}"> 
      <span> 
       {l s='Back to your account'} 
      </span> 
     </a> 
    </li> 
    <li> 
     <a class="btn btn-default btn-sm icon-left" href="{$base_dir}" title="{l s='Home'}"> 
      <span> 
       {l s='Home'} 
      </span> 
     </a> 
    </li> 
</ul> 

enter image description here

+1

私が間違っていない場合、そのtplは3番目のステップです。最初のステップでは、themeフォルダのshopping-cart.tplも変更する必要があります。 – sadlyblue

+0

ご協力いただきありがとうございます。私はすでにこのガイド(https://www.prestashop.com/forums/topic/128541-how-to-remove-invoice-address/)を使ってshopping-cart.tplファイルを変更しました。 これは正しいファイルであれば、addresses.tplファイルで何をコメントアウトするのか分かりませんか? – Chezzers

答えて

0

は「ショッピング・cart.tplと呼ばれる「テーマ/デフォルトのブートストラップ」 "

そして、あなたのために良い解決策は、ライン516でこれを次のようになります。

  {foreach from=$formattedAddresses key=k item=address} 
      {if $k eq 'invoice'} 
      {else} 
       <div class="col-xs-12 col-sm-6"{if $k == 'delivery' && !$have_non_virtual_products} style="display: none;"{/if}> 
        <ul class="address {if [email protected]}last_item{elseif [email protected]}first_item{/if} {if [email protected] % 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> 
       {/if} 
      {/foreach} 
+0

516でこのコード全体を追加する必要がありますか? – Chezzers

+0

foreachループ間のすべてを置き換えることができます私は3行追加しました。 –

0

カートの概要からインボイスボックスを除去する解決策は、(または多分むしろハック)blockpermanentlinksにコードを追加することでした。 CSSファイル。

#block-order-detail .col-xs-12.col-sm-6 .address.item.box, 
.order_delivery .col-xs-12.col-sm-6 .address.alternate_item{display:none} 
.col-xs-12.col-sm-6 #address_invoice, 
.checkbox.addressesAreEquals{visibility:hidden} 
関連する問題