Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding a form to a static page.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-16-2007, 08:19 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Adding a form to a static page.

Hello,
I am using EternalMart Form Processor Pro and I would like to add a form to a static page. According to the instructions I need to add this include code,
Code:
<?php include_once('/home/virtual/site1/fst/var/www/html/emformpro/emform_include.php');?>
and then add this code to where ever I want to display the form,
Code:
<?php print get_emform_form("","myform");?>

My question is, where would I need to put the include and would I be able to just put
Code:
<?php print get_emform_form("","myform");?>
on the static page without it causing problems?

Thanks
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #2  
Old 06-16-2007, 09:52 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Adding a form to a static page.

Did you try enclosing your php inside a smarty tag?

Code:
{php} <?php code ;?> {/php}
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 06-16-2007, 10:09 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Adding a form to a static page.

Quote:
Originally Posted by carpeperdiem
Did you try enclosing your php inside a smarty tag?

Code:
{php} <?php code ;?> {/php}

I,ll give that a try now and let you know. I tryed putting the include in home.php and then adding the form call to a static page but that did't work.
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #4  
Old 06-16-2007, 10:20 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Adding a form to a static page.

Quote:
Originally Posted by carpeperdiem
Did you try enclosing your php inside a smarty tag?

Code:
{php} <?php code ;?> {/php}

Unfortunately that did not work. All the static page displayed was {php} {/php}
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #5  
Old 06-16-2007, 10:23 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Adding a form to a static page.

did you enable "Parse Smarty tags in the content of embedded pages" ?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 06-16-2007, 10:36 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Adding a form to a static page.

Quote:
Originally Posted by carpeperdiem
did you enable "Parse Smarty tags in the content of embedded pages" ?
Just tryed that and now it just shows a blank page. Here is the code I placed in a static page,
Code:
{php} <?php include_once('/emformpro/emform_include.php');?> <?php print get_emform_form("","jute_quotes");?> {/php}
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #7  
Old 06-16-2007, 10:48 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Adding a form to a static page.

I am able to get it to display/work fine using an Iframe.
Code:
<IFRAME border=0 name=emformpro align=center marginWidth=1 marginHeight=1 src="/emformpro/emform.php?formname=jute_quotes" frameBorder=0 width=100% scrolling=no height=700> Your browser does not support inline frames or is currently configured not to display inline frames. </IFRAME>
Are there any issues that anyone knows of that doing it this way would cause?

Thanks
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #8  
Old 06-16-2007, 04:59 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Adding a form to a static page.

when using the php tags in smarty, you dont need to add <?php ?>

so
{php}
<?php include_once('/emformpro/emform_include.php');?>
<?php print get_emform_form("","jute_quotes");?>
{/php}

should be
{php}
include_once('/emformpro/emform_include.php');
print get_emform_form("","jute_quotes");
{/php}
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #9  
Old 06-16-2007, 05:15 PM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Adding a form to a static page.

Quote:
Originally Posted by inebriate
when using the php tags in smarty, you dont need to add <?php ?>

so
{php}
<?php include_once('/emformpro/emform_include.php');?>
<?php print get_emform_form("","jute_quotes");?>
{/php}

should be
{php}
include_once('/emformpro/emform_include.php');
print get_emform_form("","jute_quotes");
{/php}

When I try that using,
Code:
<table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td>{php} include_once('/home/virtual/site1/fst/var/www/html/emformpro/emform_include.php'); print get_emform_form("","jute_quotes"); {/php}</td> </tr> </table>
I get this message, "Can't connect to database"
So far the only way I can get it to work is using a Iframe, but there must be a better way.

Thanks
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #10  
Old 06-16-2007, 07:14 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Adding a form to a static page.

try taking out "/home/virtual/site1/fst/var/www/html" in the include so it matches the same src in your iframe
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:35 AM.

   

 
X-Cart forums © 2001-2020