lasseboy Posted October 22, 2021 Share Posted October 22, 2021 Hey! I want to delete the product description on the page but will only halfway, Have removed this code in product.tpl but some remain. see the picture that shows what I want to delete. Anyone have an idea? <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> Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 ./themes/your theme/templates/catalog/_partials/product-details.tpl 1 Link to comment Share on other sites More sharing options...
lasseboy Posted October 22, 2021 Author Share Posted October 22, 2021 Thanks but tryed to take away this code : {if isset($product.reference_to_display) && $product.reference_to_display neq ''} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if} But the whiteblock and line is still there! see pic! Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 And why don't you upload whole files here? Upload both tpl files here. How can I know exactly what you edited? 1 Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 (edited) You don't have to delete lyrics, just comment. E.g. {block name='product_reference'} {if isset($product.reference_to_display) && $product.reference_to_display neq ''} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if} {/block} to: {*block name='product_reference'} {if isset($product.reference_to_display) && $product.reference_to_display neq ''} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if} {/block*} An asterisk is added to the block. Edited October 22, 2021 by WebSoft (see edit history) 1 Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 ./themes/classic/templates/catalog/product.tpl change {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} <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> {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} </div> {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" id="attachments" role="tabpanel"> <section class="product-attachments"> <p class="h5 text-uppercase">{l s='Download' d='Shop.Theme.Actions'}</p> {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} to {*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} <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> {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} </div> {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" id="attachments" role="tabpanel"> <section class="product-attachments"> <p class="h5 text-uppercase">{l s='Download' d='Shop.Theme.Actions'}</p> {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*} 1 Link to comment Share on other sites More sharing options...
lasseboy Posted October 22, 2021 Author Share Posted October 22, 2021 Thanks it made the white field disappear, but also the Description disappeared. I enclose both files here. I reload the old one so that the description remains and the white field on the books that do not have a description. Thank you very much for your willingness to help! product.tpl product-details.tpl 1 Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 1 minute ago, lasseboy said: Thanks it made the white field disappear, but also the Description disappeared. I enclose both files here. I reload the old one so that the description remains and the white field on the books that do not have a description. Thank you very much for your willingness to help! product.tpl 10.72 kB · 0 downloads product-details.tpl 2.94 kB · 0 downloads Please upload oroginal product.tpl Link to comment Share on other sites More sharing options...
lasseboy Posted October 22, 2021 Author Share Posted October 22, 2021 Thanks! 😃 product.tpl 1 Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 your modifing file: product.tpl Link to comment Share on other sites More sharing options...
lasseboy Posted October 22, 2021 Author Share Posted October 22, 2021 Thanks_! But now the description is gone. This book has a description below the picture. https://shop.delameddig.nu/tro-vaegledning/222-korsvaegen-uppstandelselivet.html Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 Moment. I thought you wanted to hide them all. Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 It's hard to tune in like this. Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 update: product.tpl 1 Link to comment Share on other sites More sharing options...
ps8modules Posted October 22, 2021 Share Posted October 22, 2021 I sent you a private message. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now