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

photo 06-17-2007 03:02 AM

Re: Adding a form to a static page.
 
Quote:

Originally Posted by inebriate
try taking out "/home/virtual/site1/fst/var/www/html" in the include so it matches the same src in your iframe

I have tried that and no joy. Thing is, if I create a page.php with this code in it,
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<?php include_once('/home/virtual/site1/fst/var/www/html/emformpro/emform_include.php');?>
<?php print get_emform_form("","jute_quotes");?>
</body>
</html>

Upload it to my root folder, open it in a browser it works fine.

photo 06-19-2007 01:09 PM

Re: Adding a form to a static page.
 
Just wanted to say EternalMart was able to get this to work with product pages and static pages. I must say that this company has went way above the call of duty to get EternalMart Form Processor Pro to integrate almost seemlessly into xcart.
Here are some of the features you get with EternalMart Form Processor Pro,
Quote:

Features
  • Predefined form templates - create prdedefined form easily and quickly http://www.eternalmart.com/images/new.gif
  • CAPTCHA function to prevent from spam robots http://www.eternalmart.com/images/new.gif
  • Able to upload files via web browser
  • Log replied messages
  • Create as many forms as possible
  • Create different form fields such as text boxes, check boxes, radio buttons, selection lists in each form
  • Customizable HTML layout
  • Easy to configure preference settings via web-based control panel
  • Option to send auto reply email
  • Option to send notification email to webmaster after someone has posted the form
  • Store data in MySQL database
  • View, reply or remove messages via web-based control panel


If you need to add a form or forms on your site, I think you would do well to check out EternalMart Form Processor Pro

nomonkeybiz 10-21-2007 10:47 PM

Re: Adding a form to a static page.
 
Would you mind sharing how to integrate this form processor into xcart? Thanks.

photo 10-22-2007 07:13 AM

Re: Adding a form to a static page.
 
Quote:

Originally Posted by nomonkeybiz
Would you mind sharing how to integrate this form processor into xcart? Thanks.


You should be able to do the install (as per form installation instructions) and then just call the form you create in a static page.
I actually quit using this form processor because I did not really need the database set-up.
If you get stuck at all let me know and I will try and help.


All times are GMT -8. The time now is 01:12 AM.

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