View Single Post
  #4  
Old 02-14-2016, 03:49 AM
 
www.cheapglasses.net www.cheapglasses.net is offline
 

Advanced Member
  
Join Date: Dec 2015
Posts: 77
 

Default Re: How to redirect to product page directly?

Quote:
Originally Posted by razortw
Hi.
Try to insert this to the /light_responsive/customer/home.tpl right after the opening <body> tag.
Code:
{if $main eq 'catalog' and $cat_products|@count eq 1} <script type="text/javascript"> window.location.href = "{$cat_products[0].page_url}"; </script> {/if}

how to use php code to meet the same function?

not use js.
Reply With Quote