dixido Posted December 27, 2010 Share Posted December 27, 2010 Hi,I want to be able to hide certain blocks from order.php?step=1 but not from order.php. How do I achieve this? Using the filter field on module position does not work for this. It can not separate order.php?step=1 from order.php.Any simple code I can add to each block that I want to hide or so?I am using the one page checkout module which might complicate things a bit.Thanks,E Link to comment Share on other sites More sharing options...
rocky Posted December 28, 2010 Share Posted December 28, 2010 I'm not familiar with that module, but adding code like the following to the top of the module's TPL file should work: {if $page_name != 'order' OR ($page_name == 'order' AND $smarty.get.step != 1)} and at the bottom of the TPL file: {/if} Link to comment Share on other sites More sharing options...
dixido Posted December 28, 2010 Author Share Posted December 28, 2010 Works like a charm, thanks a lot! Link to comment Share on other sites More sharing options...
rocky Posted December 28, 2010 Share Posted December 28, 2010 Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
praneth Posted November 30, 2012 Share Posted November 30, 2012 (edited) I realise this is "solved", but my question is along the line... Rocky's solution works for up to 24 pages, after that, I get an error message. I have split my site into Tutorials VS Shop. I would like my tutorials to be displayed as products, so that I can use the categories block and other prestashop features. I use a category block for the Shop, and a second (different) category block for the Tutorials. I have manually hidden the "Shop block" from my tutorials pages, and vice versa (hidden the "Tutorials block" from the Shop pages.) Like so: {if $smarty.get.id_category == 14 OR $smarty.get.id_category == 16 OR $smarty.get.id_category == 19 OR $smarty.get.id_category == 18 OR $smarty.get.id_product == 8 OR $smarty.get.id_product == 9 OR $smarty.get.id_product == 23 OR $smarty.get.id_product == 24 OR $smarty.get.id_product == 25 OR $smarty.get.id_product == 26 OR $page_name == 'index' } However, 1) it's quite impractical 2) I can only have 24 of those lines Would someone have an idea? I am thinking that something like {if $smarty.get.id_category|intval < 28 AND $smarty.get.id_category|intval > 31} might help, but this code doesn't work for me... Many thanks in advance! Celine Edited November 30, 2012 by praneth (see edit history) Link to comment Share on other sites More sharing options...
praneth Posted November 30, 2012 Share Posted November 30, 2012 This worked: {if $smarty.get.id_category|intval >=14 AND $smarty.get.id_category|intval <=20 } 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