| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
New Template Page | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
New Template Page
In advance I apologize if this has been documented or discussed on the forums already. If so could someone direct me to it. I was unable to find exactly what I needed.
So I have created a form on the product detail page, to contact us regarding stock levels. This form goes to a PHP page in the root directory of the shopping cart to process and display status (sent, errors for fields required, etc.) I want to be able to display the shopping cart template on this page. I understand I can create static pages, but they won't be able to process PHP code, correct?
__________________
Version: 4.5 |
|||||||
#2
|
|||||||
|
|||||||
Re: New Template Page
The easiest way to do this is a form that passes the user to a static confirmation page. That way, the user never has to go to the PHP page itself, as you may lose your session data and cart contents that way.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
Re: New Template Page
Thanks for the response. This will work for a successful submission where all required fields are populate and process correctly. However if some errors come up and the user needs to enter more information then they will still need to be directed to a PHP page where I can populate the fields with information already entered and display a dynamic error message.
For clarification, say I wanted to create a page like http://www.example.com/help.php (Help Page). All I want to be able to do is display the template on this page and some sample content. What steps would I need to take order to do this?
__________________
Version: 4.5 |
|||||||
#4
|
|||||||
|
|||||||
Re: New Template Page
You'd need to skin that php page to match your site. Easier way is to use a form like this that uses dynamic error reporting on the page:
http://www.bebosoft.com/products/formstogo/overview/ Includes instructions on how to integrate into X-Cart via static pages.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||||
|
|||||||||
Re: New Template Page
You can create a new php page that uses the same cart template structure if you look at a php page that already exists, use the same include lines at the top, include the last few lines that points to the Smarty files, create a tpl for that page, then add that new entry to customer/home_main.tpl.
As with creating any new php pages, you'll want to ensure that your site stays secure. That's why it's typically best to stick to pages that already exist when you can. |
|||||||||
|
#6
|
|||||||
|
|||||||
Re: New Template Page
I would like to thank you both for your help. Took a little work to figure out since this is my first interaction using the templates and smarty files, but I was able to get it to work. I think my main problem was figuring out that you can't display content via PHP inside the content area and that it is handled through the template files.
Is there any documentation on the smarty system within X-Cart? Guessing I am looking for typical variables used and such.
__________________
Version: 4.5 |
|||||||
|
|||
X-Cart forums © 2001-2020
|