PHP Include Problem

Questions and answers about ShopSite Custom Templates

PHP Include Problem

Postby Cayce » Tue Jul 05, 2011 8:24 am

Hey, Forum

I'm having a frustrating time getting my PHP includes to work in my custom templates. The include file is: ssi_horiz_nav.php

The code calling the include: <?php include("ssi_horiz_nav.php"); ?>

Variations I've tried include a relative path (<?php include("/ssi_horiz_nav.php"); ?>), a full absolute url path, various 'virtual' configurations, etc.

In the http://shopsite.com/designer_tools.html site I found this small snippet of instruction, but I'm apparently misinterpreting it: "Simply include the dynamic content code in your ShopSite Product and Page fields, or create a Custom Template using the dynamic code, and then make sure your files are named with the correct extension to tell your Web server to use the right dynamic code parser."

Any help on this would surely be appreciated

Thanks.

Cayce
Cayce
 
Posts: 14
Joined: Fri Mar 18, 2011 8:41 am

Re: PHP Include Problem

Postby ShopSite Lauren » Tue Jul 05, 2011 12:24 pm

Have you uploaded your include file on the server via FTP, or do you have your include file uploaded in the ShopSite include files section (Merchandising > Custom Templates > Includes). If it is on the server, then make sure that the server is setup to allow PHP includes (make a test page on the server, not in ShopSite and try the same code). If you have uploaded the include file in ShopSite under Merchandising > Custom Templates > Includes, then instead of the code you are using, you would use the tag:
[-- INCLUDE ssi_horiz_nav.php PROCESS --]

If you are still having problems, please provide a link to the page you are testing this on so that I can see the issue/URLs/code.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 887
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 34 guests