bosaczek Posted March 28, 2019 Share Posted March 28, 2019 Witam.Presta 1.7.5Na liście produktów mam cenę brutto za szt (ponieważ produkt jest sprzedawany w odcinakach 2mb), jednak nie wygląda to atrakcyjnie gdyż cała konkurencja podaje ceny w mb, więc chciałbym aby w tym miejscu była Cena za jednostkę (brutto)Wiecie czy to wystarczy gdzieś w jakimś pliku zamienić, bo w ustawieniach nigdzie tego nie mogę znaleźć. Link to comment Share on other sites More sharing options...
Daresh Posted March 29, 2019 Share Posted March 29, 2019 templates/catalog/_partials/miniatures/product.tpl I tam linijkę z ceną zmieniamy na: <span itemprop="price" class="price">{Tools::displayPrice($product.unit_price)} / {$product.unity}</span> <span itemprop="price" class="price">{Tools::displayPrice($product.unit_price)} / {$product.unity}</span> Można też pokusić się o mały kalkulator żeby klientom było wygodniej, przykład w akcji. Link to comment Share on other sites More sharing options...
bosaczek Posted March 29, 2019 Author Share Posted March 29, 2019 Qurcze nic to nie zmieniło albo raczej nieumiejętnie to zrobiłem. poniżej kod z tego pliku, możesz zaznaczyć w którym dokładnie miejscu to zmienić ------------------------ {block name='product_miniature_item'} <div class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product"> <div class="thumbnail-container"> <div class="image-block"> {block name='product_thumbnail'} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img class = "primary-image" src = "{$product.cover.bySize.home_default.url}" alt = "{$product.cover.legend}" data-full-size-image-url = "{$product.cover.large.url}" > {hook h="displayHoverImage" id_product=$product.id_product home='home_default' large='large_default'} </a> {block name='product_buy'} {if !$configuration.is_catalog} <div class="product-actions"> <form action="{$urls.pages.cart}" method="post" class="add-to-cart-or-refresh"> <input type="hidden" name="token" value="{$static_token}"> <input type="hidden" name="id_product" value="{$product.id}" class="product_page_product_id"> <input type="hidden" name="id_customization" value="0" class="product_customization_id"> <button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit" {if $product.availability == 'unavailable'}disabled{/if} title="{l s='Dodaj do koszyka' d='Shop.Theme.Global'}"> {l s='Dodaj do koszyka' d='Shop.Theme.Global'} <span class="tc-product-cart tc-product-tooltip">{l s='Dodaj do koszyka' d='Shop.Theme.Global'}</span> </button> </form> <a href="#" class="quick-view" data-link-action="quickview" title="{l s='Podgląd' d='Shop.Theme.Global'}"> {l s='Podgląd' d='Shop.Theme.Global'} <span class="tc-product-quickview tc-product-tooltip">{l s='Podgląd' d='Shop.Theme.Global'}</span> </a> </div> {/if} {/block} {/block} </div> {block name='product_flags'} <ul class="product-flags"> {foreach from=$product.flags item=flag} <li class="{$flag.type}">{$flag.label}</li> {/foreach} </ul> {/block} </div> <div class="product-description"> <div class="product-desc-wrapper"> {block name='product_name'} <span class="h3 product-title" itemprop="name"><a href="{$product.url}" title="{$product.name}">{$product.name|truncate:18:'...'}</a></span> {/block} {block name='product_price_and_shipping'} {if $product.show_price} <div class="product-price-and-shipping"> <span itemprop="price" class="price">{$product.price}</span> {if $product.has_discount} {hook h='displayProductPriceBlock' product=$product type="old_price"} <span class="regular-price">{$product.regular_price}</span> {if $product.discount_type === 'percentage'} <span class="discount-percentage">{$product.discount_percentage}</span> {/if} {/if} {hook h='displayProductPriceBlock' product=$product type="before_price"} {hook h='displayProductPriceBlock' product=$product type='unit_price'} {hook h='displayProductPriceBlock' product=$product type='weight'} </div> {/if} {/block} </div> {block name='product_reviews'} {hook h='displayProductListReviews' product=$product} {/block} <!--<div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down"> {block name='product_variants'} {if $product.main_variants} {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants} {/if} {/block} </div>--> </div> </div> {/block} Link to comment Share on other sites More sharing options...
Daresh Posted March 29, 2019 Share Posted March 29, 2019 Ja bym spróbował zamienić tą linijkę: <span itemprop="price" class="price">{$product.price}</span> Link to comment Share on other sites More sharing options...
bosaczek Posted March 29, 2019 Author Share Posted March 29, 2019 udało się, ale nie w pliku product.tpl tylko product-listgird.tpl Dzięki WIELKIE!!! 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