Sapher Posted December 9, 2009 Share Posted December 9, 2009 Bonjour,J'ai un problème : dans le panier, pour chaque produit personnalisé, le total est à 0 alors que le prix unitaire est normal.J'ai regardé comment ça fonctionnait : l'appel de la fonction addCustomizationPrice de la classe Product dans le fichier order.php . J'ai fait des echo test et à prioris ça fonctionne bien. En revanche une fois dans le tpl, la valeur n'existe plus.Si je ne suis pas très clair :order.php ligne 420 : Product::addCustomizationPrice($summary['products'], $customizedDatas); Je rajoute derrière : foreach ($summary['products'] as $testproduct) echo '$testproduct[\'total_customization_wt\'] = '. $testproduct['total_customization_wt'] . '. '; ça marche, il me retourne la bonne valeur.en revanche une fois dans le tpl (shopping-cart.tpl ligne 62) {foreach from=$products item=product name=productLoop} Je rajoute derrière : Test : {$product.total_customization_wt} et ça ne marche pas, il m'affiche "Test :" sans la valeur derrière.Alors soit j'appelle mal ma variable dans le tpl, soit il y a eu un problème lors de l'assign. Des idées ? Link to comment Share on other sites More sharing options...
Ecom Posted December 15, 2009 Share Posted December 15, 2009 Bonjour,J'ai le même problème, comment l'as tu résolu?Merci pour ton retour. Link to comment Share on other sites More sharing options...
Miguel Caires Posted December 18, 2009 Share Posted December 18, 2009 In my case i've managed to kind of fix it...Since my customization doesn't have any special price, i just needed to change line 34 in shopping-cart-product-line.tpl from {if !$priceDisplay || $priceDisplay == 2}{convertPrice price=$product.total_customization_wt}{if $priceDisplay == 2} {l s='+Tx'}{/if}{/if}{if $priceDisplay == 2} {/if} to {if !$priceDisplay || $priceDisplay == 2}{convertPrice price=$product.total_wt}{if $priceDisplay == 2} {l s='+Tx'}{/if}{/if}{if $priceDisplay == 2} {/if} Don't know if this helps. :SEither way, your post helped me. So thanks. Link to comment Share on other sites More sharing options...
Ecom Posted December 18, 2009 Share Posted December 18, 2009 Thank you Miguel,I'll going to test it.I'll tell you.Good day. Link to comment Share on other sites More sharing options...
Ecom Posted December 18, 2009 Share Posted December 18, 2009 Miguel is perfect. It's working now, same with a special price in declinaison.Thank's a lot.I don't put this post in resolved statut because Spaher didn't answer.Have a good day.1000 thanks Link to comment Share on other sites More sharing options...
Miguel Caires Posted December 18, 2009 Share Posted December 18, 2009 This won't work if the customization has a different price...What i did was, since my customization didn't have any extra fees, instead of displaying the customization price, i set the tpl to display the total price of that item.Beware that if your customization has an extra fee, it won't work.Glad to help Link to comment Share on other sites More sharing options...
Ecom Posted December 18, 2009 Share Posted December 18, 2009 ok I'll be careful.Thank's a lot Link to comment Share on other sites More sharing options...
Miguel Caires Posted December 18, 2009 Share Posted December 18, 2009 no problem. take care. 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