Thread: X-Cart 4
View Single Post
  #4  
Old 05-17-2015, 12:22 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: X-Cart 4

Quote:
Originally Posted by Blainevk
Thanks for the reply totaltec,

The Form is NOT showing up?

What am I missing?
Pretty much the whole boat.

The php I provided above is intended to be in the root of your xcart installation just as it is. No HTML should be in the PHP file. That will be included by a template.

Looks like your code so far is working. Like I said above I just gave you the code required to start your own page, the very beginning of the journey.

TBH, it is such a huge undertaking if you are unfamiliar with X-Cart and Smarty than it is ill advised for you to take this project on.

If you are determined, then the next step would be rendering your own template. create a new file in your skin directory, or even in common_files if you must. Put it in the skin/yourskin/customer/ directory and name it myregform.tpl

Put this in it:
Code:
<?xml version="1.0" encoding="{$default_charset|default:"utf-8"}"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> {config_load file="$skin_config"} <html xmlns="http://www.w3.org/1999/xhtml"{if $active_modules.Socialize} xmlns:g="http://base.google.com/ns/1.0" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#"{/if}> <head> {include file="customer/service_head.tpl"} </head> <body{if $body_onload ne ''} onload="javascript: {$body_onload}"{/if}{if $container_classes} class="{foreach from=$container_classes item=c}{$c} {/foreach}"{/if}> <div> <h1>Hello World</h1> </div> {load_defer_code type="css"} {include file="customer/service_body_js.tpl"} {load_defer_code type="js"} </body> </html>

Now change your php code to use that template.
change this line:
Code:
func_display('customer/home.tpl',$smarty);
to:
Code:
func_display('customer/myregform.tpl',$smarty);

Keep in mind I am just typing up and copy/pasting these examples, not testing them.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote