![]() |
Re: new/custom php page?
Thanks guys - I did get it to work now and am just trying to get the specific php calls working now. I'll let ya know when it's working and what I did to make it work correctly.
Thanks again! |
Re: new/custom php page?
OK guys - I have successfully implemented php being used in the tpl file. I can get it to echo "hello world". However, in the tpl file I have a call to http://www.mysite.com/my_search_file.php:
Code:
{include_php file="http://www.mysite.com/my_search_file.php"} Anyone know what gives? TIA! |
Re: new/custom php page?
Well, "not readable" is usually a permissions problem, but I'm not sure of the "include_php file" syntax.
Usually it would be a link like <a href="http://www.mysite.com/my_search_file.php">my search file</a>. Also, look at search.tpl and search.php and the way they interact with each other. In search.tpl it "calls" search.php twice, once at the beginning of the file... <form method="post" action="search.php" name="productsearchform"> and then again towards the end of the file... <a href="search.php" class="Search">{$lng.lbl_advanced_search}</a>. Each instance does something different. The first one asks for user input and then processes it. The second one "opens" search.php so the user can choose which input is relevant. Searching x-cart is a pretty involved process. |
Re: new/custom php page?
OK - I've tried everything I know of how to get this php search script to work. I've tried embedding it within {php} {/php} tags in the tpl file, but when I do that, it shows a blank page. So, I've had to refrence it as an external file from the tpl file:
Code:
{include_php file="skin1/customer/new/search.php"} |
Re: new/custom php page?
Oh, the logic for everything is this: xcart/mysearch.php --> skin1/customer/mysearch.tpl --> skin1/customer/new/search.php which is the actual code for the search...
|
Re: new/custom php page?
You really shouldn't have .php files in the skin1 directory. What if you moved it to x-cart root/include (except that is where the original search.php is) - can you rename your "new" search.php to mysearch2.php?
|
All times are GMT -8. The time now is 12:52 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.