Jump to content

Descrizione Prodotto / Dettagli prodotto


Maurice

Recommended Posts

Giorno gentilmente volevo chiedere quanto segue:

Vorrei eliminare il Tab Dettagli prodotto e contestualmente far uscire automaticamente nel tab descrizione prodotto i dettagli prodotto:

Ho provato a fare quanto segue:

Elimino da product.tpl:

<li class="nav-item">
                    <a
                      class="nav-link{if !$product.description} active{/if}"
                      data-toggle="tab"
                      href="#product-details"
                      role="tab"
                      aria-controls="product-details"
                      {if !$product.description} aria-selected="true"{/if}>{l s='Product Details' d='Shop.Theme.Catalog'}</a>
                  </li>

Ok il tab dettagli prodotto viene eliminato quindi ancora: unisco descrizione e dettagli

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

il mio problema è che quando entro nel prodotto da front office la descrizone viene visualizzata , mentre i dettagli prodotto no , gentilmente chiedo se ho sbagliato qualcosa

 

Cordiali Saluti

Link to comment
Share on other sites

Ciao,

se provi a guardare il codice del template product-details.tpl ti accorgerai che  all'inizio del file viene definito un <div class="tab-pane"> in questo modo:

<div class="tab-pane fade{if !$product.description} show active{/if}"
     id="product-details"
     data-product="{$product.embedded_attributes|json_encode}"
     role="tabpanel"
  >

Questo probabilmente è la causa del fatto che i dettagli non si vedono sotto alla descrizione. Prova a togliere il <div class="tab-pane"> in questione (insieme alla sua chiusura </div> alla fine del file), dovrebbe risolvere il tuo problema.

Buona giornata,
Federica

Link to comment
Share on other sites

Ciao Federica ,

Sembra che ho risolto ieri sera in questa modo:

da product-details.tpl ho copiato e poi incollato (in product.tpl) il seguente codice

sotto product description:

{block name='product_features'}
    {if $product.grouped_features}
      <section class="product-features">
        <table class="data-sheet">
        <tbody>
          {foreach from=$product.grouped_features item=feature}
            <tr>
              <td class="name">{$feature.name}</td>
              <td class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</td>
            </tr>
          {/foreach}
        </tbody>
        </table>
      </section>
    {/if}
  {/block}

 

Sembra andare ok ora , ma voglio provare il tuo consiglio , mi sembra migliore

Ti ringrazio per il tuo supporto

