fosilia Posted February 27, 2021 Share Posted February 27, 2021 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} 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