mmoss Posted October 5, 2015 Share Posted October 5, 2015 As subject mentioned I need to move the block cart to the top horizontal menu - shown on attached picture. How can this be done. It should replace the search bar in the top menu. Link to comment Share on other sites More sharing options...
allanextreme Posted October 5, 2015 Share Posted October 5, 2015 what i've done was create a hook for the specific module, then attach the module to your custom hook, modify the blocktopmenu.tpl to call your custom hook, but i have cache problems, i need to resolve it first Link to comment Share on other sites More sharing options...
allanextreme Posted October 7, 2015 Share Posted October 7, 2015 Read this article: https://mypresta.eu/en/art/developer/block-cart-in-top-menu.htmlAll credits to the author Link to comment Share on other sites More sharing options...
mmoss Posted October 8, 2015 Author Share Posted October 8, 2015 Hi allanextreme, Have seen it, but can't get it to work. When I have applied all changes it just shows a white screen when entering the shop & back office. Link to comment Share on other sites More sharing options...
allanextreme Posted October 8, 2015 Share Posted October 8, 2015 then you have code errors, activate debug mode and show your error details, by the other hand, the easiest way to put your cart on the menu is editing the .TPL files on "themes" directory, you have to edit the following files on modules: blockcart.tpl blocktopmenu.tpl on blocktop menu you have to delete the </div> tag and put it in the end of the blockcart.tpl, and maybe you have to delete the <div col-4> and the close tag of it, i dont remember if it is necesary. Hope that helps you, cheers. Link to comment Share on other sites More sharing options...
mmoss Posted October 8, 2015 Author Share Posted October 8, 2015 (edited) Got it - will try - 1 question Save changes to this file. Now our block cart module is ready to support hook that we created inside block top menu module. As you probably noticed block cart module uses new template file "blockcart-menu.tpl". Create it inside module directory with these contents: Is this a new file to be created, or does it exist already and where should I find it/save it? Edited October 8, 2015 by mmoss (see edit history) Link to comment Share on other sites More sharing options...
mmoss Posted October 8, 2015 Author Share Posted October 8, 2015 Can't get it to work unfortunately. Link to comment Share on other sites More sharing options...
allanextreme Posted October 8, 2015 Share Posted October 8, 2015 Got it - will try - 1 question Save changes to this file. Now our block cart module is ready to support hook that we created inside block top menu module. As you probably noticed block cart module uses new template file "blockcart-menu.tpl". Create it inside module directory with these contents: Is this a new file to be created, or does it exist already and where should I find it/save it? its new Link to comment Share on other sites More sharing options...
allanextreme Posted October 8, 2015 Share Posted October 8, 2015 Can't get it to work unfortunately. for the unorthodox method that i gave, 1.- Go to ROOT_PRESTASHOP\themes\default-bootstrap\modules\blockcart\ directory 2.- Open the file blockcart.tpl 3.- Comment or delete the line 27 aprox <div class="col-sm-4 clearfix{if $PS_CATALOG_MODE} header_user_catalog{/if}"> 4.- on the same file, delete the close tag of this file, the line 205 aprox, when you have an if of SMARTY: </div> on the same file you have to put a close tag at the bottom of the content </div> 5.- Save the changes on the file and close it. 6.- Go to: themes\default-bootstrap\modules\blocktopmenu 7.- Open the file blocktopmenu.tpl 8.- Delete the close tag of the following div (sorry if you dont find it, i override my files): <div id="block_top_menu" class="sf-contener"> 9.- Delete the class clearfix of the following line: <ul class="sf-menu clearfix menu-content"> 10.- Go to themes\default-bootstrap\css\modules\blockcart 11.- Open the file blockcart.css 12.- On line 7 delete the padding-top: 50px: #header .shopping_cart { position: relative; float: right; padding-top: 50px; } Finally go to module positions and put your cart module after the menu. The next step is to put some CSS on the background menu but you have to solve that Hope that helps Link to comment Share on other sites More sharing options...
mmoss Posted October 9, 2015 Author Share Posted October 9, 2015 Hi again allanextreme, Think I will have to skip this one. It's above my abilities in coding However thanks anyway for your assistance. 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