Jump to content

Edit History

fcherrier

fcherrier

hi !

here is a working solution (show unit product price without tax in product list) for prestashop 1.7.6.9 with classic theme (may work with others versions)

 

edit themes/classic/templates/catalog/_partials/miniatures/product.tpl

around line 70 after :

    <span class="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
    <span itemprop="price" class="price">{$product.price} HT</span>

add :
    {if $product.unit_price_full != ""}
         {math assign="result" equation="rprice / ratio" rprice=$product.price_tax_exc ratio=$product.unit_price_ratio}
         <br><span class="unit_price">(soit {$result|string_format:"%.2f"} € HT {$product.unity})</span>
    {/if}

result in product list is (in euros / french) 

   Sable en sac de 2kg
         20,60 € HT
(soit 10,30 € HT le kilo)

 

You have to add some custom CSS to expand the miniature look

in themes/classic/assets/css/custom.css

add :

/* PRODUCTS LIST */
.products .thumbnail-container, .featured-products .thumbnail-container, .product-accessories .thumbnail-container, .product-miniature .thumbnail-container {height:338px;}
.products .thumbnail-container .product-thumbnail, .featured-products .thumbnail-container .product-thumbnail, .product-accessories .thumbnail-container .product-thumbnail, .product-miniature .thumbnail-container .product-thumbnail {height:calc(100% - 90px)}
.products .product-description, .featured-products .product-description, .product-accessories .product-description, .product-miniature .product-description {height:90px;}
.products .highlighted-informations, .featured-products .highlighted-informations, .product-accessories .highlighted-informations, .product-miniature .highlighted-informations {height : 4.125rem}

 

Enjoy !

fcherrier

fcherrier

hi !

here is a working solution (show unit product price without tax in product list) for prestashop 1.7.6.9 with classic theme (may work with others versions)

 

edit themes/classic/templates/catalog/_partials/miniatures/product.tpl

around line 70 after :

    <span class="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
    <span itemprop="price" class="price">{$product.price} HT</span>

add :
    {if $product.unit_price_full != ""}
       <br>
       <span class="unit_price">(soit {math equation="rprice / ratio" rprice=$product.price_tax_exc ratio=$product.unit_price_ratio} HT {$product.unity})</span>
    {/if}

result in product list is (in euros / french) 

   Sable en sac de 2kg
         20,60 € HT
(soit 10,30 € HT le kilo)

 

You have to add some custom CSS to expand the miniature look

in themes/classic/assets/css/custom.css

add :

/* PRODUCTS LIST */
.products .thumbnail-container, .featured-products .thumbnail-container, .product-accessories .thumbnail-container, .product-miniature .thumbnail-container {height:338px;}
.products .thumbnail-container .product-thumbnail, .featured-products .thumbnail-container .product-thumbnail, .product-accessories .thumbnail-container .product-thumbnail, .product-miniature .thumbnail-container .product-thumbnail {height:calc(100% - 90px)}
.products .product-description, .featured-products .product-description, .product-accessories .product-description, .product-miniature .product-description {height:90px;}
.products .highlighted-informations, .featured-products .highlighted-informations, .product-accessories .highlighted-informations, .product-miniature .highlighted-informations {height : 4.125rem}

 

Enjoy !

fcherrier

fcherrier

hi !

here is a working solution for prestashop 1.7.6.9 with classic theme (may work with others versions)

edit themes/classic/templates/catalog/_partials/miniatures/product.tpl

around line 70 after :

    <span class="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
    <span itemprop="price" class="price">{$product.price} HT</span>

add :
    {if $product.unit_price_full != ""}
       <br>
       <span class="unit_price">(soit {math equation="rprice / ratio" rprice=$product.price_tax_exc ratio=$product.unit_price_ratio} HT {$product.unity})</span>
    {/if}

result in product list is (in euros / french) 

   Sable en sac de 2kg
         20,60 € HT
(soit 10,30 € HT le kilo)

 

You have to add some custom CSS to expand the miniature look

in themes/classic/assets/css/custom.css

add :

/* PRODUCTS LIST */
.products .thumbnail-container, .featured-products .thumbnail-container, .product-accessories .thumbnail-container, .product-miniature .thumbnail-container {height:338px;}
.products .thumbnail-container .product-thumbnail, .featured-products .thumbnail-container .product-thumbnail, .product-accessories .thumbnail-container .product-thumbnail, .product-miniature .thumbnail-container .product-thumbnail {height:calc(100% - 90px)}
.products .product-description, .featured-products .product-description, .product-accessories .product-description, .product-miniature .product-description {height:90px;}
.products .highlighted-informations, .featured-products .highlighted-informations, .product-accessories .highlighted-informations, .product-miniature .highlighted-informations {height : 4.125rem}

 

Enjoy !

fcherrier

fcherrier

hi !

here is a working solution for prestashop 1.7.6.9 with classic theme (may work with others versions)

edit themes/classic/templates/catalog/_partials/miniatures/product.tpl

around line 70 after :

    <span class="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
    <span itemprop="price" class="price">{$product.price} HT</span>

add :
    {if $product.unit_price_full != ""}
       <br>
       <span class="unit_price">(soit {math equation="rprice / ratio" rprice=$product.price_tax_exc ratio=$product.unit_price_ratio} HT {$product.unity})</span>
    {/if}

result in product list is (in euros / french) 

   Sable en sac de 2kg
         20,60 € HT
(soit 10,30 € HT le kilo)

 

You have to add some custom CSS to expand the miniature look

in themes/classic/assets/css/custom.css

add :

/* PRODUCTS LIST */
#products .thumbnail-container, .featured-products .thumbnail-container, .product-accessories .thumbnail-container, .product-miniature .thumbnail-container {height:338px;}
#products .thumbnail-container .product-thumbnail, .featured-products .thumbnail-container .product-thumbnail, .product-accessories .thumbnail-container .product-thumbnail, .product-miniature .thumbnail-container .product-thumbnail {height:calc(100% - 90px)}
#products .product-description, .featured-products .product-description, .product-accessories .product-description, .product-miniature .product-description {height:90px;}
#products .highlighted-informations, .featured-products .highlighted-informations, .product-accessories .highlighted-informations, .product-miniature .highlighted-informations {height : 4.125rem}

 

Enjoy !

×
×
  • Create New...