Edited by Maurice (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Ciao Federica ,

Vorrei chiederti una cosa in merito alle "Funzioni" prestashop 1.7.5.2

Ho creato 4 funzioni , tutto ok Interno - Esterno - Altezza -  Peso

Quando vado a inserire un nuovo prodotto

Deve sempre aggiungere una nuova caratteristica come da screeen in allegato al fine di Aggiungere le 4 funzioni , e fin qui tutto ok.

La mia domanda è la seguente:

esiste un modo per rendere permanenti queste 4 funzioni? nel senso che quando vado ad aggiungere un nuovo prodotto mi piacerebbe trovarle di default , ricordo che con la 1.6 era possibile.

Ti ringrazio in anticipo

Maurice1205610687_Screenshot_2019-07-29ProdottoCuscinettiTOPbyCUSCINETTIETRASMISSIONISrl.thumb.png.d682e345be7c0456745555e78fd783e6.png

 

Link to comment
Share on other sites

  • 10 months later...

Giorno Federica ,

dopo circa un anno vorrei chiederti se puoi illustrarmi su una modifica prestashop 1.7.5

In pratica avendo i prezzi senza iva , vorrei fare in modo che quando un cliente mette un prodotto nel carrello ottiene anche il totale con iva (tasse)

ho gia attivato in intenazionale tasse / visualizza tasse nel carrello

ma al  momento nel carrello io otttengo quanto segue in screen

Tecnicamente ho parzialmente risolto modificando files in checkout/partials

cart-detailed-totals.tpl

cart-summary-totals.tpl

order-confirmation-table.tpl

ma il risultato è che nel carrello il prezzo finale con iva non esce mentre nei successivi due step tutto è ok

Grazie in anticipo

Buona Giornata

screenvat.png

Link to comment
Share on other sites

  • 8 months later...

Ciao a tutti,

ho anche io il problema di voler eliminare la tab dettagli del prodotto. uso prestashop 1.7.7.2, ho come tema ecco bella e ho installato anche il modulo AN Product extra tabs premium che permette di aggiungere ulteriori tab.

 

Ho fatto la modifica nel file product.tpl indicata da Maurice eliminando da product.tpl

 

<li class="nav-item">
                    <a
                      class="nav-link{if !$product.description} active{/if}"
                      data-toggle="tab"
                      href="#product-details"
                      role="tab"
                      aria-controls="product-details"
                      {if !$product.description} aria-selected="true"{/if}>{l s='Product Details' d='Shop.Theme.Catalog'}</a>
                  </li>

e correggendo questa stringa


  <div class="tab-content" id="tab-content">
   <div class="tab-pane fade in{if $product.description} active{/if}" id="description" role="tabpanel">
     {block name='product_description'}
     <div class="product-description">{$product.description nofilter}</div>
     {/block}

   {block name='product_details'}
   {include file='catalog/_partials/product-details.tpl'}
   {/block}
   </div>

 

Purtroppo non succede nulla e la tab continua ad apparire...

Link to comment
Share on other sites

grazie risolto il problema su due siti. ma sul terzo la modifica non funziona, nonostante abbia lo stesso tema degli altri. ecco come appare dopo la modifica il file product.tpl

{**
 * 2007-2017 PrestaShop
 *
 * 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.txt.
 * 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 http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <[email protected]>
 * @copyright 2007-2017 PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
 {extends file=$layout}

 {block name='head_seo' prepend}
 <link rel="canonical" href="{$product.canonical_url}">
 {/block}

 {block name='head' append}
 <meta property="og:type" content="product">
 <meta property="og:url" content="{$urls.current_url}">
 <meta property="og:title" content="{$page.meta.title}">
 <meta property="og:site_name" content="{$shop.name}">
 <meta property="og:description" content="{$page.meta.description}">
 <meta property="og:image" content="{$product.cover.large.url}">
 <meta property="product:pretax_price:amount" content="{$product.price_tax_exc}">
 <meta property="product:pretax_price:currency" content="{$currency.iso_code}">
 <meta property="product:price:amount" content="{$product.price_amount}">
 <meta property="product:price:currency" content="{$currency.iso_code}">
 {if isset($product.weight) && ($product.weight != 0)}
 <meta property="product:weight:value" content="{$product.weight}">
 <meta property="product:weight:units" content="{$product.weight_unit}">
 {/if}
 {/block}

 {block name='content'}

 <section id="main" itemscope itemtype="https://schema.org/Product">
  <meta itemprop="url" content="{$product.url}">
  {if isset($product.id_manufacturer) AND $product.id_manufacturer}
  <meta itemprop="brand" content="{Manufacturer::getnamebyid($product.id_manufacturer)}">
  {/if}
  {if isset($product->ean13) AND $product->ean13}
  <meta itemprop="gtin13" content="{l s='EAN Code:'}{$product->ean13}">
  {/if}
  {if isset($product->isbn) AND $product->isbn}
  <meta itemprop="gtin13" content="{l s='ISBN Code:'}{$product->isbn}">
  {/if}
  {if isset($product->upc) AND $product->upc}
  <meta itemprop="gtin13" content="{l s='UPC Code:'}{$product->upc}">
  {/if}
  <div class="row">
    <div class="col-md-5">
      {block name='page_content_container'}
      <section class="page-content" id="content">
        {block name='page_content'}
        {block name='product_flags'}
        <ul class="product-flags">
          {foreach from=$product.flags item=flag}
          <li class="product-flag {$flag.type}">{$flag.label}</li>
          {/foreach}
          {if $product.has_discount}
            {if $product.discount_type === 'percentage'}
              <li class="product-flag discount-percentage">{l s='%percentage%' d='Shop.Theme.Catalog' sprintf=['%percentage%' => $product.discount_percentage_absolute]}</li>
            {else}
              <li class="product-flag discount-percentage">
                {l s='- %amount%' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.discount_to_display]}
              </li>
              {/if}
          {/if}
        </ul>
        {/block}

        {block name='product_cover_thumbnails'}
        {include file='catalog/_partials/product-cover-thumbnails-product.tpl'}
        {/block}


        {/block}
      </section>
      {/block}
    </div>
    <div class="col-md-7">
      {block name='page_header_container'}
      {block name='page_header'}
      <h1 class="h1" itemprop="name">{block name='page_title'}{$product.name}{/block}</h1>
      {/block}
      {/block}
      
      {block name='product_prices'}
      {include file='catalog/_partials/product-prices.tpl'}
      {/block}
      

      <div class="product-information">
        {block name='product_description_short'}
        <div id="product-description-short-{$product.id}" itemprop="description">{$product.description_short nofilter}</div>
        {/block}

        {if $product.is_customizable && count($product.customizations.fields)}
        {block name='product_customization'}
        {include file="catalog/_partials/product-customization.tpl" customizations=$product.customizations}
        {/block}
        {/if}

        {block name='product_additional_info'}
        {include file='catalog/_partials/product-additional-info.tpl'}
        {/block}

        <div class="product-actions">
          {block name='product_buy'}
          <form action="{$urls.pages.cart}" method="post" id="add-to-cart-or-refresh">
            <input type="hidden" name="token" value="{$static_token}">
            <input type="hidden" name="id_product" value="{$product.id}" id="product_page_product_id">
            <input type="hidden" name="id_customization" value="{$product.id_customization}" id="product_customization_id">

            {block name='product_variants'}
            {include file='catalog/_partials/product-variants.tpl'}
            {/block}

            {block name='product_pack'}
            {if $packItems}
            <section class="product-pack">
              <h3 class="h4">{l s='This pack contains' d='Shop.Theme.Catalog'}</h3>
              {foreach from=$packItems item="product_pack"}
              {block name='product_miniature'}
              {include file='catalog/_partials/miniatures/pack-product.tpl' product=$product_pack}
              {/block}
              {/foreach}
             </section>
             {/if}
             {/block}

            {block name='product_discounts'}
            {include file='catalog/_partials/product-discounts.tpl'}
            {/block}

            {block name='product_add_to_cart'}
            {include file='catalog/_partials/product-add-to-cart.tpl'}
            {/block}

            {block name='product_refresh'}
            <input class="product-refresh ps-hidden-by-js" name="refresh" type="submit" value="{l s='Refresh' d='Shop.Theme.Actions'}">
            {/block}
          </form>
          {/block}

        </div>

        {block name='hook_display_reassurance'}
        {hook h='displayReassurance'}
        {/block}
      </div>
    </div>
  </div>

  {block name='product_tabs'}
  <div class="tabs">
    <ul class="nav nav-tabs" role="tablist">
      {if $product.description}
      <li class="nav-item">
       <a
       class="nav-link{if $product.description} active{/if}"
       data-toggle="tab"
       href="#description"
       role="tab"
       aria-controls="description"
       {if $product.description} aria-selected="true"{/if}>{l s='Description' d='Shop.Theme.Catalog'}</a>
     </li>
     {/if}
    {if $product.attachments}
    <li class="nav-item">
      <a
      class="nav-link"
      data-toggle="tab"
      href="#attachments"
      role="tab"
      aria-controls="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}"
      role="tab"
      aria-controls="extra-{$extraKey}">{$extra.title}</a>
    </li>
    {/foreach}
  </ul>

  <div class="tab-content" id="tab-content">
   <div class="tab-pane fade in{if $product.description} active{/if}" id="description" role="tabpanel">
     {block name='product_description'}
     <div class="product-description">{$product.description nofilter}</div>
     {/block}

   {block name='product_details'}
   {include file='catalog/_partials/product-details.tpl'}
   {/block}
   </div>

   {block name='product_attachments'}
   {if $product.attachments}
   <div class="tab-pane fade in" id="attachments" role="tabpanel">
     <section class="product-attachments">
       <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}

     {foreach from=$product.extraContent item=extra key=extraKey}
     <div class="tab-pane fade in {$extra.attr.class}" id="extra-{$extraKey}" role="tabpanel" {foreach $extra.attr as $key => $val} {$key}="{$val}"{/foreach}>
       {$extra.content nofilter}
     </div>
     {/foreach}
   </div>  
 </div>
 {/block}

 {block name='product_accessories'}
 {if $accessories}
 <section class="product-accessories clearfix">
  <div class="product-accessories-title">
    <h3 class="h2">{l s='You might also like' d='Shop.Theme.Catalog'}</h3>
  </div>
  <div class="products" id="js-product-block-slider-product-page">
    {foreach from=$accessories item="product_accessory"}
    {block name='product_miniature'}
    {include file='catalog/_partials/miniatures/product.tpl' product=$product_accessory}
    {/block}
    {/foreach}
  </div>
</section>
{/if}
{/block}

<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="pswp__bg"></div>
  <div class="pswp__scroll-wrap">
    <div class="pswp__container">
      <div class="pswp__item"></div>
      <div class="pswp__item"></div>
      <div class="pswp__item"></div>
    </div>
    <div class="pswp__ui pswp__ui--hidden">
      <div class="pswp__top-bar">
        <div class="pswp__counter"></div>
        <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
        <div class="pswp__preloader">
          <div class="pswp__preloader__icn">
            <div class="pswp__preloader__cut">
              <div class="pswp__preloader__donut"></div>
            </div>
          </div>
        </div>
      </div>

      <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
      </button>

      <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
      </button>

      <div class="pswp__caption">
          <div class="pswp__caption__center"></div>
      </div>
    </div>
  </div>
</div>

{block name='product_footer'}
{hook h='displayFooterProduct' product=$product category=$category}
{/block}

{block name='product_images_modal'}
{include file='catalog/_partials/product-images-modal.tpl'}
{/block}

{block name='page_footer_container'}
<footer class="page-footer">
  {block name='page_footer'}
  <!-- Footer content -->
  {/block}
</footer>
{/block}
</section>

{/block}
 

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