Jump to content

Erreur affichage prix HT bloc promotions


Recommended Posts

Bonjour à tous et meilleurs voeux pour 2013 !

 

Voilà, je rencontre un bug dans l'affichage du prix HT du bloc promotions.

 

Ma boutique est configurée pour afficher les deux tarifs (HT et TTC).

 

J'ai trouvé comment afficher le prix en promo HT mais pas l'ancien prix HT...

 

Voici ce que j'ai modifié dans blockspecials.php

Ligne 95

  'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2),

Remplacer par

  'priceWithoutReduction_tax_excl' => Tools::displayPrice(Product::getPriceStatic((int)($special['id_product']), Product::getTaxCalculationMethod() == PS_TAX_EXC), $currency),

 

Mais une erreur persiste, le prix "Au lieu de 210,00 € HT" aurait du être de 240,00 € HT

promo.PNG

Voici la ligne du template qui gère ceci:

<span class="price">{if !$priceDisplay}Au lieu de {displayWtPrice p=$special.price}{else}Au lieu de {displayWtPrice p=$special.price_tax_exc}{l s=' HT'}{/if}</span>

 

De plus, je recontre un autre problème dans products.tpl et products-list.tpl mais toujours avec l'affichage de l'ancien prix ...Là l'ancien prix indiqué est bon mais est en TTC hors je voudrais avoir le HT.

 

Merci à tous ceux qui pourrait me venir en aide.

 

PS: le site n'est pas celui de ma signature mais il s'agit de la version de test en local.

Link to comment
Share on other sites

Pour ceux qui voulaient comme moi afficher les prix en HT pour le module promotions.

 

Voilà ce qu'il faut modifier :

 

Classes/Product.php (ligne 3582)

  $row['price_without_reduction'] = Product::getPriceStatic(
(int)$row['id_product'],
false[b],[/b]
((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null),
6,
null,
false,
false
  );

 

modules/blockspecials/blockspecials.php (ligne 95)

  'priceWithoutReduction_tax_excl' => Tools::displayPrice(Product::getPriceStatic((int)($special['id_product']), Product::getTaxCalculationMethod() == PS_TAX_EXC), $currency),

 

modules/blockspecials/blockspecials.tpl (ligne 50)

 <span class="price">{if !$priceDisplay}Au lieu de {displayWtPrice p=$special.price}{else}Au lieu de {convertPrice price=$special.price_without_reduction}{l s=' HT'}{/if}</span>

 

votre theme/product.tpl (ligne 410)

   <span id="old_price_display">Au lieu de {convertPrice price=$product->getPrice(false, NULL, 6, NULL, false, false)}{l s=' HT'}</span>

 

votre theme/product-list.tpl (ligne 58)

	  <p>Au lieu de {convertPrice price=$product.price_without_reduction}{l s=' HT'}</p>

 

Voilà les modifs à effectuer...

 

@ bientôt

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...