maz0193 Posted December 25, 2013 Share Posted December 25, 2013 hello, is that someone can help me to have this option on my website: must be the only product that I have on my shop with its versions ( attributes) is displayed on the homepage of the site.so, i need to have product.tpl instead of index.tpl. so, When I click on HOME in Prestashop I want to go to my main product page. my version is : 1.5.6 thank you very much for your help Link to comment Share on other sites More sharing options...
Paulito Posted December 25, 2013 Share Posted December 25, 2013 Good morning If you want the home link to add directly to a product then see: http://screencast.com/t/L90GcHGBJ http://mobileskunk.co.uk/index.php You can then add any other links you require Hope this helps Paul Link to comment Share on other sites More sharing options...
vekia Posted December 25, 2013 Share Posted December 25, 2013 what is the product ID that you want to display on homepage? Link to comment Share on other sites More sharing options...
maz0193 Posted December 25, 2013 Author Share Posted December 25, 2013 (edited) product ID = 1 Edited December 25, 2013 by maz0193 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 25, 2013 Share Posted December 25, 2013 ok thank you, i will prepare tutorial today i will let you know 1 Link to comment Share on other sites More sharing options...
maz0193 Posted December 25, 2013 Author Share Posted December 25, 2013 hi, Did you complete the tutorial. thank you Link to comment Share on other sites More sharing options...
maz0193 Posted December 26, 2013 Author Share Posted December 26, 2013 ok thank you, i will prepare tutorial today i will let you know hi, Did you complete the tutorial. thank you Link to comment Share on other sites More sharing options...
vekia Posted December 27, 2013 Share Posted December 27, 2013 it's ready: how to display product page as landing page of your store Link to comment Share on other sites More sharing options...
PascalVG Posted December 27, 2013 Share Posted December 27, 2013 That's a nice little trick to change the controller :-) Thanks! Just a small thing: couldn't you just remove the whole initContent function? It would then take it's parent's function automatically, right? Pascal 1 Link to comment Share on other sites More sharing options...
vekia Posted December 27, 2013 Share Posted December 27, 2013 yes you've got right Link to comment Share on other sites More sharing options...
maz0193 Posted December 27, 2013 Author Share Posted December 27, 2013 hi, this is very good that you have done, there is a final request: when you click on the logo to return to homepage we, the link becomes: mywebsite.com / index.php id_product = 1 & controller = product? is there a possibility to have this link: mywebsite.com without (index.php id_product = 1 & controller = product?) Link to comment Share on other sites More sharing options...
vekia Posted December 27, 2013 Share Posted December 27, 2013 sounds strange, mainly because logo always redirects to the homepage ($base_dir variable contains always url to homepage) make sure that you''ve got this code: <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"> <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}/> </a> in header.tpl file where the logo appears. Link to comment Share on other sites More sharing options...
maz0193 Posted December 27, 2013 Author Share Posted December 27, 2013 yes I know but now even if I put in the navigation bar : www.mywebsite.com it goes directly to: www.mywebsite.com/index.php?id_product=1&controller=product {$ base_dir} became www.mywebsite.com/index.php?id_product=1&controller=product instead www.mywebsite.com Link to comment Share on other sites More sharing options...
vekia Posted December 27, 2013 Share Posted December 27, 2013 what ps version? 1.5.6.0 or 1.5.6.1 ? Link to comment Share on other sites More sharing options...
maz0193 Posted December 27, 2013 Author Share Posted December 27, 2013 1.5.6.1 Link to comment Share on other sites More sharing options...
vekia Posted December 28, 2013 Share Posted December 28, 2013 in your indexcontroller add this function: public function canonicalRedirection($canonicalURL = '') { } will work then as you expect 1 Link to comment Share on other sites More sharing options...
maz0193 Posted December 28, 2013 Author Share Posted December 28, 2013 verry verry verry good ! Link to comment Share on other sites More sharing options...
vekia Posted December 28, 2013 Share Posted December 28, 2013 you're welcome i will udpate by guide for this, this redirection is a feature in 1.5.6.1 version 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