Jump to content
  • 0

Dwa opisy kategorii, po wyszukaniu produktu po atrybucie, modułem ps_facetedsearch ...


julord234

Question

Cześć. Mam problem, szukałem rozwiązania, ale nigdzie nie ma, mam najnowszą prestę 1.7.8.7 i klasyczny defaultowy template.

Tak jak w tytule, chciałem mieć miejsce na opis w kategoriach na dole każdej strony, dlatego z tąd: themes/uzywany_szablon/templates/catalog/listing/category.tpl wyciąłem, co trzeba i wkleiłem tutaj: themes/uzywany_szablon/templates/_partials/pagination.tpl

Wszystko się ładnie zmieniło, opisy w kategoriach są na dole, lecz kiedy wyszukam, w moim przypadku pierścionka po rozmiarze, modułem ps_facetedsearch znajduje pierścionek, ale opis kategorii pojawia się i na górze i na dole, jak to naprawić, żeby było tylko na dole w każdym przypadku?

Na dole zdjęcia, o co chodzi...

Pozdrawiam i z góry dzięki za pomoc.

 

spacer.png

A chcę żeby było o tak:spacer.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Prawdopodobnie przeniesienie tego kodu:

{block name='product_list_header'}
      <h1 id="js-product-list-header" class="h2">{$listing.label}</h1>
{/block}

Poniżej:

{hook h="displayFooterCategory"}

powinno wystarczyć, oczywiście należy wyczyścić jeszcze pamięć podręczną po wszystkim. Nie testowałem, daj znać czy działa.

  • Thanks 1
Link to comment
Share on other sites

  • 0

@endriu107

W tej wersji się pozmieniały te pliki, bo tak wygląda product-list.tpl:

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
{extends file=$layout}

{block name='head_microdata_special'}
  {include file='_partials/microdata/product-list-jsonld.tpl' listing=$listing}
{/block}

{block name='content'}
  <section id="main">

    {block name='product_list_header'}
      <h1 id="js-product-list-header" class="h2">{$listing.label}</h1>
    {/block}

    {block name='subcategory_list'}
      {if isset($subcategories) && $subcategories|@count > 0}
        {include file='catalog/_partials/subcategories.tpl' subcategories=$subcategories}
      {/if}
    {/block}
    
    {hook h="displayHeaderCategory"}

    <section id="products">
      {if $listing.products|count}

        {block name='product_list_top'}
          {include file='catalog/_partials/products-top.tpl' listing=$listing}
        {/block}

        {block name='product_list_active_filters'}
          <div class="hidden-sm-down">
            {$listing.rendered_active_filters nofilter}
          </div>
        {/block}

        {block name='product_list'}
          {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-6 col-xl-4"}
        {/block}

        {block name='product_list_bottom'}
          {include file='catalog/_partials/products-bottom.tpl' listing=$listing}
        {/block}

      {else}
        <div id="js-product-list-top"></div>

        <div id="js-product-list">
          {capture assign="errorContent"}
            <h4>{l s='No products available yet' d='Shop.Theme.Catalog'}</h4>
            <p>{l s='Stay tuned! More products will be shown here as they are added.' d='Shop.Theme.Catalog'}</p>
          {/capture}

          {include file='errors/not-found.tpl' errorContent=$errorContent}
        </div>

        <div id="js-product-list-bottom"></div>
      {/if}
    </section>

    {hook h="displayFooterCategory"}

  </section>
{/block}

Z kolei tak wygląda plik category.tpl z twojego filmiku:

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
{extends file='catalog/listing/product-list.tpl'}

Zmieniłem tam header na bottom, ale nie działa.

Link to comment
Share on other sites

  • 0

 

Super dzięki, działa tak jak trzeba :D temat do zamknięcia.

To znaczy całkowicie usunąłem z tamtąd:

{block name='product_list_header'}
      <h1 id="js-product-list-header" class="h2">{$listing.label}</h1>
{/block}

Bo wcześniej dodałem je tam do tego folderu na dole themes/uzywany_szablon/templates/_partials/pagination.tpl

Edited by julord234 (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...