asdqwerty Posted September 11, 2013 Share Posted September 11, 2013 Hi I'm new to prestashop and I'm wondering if there is any way of getting the cart inside the top menu. Like in this image: http://imgur.com/uTLurA2 Thanks Link to comment Share on other sites More sharing options...
asdqwerty Posted September 12, 2013 Author Share Posted September 12, 2013 I ended up just adding this in my topmenu block: <li><a href="{$base_dir}index.php?controller=order">Cart: {$cart_qties} items</a></li> Link to comment Share on other sites More sharing options...
vekia Posted September 12, 2013 Share Posted September 12, 2013 thank you for your solution im going to mark this topic as solved when you move your mouse over cart, you see expanded version too? Link to comment Share on other sites More sharing options...
asdqwerty Posted September 12, 2013 Author Share Posted September 12, 2013 when you move your mouse over cart, you see expanded version too? Nope! Link to comment Share on other sites More sharing options...
vekia Posted September 12, 2013 Share Posted September 12, 2013 Nope! and this is what you want? or you disabled this feature? Link to comment Share on other sites More sharing options...
asdqwerty Posted September 12, 2013 Author Share Posted September 12, 2013 (edited) It didn't really matter, and what I did was way easier EDIT: Didn't work, look below Edited September 12, 2013 by asdqwerty (see edit history) Link to comment Share on other sites More sharing options...
asdqwerty Posted September 12, 2013 Author Share Posted September 12, 2013 (edited) I noticed now that the number doesn't update until I change something in the .tpl file. Whats up with that? Turns out it wasn't that easy I'm assuming it gets cached because I'm using a smarty variable, isn't there a php variable I can use? Or is there some other way I can prevent it getting cached? Edited September 12, 2013 by asdqwerty (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 12, 2013 Share Posted September 12, 2013 hello in module .php file you've got: public function hookTop($params) { return $this->display(__FILE__, 'blockpermanentlinks-header.tpl', $this->getCacheId('blockpermanentlinks-header')); } remove , $this->getCacheId('blockpermanentlinks-header') Link to comment Share on other sites More sharing options...
asdqwerty Posted September 13, 2013 Author Share Posted September 13, 2013 Hi, I don't understand. In what php file do I do this? blockcart? Permanenlinks doesnt have anything to do with the cart does it? I'm not actually using the cart block either though, I'm simply using a global smarty variable in my topmenublock to get the number of items in the cart so I can display it in the menu. Regards Link to comment Share on other sites More sharing options...
asdqwerty Posted September 13, 2013 Author Share Posted September 13, 2013 (edited) Okay now it's solved, I found out I could do this instead: <li><a href="{$base_dir}index.php?controller=order">Cart: {nocache}{$cart_qties}{/nocache}items</a></li> So it's the same as before, just the added {nocache} tag. Edited September 13, 2013 by asdqwerty (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 13, 2013 Share Posted September 13, 2013 thanks for your solution btw. i thought about modules/blockpermanentlinks/blockpermanentlinks.php file 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