Zen Cart Logo
Forums / General Questions / separate php file inside catalog can't connect to database

separate php file inside catalog can't connect to database

Views: 758

Results 1 to 2 of 2
3 Mar 2012, 4:42 AM
#1
caborela avatar

caborela

New Zenner

Join Date:
Dec 2008
Posts:
36
Plugin Contributions:
0

separate php file inside catalog can't connect to database

Hi,
i create a separate php file put inside includes/templates/my_template/templates/
this file will execute when tpl_product_info_display.php is load.
In that file i need to connect with the database and get some data but it seems not working.
i tried to put this code on the top "require('includes/application_top')" but no luck.

please help!
thanks in advance!

3 Mar 2012, 8:11 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: separate php file inside catalog can't connect to database

What EXACTLY is this file doing?
And why isn't it in /includes/modules/pages/product_info/main_template_vars_product_type.php instead?