Forums / General Questions / require for Amazon does not work

require for Amazon does not work

Results 1 to 6 of 6
20 Jun 2012, 13:34
#1
chab avatar

chab

New Zenner

Join Date:
Aug 2010
Posts:
5
Plugin Contributions:
0

require for Amazon does not work

Hi Guys,

I'm trying to do a require in tpl_checkout_shipping_default.php, but it does not work. The path is right, but the require destroys my shop:

[PHP]if(file_exists('amazon_checkout/src/CheckoutByAmazon/Service/Samples/config.inc.php'))
require 'amazon_checkout/src/CheckoutByAmazon/Service/Samples/config.inc.php'; [/PHP]

hope someone of you has a solution for me?
20 Jun 2012, 16:05
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: require for Amazon does not work

And if you write it as:
require('amazon_checkout/src/CheckoutByAmazon/Service/Samples/config.inc.php'); 
21 Jun 2012, 14:00
#3
chab avatar

chab

New Zenner

Join Date:
Aug 2010
Posts:
5
Plugin Contributions:
0

Re: require for Amazon does not work

Then it's the same.
Something with the require is not working because it doesnt get into config.inc.php code when i debugg.
It stops at the require and i dont know why.
21 Jun 2012, 14:47
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: require for Amazon does not work

Are you sure you want the require in the template and not in the header_php.php for that page?
21 Jun 2012, 21:15
#5
ksookma avatar

ksookma

Zen Follower

Join Date:
Aug 2009
Posts:
212
Plugin Contributions:
1

Re: require for Amazon does not work

Maybe an include will work rather then a require.
25 Jun 2012, 07:40
#6
chab avatar

chab

New Zenner

Join Date:
Aug 2010
Posts:
5
Plugin Contributions:
0

Re: require for Amazon does not work

Hi Guys,

i tried include too but didn't work. It's the same with include and require.

Is there a difference embedding the lib in header_php.php or directly in the template?