Safwen Posted August 23, 2013 Share Posted August 23, 2013 Hi, i would like to get the cart's contents ( the cart's products ids ) in the authentication.tpl file . is it possible and how to do it ? Thanks in advance. Link to comment Share on other sites More sharing options...
PascalVG Posted August 23, 2013 Share Posted August 23, 2013 Hmmm, Hope I don't mix up here: Try this: (didn't test it. Let me know if it works. If not, I'll try tonight...)Assuming you have your $cart {assign var=products value=$cart->getProducts()} {foreach $products as $product} {$product.id_product} {/foreach} pascal EDIT: getProducts(), with big P Link to comment Share on other sites More sharing options...
PascalVG Posted August 23, 2013 Share Posted August 23, 2013 Oops, see that you want it in the authentication.tpl file. No $cart there. Needs some more work to provide the $cart here... Hopefully tonight more... Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2013 Share Posted August 23, 2013 it's necessary to define the $cart in the auth controller, then pass this variable to the smarty template Link to comment Share on other sites More sharing options...
Safwen Posted August 23, 2013 Author Share Posted August 23, 2013 problem resolved it was simple in the authentication.tpl i put this {foreach $cart->getProducts() as $product} some code {/foreach} Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2013 Share Posted August 23, 2013 thanks for your solution im going to mark this topic as [solved] best regards Link to comment Share on other sites More sharing options...
Recommended Posts