MYLIA Posted February 12, 2014 Share Posted February 12, 2014 BonjourJe suis un débutant en PS et je rencontre des problèmes lors de la récupération des objets. Ma question est la suivante: j'ai besoin de récupérer les informations d'une déclinaison d'un produit que j'ai déjà son id. Quelle est la classe qu'il faut instancier ? Existe t'il une fonction qui calcul le prix TTCCordialement Link to comment Share on other sites More sharing options...
Matt75 Posted February 13, 2014 Share Posted February 13, 2014 Salut, Regarde dans la classe Product Tu as besoin de l'ID du produit auquel appartient la déclinaison et l'ID de la déclinaison. $product = new Product($id_product); $combinations = $product->getAttributeCombinationsById($id_attribute, $this->context->language->id); Pour le prix regarde Tools::displayPrice() A+ Link to comment Share on other sites More sharing options...
MYLIA Posted February 13, 2014 Author Share Posted February 13, 2014 Salut matt, Merci pour ta réponse, pour le prix_ttc, j'ai utilisé cette méthode : $product->getPrice($product_attribute_id), 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