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

X-Cart 4

 
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-16-2015, 03:13 PM
  Blainevk's Avatar 
Blainevk Blainevk is offline
 

Senior Member
  
Join Date: Dec 2004
Location: Atlanta, GA
Posts: 140
 

Default X-Cart 4

Sorry there is no category for X-Cart 4 so I had to ask this here.

I want to create a page that ONLY displays the Registration form.... NOTHING ELSE.

Does anyone know how to do this?

Version: 4.6.6
__________________
Blaine

X-Cart Multi-vendor 5.4.0.5
PHP version: 7.2.23

Blaine's Party Network - http://blainespartynetwork.net
__________________________________________________ ________________

Party Points Gift Mall - https://blainespartynetwork.net/partypoints/giftmall/

Create a Rewards Program - http://blainespartynetwork.net/partypoints/

Grow Your Business - http://blainevk.blainespartynetwork.net/business/

Making Money & Fun - http://blainespartynetwork.net/partyconcierge/
Reply With Quote
  #2  
Old 05-17-2015, 06:57 AM
  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

Blaine,
You are right! We no longer seem to have a forum for this, but it is just because of the new forums for X-Cart 5. Previously all the forums were dedicated to X-Cart classic (4 and below), so now that we have dedicated X-Cart 5 forums it is confusing. I think we need to rename the X-Cart Classic forums to reflect that.

The proper categories are these:
For X-Cart Classic logic questions: http://forum.x-cart.com/forumdisplay.php?f=20

For X-Cart Classic design questions: http://forum.x-cart.com/forumdisplay.php?f=51

Your question would fall into more of the logic category, but it really would be suitable in either. Lets let a mod with more power than I move the thread.

To answer your question, you can easily create a new page:
Create a new php file in the root of X-Cart named whatever you like, myregform.php. At a minimum it needs this code:

Code:
<?php require './auth.php'; include $xcart_dir.'/include/common.php'; $location[] = array(func_get_langvar_by_name('lbl_my_reg_form'), ''); $smarty->assign('main', 'my_reg_form'); // Assign the current location line $smarty->assign('location', $location); func_display('customer/home.tpl',$smarty); ?>

The last bit decides what template you want to display, and above it says "customer/home.tpl". You can build a new template, and put anything you want in there. Of course this is just the start of your project.

You may find that you can simply define "main" like above, and take action based on that in the necessary templates to not display the pieces that you want.
__________________
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
  #3  
Old 05-17-2015, 12:04 PM
  Blainevk's Avatar 
Blainevk Blainevk is offline
 

Senior Member
  
Join Date: Dec 2004
Location: Atlanta, GA
Posts: 140
 

Default Re: X-Cart 4

Thanks for the reply totaltec,

The Form is NOT showing up?

Here is the URL of the page I created: http://isexypartynetwork.net/isexyredpoints/giftcatalog/myregform.php

And here is the HTML:

==================

<!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>

<title>iSexy Party Network Registration</title>

</head>

<body>


<?php

require './auth.php';

include $xcart_dir.'/include/common.php';

$location[] = array(func_get_langvar_by_name('lbl_my_reg_form'), '');

$smarty->assign('main', 'my_reg_form');

// Assign the current location line
$smarty->assign('location', $location);

func_display('customer/home.tpl',$smarty);
?>


</body>
</html>

======================

What am I missing?
__________________
Blaine

X-Cart Multi-vendor 5.4.0.5
PHP version: 7.2.23

Blaine's Party Network - http://blainespartynetwork.net
__________________________________________________ ________________

Party Points Gift Mall - https://blainespartynetwork.net/partypoints/giftmall/

Create a Rewards Program - http://blainespartynetwork.net/partypoints/

Grow Your Business - http://blainevk.blainespartynetwork.net/business/

Making Money & Fun - http://blainespartynetwork.net/partyconcierge/
Reply With Quote
  #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
  #5  
Old 05-17-2015, 12:25 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

I'm curious now. Let's see if the above works for you.
You should get a fairly blank page with the words "Hello World".
Then we can work on displaying the form.
__________________
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
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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 12:02 AM.

   

 
X-Cart forums © 2001-2020