Jump to content

Product page > Remove the "description" tab and only show the full "details" tab


Recommended Posts

Hello,

Here is the snippet of the original code that I tried to modify...

Citation

{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 js-product-nav-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} <li class="nav-item"> <a class="nav-link{if !$product.description} active js-product-nav-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> {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 js-product-tab-active{/if}" id="description" role="tabpanel"> {block name='product_description'} <div class="product-description">{$product.description nofilter}</div> {/block} </div>

I tried to modify several things but it doesn't work.

Link to comment
Share on other sites

Hi.

This is only product.tpl. As I wrote, product-details.tpl also needs to be modified.

Can you please tell me which version of Prestashop you are using and if you are using the classic theme?

I am also sending edited files from PS 8.1.3.

product.tpl

product-details.tpl

product.tpl (on the left is the original, on the right modified):

image.thumb.png.08b6df86419525a99c361f24eefe2cba.png

 

product-details.tpl (on the left is the original, on the right modified):

image.thumb.png.1b4a8cdfed063247215927586c4cb912.png

 

result:

image.png.e741fbf5049756c301881f8767776e72.png

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