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 |
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 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. |
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? |
Re: X-Cart 4
Quote:
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"}"?> Now change your php code to use that template. change this line: Code:
func_display('customer/home.tpl',$smarty); Code:
func_display('customer/myregform.tpl',$smarty); Keep in mind I am just typing up and copy/pasting these examples, not testing them. |
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. |
All times are GMT -8. The time now is 12:20 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.