Jump to content
KamilPL

Zmiana 2 bloków pod produktem

Recommended Posts

Jak zmienić miejscami 2 bloki pod produktem, tak jak na załączonym zrzucie ekranu?

zmiana-pozycjiforum.jpg

Share this post


Link to post
Share on other sites

W kodzie lub poprzez przestawienie modułów w sekcji pozycje. Ew. jeżeli korzystasz z odrębnego modułu zakładek to szukaj w w nim. 

Share this post


Link to post
Share on other sites

Witam,

Trzeba edytować plik szablonu w poniższej ścieżce za pomocą FTP:
katalog_prestashop > themes > nazwa_szablonu > templates > catalog > product.tpl

Prosze edytować plik product.tpl i odnaleźć znacznik 

<div class="tabs">

Między tym znacznikiem trzeba zmienić pozycję zakładek :). 
 

Share this post


Link to post
Share on other sites

To nie takie proste. Przestawiam miejscami div lub <li> i nic się nie zmienia.

Jak na moje oko odpowiada za to if:

 {if $product.condition || isset($product.reference_to_display) || $product.show_quantities || $product.availability_date || $product.minimal_quantity > 1 || $product.features || isset($product.specific_references)}
             

Pomożecie zmienić miejscami #product-details z #description

Mój kod tego pliku product.tpl :

    {block name='product_tabs'}
         <div class="more-info">
           <ul class="nav nav-tabs_alternative">
             {if $product.description}
             <li class="nav-item">
               <a class="more-info-tab nav-link active" data-toggle="tab" href="#description">
                 {l s='Description' d='Shop.Theme.Catalog'}
               </a>
             </li>
             {/if}
            {if $product.condition || isset($product.reference_to_display) || $product.show_quantities || $product.availability_date || $product.minimal_quantity > 1 || $product.features || isset($product.specific_references)}
             <li class="nav-item">
               <a class="data-sheet-tab nav-link{if !$product.description} active{/if}" data-toggle="tab" href="#product-details">
                 {l s='Product Details' d='Shop.Theme.Catalog'}
               </a>
             </li>
             {/if}
             {if $product.attachments}
             <li class="nav-item">
               <a class="nav-link{if !$product.condition && !isset($product.reference_to_display) && !$product.show_quantities && !$product.availability_date && !$product.minimal_quantity > 1 && !$product.features && !isset($product.specific_references) && !$product.description} active{/if}" data-toggle="tab" href="#attachments">
                 {l s='Attachments' d='Shop.Theme.Catalog'}
               </a>
             </li>
             {/if}
             {foreach from=$product.extraContent item=extra key=extraKey}
             <li class="nav-item">
               <a class="nav-link" data-toggle="tab" href="#extra-{$extraKey}">{$extra.title}</a>
             </li>
             {/foreach}
             {if $accessories}
            <li class="nav-item">
               <a class="nav-link" data-toggle="tab" href="#accessories">{l s='Accessories' d='Shop.Interiorcatalog'}</a>
             </li>
             {/if}
            {block name='product_tab'}
                {hook h='productTab'}
            {/block}
           </ul>

           <div class="tab-content" id="tab-content">
           {if $product.description}
            <div class="tab-pane fade in active" id="description">
              {block name='product_description'}
                <div class="product-description tab-pane-inner rte">{$product.description nofilter}</div>
              {/block}
            </div>
            {/if}
            {block name='product_details'}
              {include file='catalog/_partials/product-details.tpl'}
            {/block}

            {block name='product_attachments'}
              {if $product.attachments}
               <div class="tab-pane fade in{if !$product.condition && !isset($product.reference_to_display) && !$product.show_quantities && !$product.availability_date && !$product.minimal_quantity > 1 && !$product.features && !isset($product.specific_references) && !$product.description} active{/if}" id="attachments">
                  <section class="product-attachments tab-pane-inner">
                    <h3 class="h5 text-uppercase">{l s='Download' d='Shop.Theme.Actions'}</h3>
                    {foreach from=$product.attachments item=attachment}
                      <div class="attachment">
                        <h4><a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">{$attachment.name}</a></h4>
                        <p>{$attachment.description}</p
                        <a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">
                          {l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
                        </a>
                      </div>
                    {/foreach}
                  </section>
                </div>
              {/if}
            {/block}

 

Share this post


Link to post
Share on other sites

Wszystko zrobiłem dobrze. Trzeba było usunąć pamięć podręczną. Ot nietypowe zachowanie presty dla początkującego.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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