AffordableFiberOptics Posted July 7, 2010 Share Posted July 7, 2010 Hello all.Is there a way to setup a category when clicked it sends you to a contact page? I need to be able to setup a contact form that is accessed when the user clicks on a defined category listing.Is this possible?Thanks as always.Patrick Link to comment Share on other sites More sharing options...
rocky Posted July 8, 2010 Share Posted July 8, 2010 I'm not aware of any way to do this without modifying code. I suggest that you change line 2 of modules/blockcategories/blockcategories.tpl from: <a href="{$node.link|escape:html:'UTF-8'}" {if $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} to: <a href="{if $node.id == 2}{$content_dir}contact-form.php{else}{$node.link|escape:html:'UTF-8'}{/if}" {if $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} This code will change category 2 so that it links to the contact form. Change 2 to the ID of the category you want to redirect to the contact form. Link to comment Share on other sites More sharing options...
AffordableFiberOptics Posted July 8, 2010 Author Share Posted July 8, 2010 Awesome Rocky, thanks!Will give it a shot. Link to comment Share on other sites More sharing options...
AffordableFiberOptics Posted July 8, 2010 Author Share Posted July 8, 2010 I added the code to line 2 of blockcategories.tpl and had no luck. Although my version of the file doesn't have the code in the original filea: {$node.name|escape:html:'UTF-8'} in it... The category works as usual. Do I need to modify anything else? Or another thought was, maybe my custom theme (that uses modified javascript in the theme directory)Am I missing something?Thanks Rocky! Link to comment Share on other sites More sharing options...
rocky Posted July 9, 2010 Share Posted July 9, 2010 There is a bug in the category block in PrestaShop v1.2.5 where the wrong TPL file is called. I think you'll need to make the same change in category-tree-branch.tpl in your theme's directory. 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