PHP inside ShopSite Custom Templates?

This is an archive of old posting to the User Forum

PHP inside ShopSite Custom Templates?

Postby Eddie Caplan » Tue Jan 13, 2004 5:19 pm

Can I somehow insert PHP into a custom template? (And get it to run
successfully!)

What about Perl?
What about Javascript?
Eddie Caplan
 

Re: PHP inside ShopSite Custom Templates?

Postby loren_d_c » Tue Jan 13, 2004 5:49 pm

Yes, yes, yes. You can put any kind of text/code you want in a custom
template.

Of course there are other system requirements to make something like
that work in some cases, for example PHP files usually have to have a
..php filename extension, so you would have to make sure you give that
extension to the filename setting in the Edit Page Contents screens.
Your webserver, of course, also has to have PHP installed and working.
Perl scripts usually have to be run from certain directories that have
been specially aliased in the webserver configuration to run cgi's. They
also usually need to have execute permissions set, which is not done by
default on files created by ShopSite's page generation (although a
simple script using the custom template CALL tag might do that easily
enough). JavaScript can be on almost any kind of web page, it is
compiled by the web browser, not on the server, so there usually aren't
the same restrictions as there are with server-side scripting languages.

-Loren


Eddie Caplan wrote:
Can I somehow insert PHP into a custom template? (And get it to run
successfully!)

What about Perl?
What about Javascript?
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: PHP inside ShopSite Custom Templates?

Postby Eddie Caplan » Tue Jan 13, 2004 6:05 pm

In article <bu2066$4rj$1@support.shopsite.com>, Loren
<loren_d_c@yahoo.com> wrote:

Of course there are other system requirements to make something like
that work in some cases, for example PHP files usually have to have a
.php filename extension, so you would have to make sure you give that
extension to the filename setting in the Edit Page Contents screens.

Makes sense! But am I able to set the filename settings, and do the
similar magic in the Shopping Carts?
Eddie Caplan
 

Re: PHP inside ShopSite Custom Templates?

Postby loren_d_c » Tue Jan 13, 2004 7:09 pm

The filename settings for pages in in Pages -> Edit Page Content, and
the filename settings for products' More Info Pages are in Preducts ->
Edit Product Info.

You can't change the filenames of the shopping cart cgi's nor change any
of the code that is compiled in them, so you won't be able to change
them to PHP or Perl. You can put JavaScript on them, though. The easiest
way would be in the Commerce Setup -> Order System area, each screen has
fields where you can put text or HTML that will appear at the top and
bottom of that particular screen. Additionally, in ShopSite v7 the
shopping cart uses a template which you can copy and modify which can
give you even more control over the look and feel of the cart screens.


-Loren


Eddie Caplan wrote:

In article <bu2066$4rj$1@support.shopsite.com>, Loren
loren_d_c@yahoo.com> wrote:


Of course there are other system requirements to make something like
that work in some cases, for example PHP files usually have to have a
.php filename extension, so you would have to make sure you give that
extension to the filename setting in the Edit Page Contents screens.


Makes sense! But am I able to set the filename settings, and do the
similar magic in the Shopping Carts?
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: PHP inside ShopSite Custom Templates?

Postby Eddie Caplan » Tue Jan 13, 2004 8:17 pm

In article <bu24tb$5tv$1@support.shopsite.com>, Loren
<loren_d_c@yahoo.com> wrote:

You can't change the filenames of the shopping cart cgi's [...]
You can put JavaScript on them, though. [...]

OK, I can understand that. Thank you.

What I'm trying to do is to integrate the ShopSite information with the
data I'm already keeping for my customers in the rest (the non-Store
part) of my website.

I'm hoping that through crafty customizations I can read and write data
from/to my database from the shopping cart pages.

I know I can put some stuff into the Custom CGI file to run after the
purchase has been made. But it's not really what I want. I want the
shopping cart and checkout procedures to contain information,
discounts, coupons, etc. that would be drawn in from the website's (not
ShopSite's) database.

Thank you for all of your help,
Eddie
Eddie Caplan
 

Re: PHP inside ShopSite Custom Templates?

Postby Brandon Eley » Sun Jan 18, 2004 9:06 am

Sorry I don't frequent the newsgroup more often, but saw your post and
had to respond (even if a few days late)...

We use PHP and MySQL database integration through our entire site, and
it works flawlessly. We setup pages with the .php file extensions and I
have built custom page and product templates to also incorporate the PHP
coding that we need. We have additional modules such as testimonials,
email to a friend, etc. that are all driven by php scripts.

If you have any questions or problems with the implimentation you can
drop me a line, I'd be happy to help!

---------------
Brandon Eley
2BigFeet.com
brandon@2bigfeet.com
www.2bigfeet.com
Brandon Eley
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 72 guests