Jump to content

Zobrazenie UPC, ISBN,EAN a MPN v Prestashop 1.7.7.2


fosilia
 Share

Recommended Posts

Nastavenie pre jednoduchy produkt a zobrazovanie v detailoch produktu.

themes/vasa tema/templates/catalog/_partials/product-details.tpl

 {* if product have specific references, a table will be added to product details section *}
  {block name='product_specific_references'}
    {if !empty($product.specific_references)}
      <section class="product-features">
        <p class="h6">{l s='Specific References' d='Shop.Theme.Catalog'}</p>
          <dl class="data-sheet">
            {foreach from=$product.specific_references item=reference key=key}
              <dt class="name">{$key}</dt>
              <dd class="value">{$reference}</dd>
            {/foreach}
          </dl>
      </section>
    {/if}
  {/block}
 

Nahradit za ttoto:

 {* if product have specific references, a table will be added to product details section *}
  {block name='product_specific_references'}
    {if !empty($product.specific_references)}
      <section class="product-features">
        <p class="h6">{l s='Specific References' d='Shop.Theme.Catalog'}</p>
          <dl class="data-sheet">
            {foreach from=$product.specific_references item=reference key=key}
              <dt class="name">{$key}</dt>
              <dd class="value">{$reference}</dd>
            {/foreach}
          </dl>
      </section>
{else}
        {if isset($product.isbn) && !empty($product.isbn)}
            {$product_specific_references['ISBN']=$product.isbn}
        {/if}
        {if isset($product.upc) && !empty($product.upc)}
            {$product_specific_references['UPC']=$product.upc}
        {/if}
        {if isset($product.ean13) && !empty($product.ean13)}
            {$product_specific_references['EAN13']=$product.ean13}
        {/if}
                {if isset($product.ean13) && !empty($product.mpn)}
            {$product_specific_references['MPN']=$product.mpn}
        {/if}
        {if isset($product_specific_references) && !empty($product_specific_references)}
          <section class="product-features">
            <p class="h6">{l s='Specific References' d='Shop.Theme.Catalog'}</p>
              <dl class="data-sheet">
                {foreach from=$product_specific_references item=reference key=key}
                  <dt class="name">{$key}</dt>
                  <dd class="value">{$reference}</dd>
                {/foreach}
              </dl>
          </section>
        {/if}
    {/if}
  {/block}

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
 Share

×
×
  • Create New...

Important Information

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