Jump to content

(Mise à jour ) Panier prix normal et prix barré même tarif pour tous les produits


Recommended Posts

Bonjour,

 

Je rencontre un bug m'affichant et le prix barré et le prix normal dans le panier ( qui sont les mêmes sauf pour de rare produits en promo)

 

Je suis en version 1.6.0.14.

 

Ci joint le fichier image montrant le bug.

 

Une idée ???

post-767330-0-44379600-1431171327_thumb.gif

Edited by Pounyet (see edit history)
Link to comment
Share on other sites

Bonjour,

 

Afin d'isoler le probleme, testez le même produit avec le theme natif Prestashop.

 

Si le probleme se reproduit avec le theme natif, c'est un bug Prestashop ( ou un probleme de configuration du produit)

Si le probleme ne se reproduit pas, regardez du coté de votre theme.

 

V++

 

Atch

Link to comment
Share on other sites

Bonjour,

 

Après test le défaut reste présent avec le thème natif.

 

Chaque produit me fait ce bug, ce n'est pas donc pas une configuration dans un produit spécifique.

 

Cordialement,

Fred.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

J'ai trouvé la solution.

 

Dans controllers/front/ParentOrderController.php

Remplacer :

				$cart_product_context);
 
 			if (Product::getTaxCalculationMethod())
				$product['is_discounted'] = $product['price_without_specific_price'] != Tools::ps_round($product['price'], _PS_PRICE_COMPUTE_PRECISION_);
 			else
				$product['is_discounted'] = $product['price_without_specific_price'] != Tools::ps_round($product['price_wt'], _PS_PRICE_COMPUTE_PRECISION_);
 		}

		// Get available cart rules and unset the cart rules already in the cart

Par :

				$cart_product_context);
 
 			if (Product::getTaxCalculationMethod())
				$product['is_discounted'] = Tools::ps_round($product['price_without_specific_price'], _PS_PRICE_COMPUTE_PRECISION_) != Tools::ps_round($product['price'], _PS_PRICE_COMPUTE_PRECISION_);
 			else
				$product['is_discounted'] = Tools::ps_round($product['price_without_specific_price'], _PS_PRICE_COMPUTE_PRECISION_) != Tools::ps_round($product['price_wt'], _PS_PRICE_COMPUTE_PRECISION_);
 		}

		// Get available cart rules and unset the cart rules already in the cart
Edited by Pounyet (see edit history)
  • Like 1
Link to comment
Share on other sites

 

J'ai trouvé la solution.

 

Dans controllers/front/ParentOrderController.php

Remplacer :

				$cart_product_context);
 
 			if (Product::getTaxCalculationMethod())
				$product['is_discounted'] = $product['price_without_specific_price'] != Tools::ps_round($product['price'], _PS_PRICE_COMPUTE_PRECISION_);
 			else
				$product['is_discounted'] = $product['price_without_specific_price'] != Tools::ps_round($product['price_wt'], _PS_PRICE_COMPUTE_PRECISION_);
 		}

		// Get available cart rules and unset the cart rules already in the cart

Par :

				$cart_product_context);
 
 			if (Product::getTaxCalculationMethod())
				$product['is_discounted'] = Tools::ps_round($product['price_without_specific_price'], _PS_PRICE_COMPUTE_PRECISION_) != Tools::ps_round($product['price'], _PS_PRICE_COMPUTE_PRECISION_);
 			else
				$product['is_discounted'] = Tools::ps_round($product['price_without_specific_price'], _PS_PRICE_COMPUTE_PRECISION_) != Tools::ps_round($product['price_wt'], _PS_PRICE_COMPUTE_PRECISION_);
 		}

		// Get available cart rules and unset the cart rules already in the cart

 

Un énorme merci pour ce partage.

 

Je rencontrai le même problème sur mon site et la solution a fonctionné.

 

Même si j'ai recopié le code sans trop comprendre la subtilité entre le avant / après , cela illustre bien la force de la communauté PS !

 

Bonne continuation

Sébastien.

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