Noorlander Posted June 27, 2013 Share Posted June 27, 2013 (edited) Dear all, can someone pls assist with the following requirement: Unless a user is logged in, I would want the left column to be hidden. I have searched the forum and found several pieces of the puzzle involving "lefthook", "grid_5", etc but i have been unable to get the solution set up... note, i do have a custom theme which actually only has 2 columns (left and middle obviously). Using the latest prestashop version. thanks Edited July 3, 2013 by Noorlander (see edit history) Link to comment Share on other sites More sharing options...
PSfever.com Posted June 27, 2013 Share Posted June 27, 2013 Hi, could you post here URL to your website? I will download a .tpl file and post it here, so you can just upload it. Link to comment Share on other sites More sharing options...
Noorlander Posted June 27, 2013 Author Share Posted June 27, 2013 thanks!! www.ice-contacts.com Link to comment Share on other sites More sharing options...
vekia Posted June 27, 2013 Share Posted June 27, 2013 well it is possible with simple if conditions everything depends on your prestashop version Link to comment Share on other sites More sharing options...
Noorlander Posted June 27, 2013 Author Share Posted June 27, 2013 Hey Vekia, that would be PrestaShop™ 1.5.4.1 Link to comment Share on other sites More sharing options...
vekia Posted June 27, 2013 Share Posted June 27, 2013 in the header.tpl file, where you've got definition of the left column use this code: {if $logged} <div id="left_column" class="column grid_2 alpha"> {$HOOK_LEFT_COLUMN} </div> {/if} use the same if condition (with {else}) to define the correct grid value for the center column: <div id="center_column" class="{if $logged}grid_5{else}grid_7{/if}"> Link to comment Share on other sites More sharing options...
Noorlander Posted June 28, 2013 Author Share Posted June 28, 2013 perfect, thanks Vekia!! Link to comment Share on other sites More sharing options...
vekia Posted June 28, 2013 Share Posted June 28, 2013 you're welcome im going to mark this thread as [solved] if oyu've got any other questions related to this case - feel free to continue discussion here regards Link to comment Share on other sites More sharing options...
Noorlander Posted July 2, 2013 Author Share Posted July 2, 2013 (edited) Hey Vekia, i actually ran into an issue whereby the account-creation page just wont load anymore. It has something to do with authentification.tpl. where the create account form has to load in the div: #center_column (as specified in line 120), but this div doesnt exist... I got it to work partially by updating the authentication.tpl and adding <div id="center_column"></div> at line 153 (just above the form section) as described in this post: http;//www.prestashop.com/forums/topic/198686-technical-error-unable-to-load-form-details-error-thrown-object-object-text-status-parsererr/page__p__1280266__hl__error thrown object__fromsearch__1#entry1280266 Unfortunately, it now shows both the my-account and account-creation forms on the same page. see https://www.ice-cont...ccount-creation Would you have any idea on how to fix this?? thanks again!! Edited July 2, 2013 by Noorlander (see edit history) Link to comment Share on other sites More sharing options...
Noorlander Posted July 2, 2013 Author Share Posted July 2, 2013 I found how to fix this. Will update this posting tomorrow, so dont spend any time on this... Link to comment Share on other sites More sharing options...
Noorlander Posted July 3, 2013 Author Share Posted July 3, 2013 This is what i have done to resolve the lasst issue: It has something to do with authentification.tpl. where the create account form has to load in the div: #center_column (as specified in line 120), but this div doesnt exist... Open authentication.tpl 1) Insert "<div id="center_column"></div>" at line 153 (just above the form section). 2) quote out the function to fade in/fade out the account details form: lines 120 - 126 like this: // adding a div to display a transition //$('#center_column').html('<div id="noSlide">'+$('#center_column').html()+'</div>'); //$('#noSlide').fadeOut('slow', function(){ //$('#noSlide').html(jsonData.page); // update the state (when this file is called from AJAX you still need to update the state) //bindStateInputAndUpdate(); //$(this).fadeIn('slow', function(){ //document.location = '#account-creation'; Then it works fine for me (on PrestaShop 1.5.4.1) 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