X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding a form to a static page. (https://forum.x-cart.com/showthread.php?t=31878)

photo 06-16-2007 08:19 AM

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

carpeperdiem 06-16-2007 09:52 AM

Re: Adding a form to a static page.
 
Did you try enclosing your php inside a smarty tag?

Code:

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


photo 06-16-2007 10:09 AM

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.

photo 06-16-2007 10:20 AM

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}

carpeperdiem 06-16-2007 10:23 AM

Re: Adding a form to a static page.
 
did you enable "Parse Smarty tags in the content of embedded pages" ?

photo 06-16-2007 10:36 AM

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}


photo 06-16-2007 10:48 AM

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

inebriate 06-16-2007 04:59 PM

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}

photo 06-16-2007 05:15 PM

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

inebriate 06-16-2007 07:14 PM

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


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.