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

how to add a new 'help' file/template

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 02-26-2003, 08:18 PM
 
dtherio dtherio is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: Dallas, Texas
Posts: 84
 

Default how to add a new 'help' file/template

Hello,

I am trying to add a new file to show up under my help section. I realize i could do it as a simple php/htmlfile, but Iam trying to do it within the template system

I have checked the docs and tried doing a search in the forums, but in the fourms apparently have not come up with the proper search terms to find an answer.

Basically I want to add a 'sizes' page for product sizing/fit.

I created the file using the admin interface and even copied the text in one of the other files. I created the proper new variable in the languages section, but if I clickon an existing helpfile (faqs, terms etc) with the name of my new file, the browser just goes to the main help page.

What/where doI need to let the system know of new files?

Thanks

Dale
Reply With Quote
  #2  
Old 02-27-2003, 02:58 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

Here you go,

create your new help file and save it in skin1/help, lets call it mynewfile.tpl and add the content as follows....

Code:
{* $Id: mynewfile.tpl,v 1.10 2002/10/22 12:25:54 alfiya Exp $ *} {capture name=dialog} ADD YOUR NEW CONTENT HERE {/capture} {include file="dialog.tpl" title="My New File Title Here" content=$smarty.capture.dialog extra="width=100%"}

dont forget to change the title etc

Next, open up skin1/help/index.tpl and replace

Code:
[code]{elseif $section eq "publicity"} {include file="help/publicity.tpl"}[/code]

with this ...

Code:
{elseif $section eq "publicity"} {include file="help/publicity.tpl"} {elseif $section eq "mynewfile"} {include file="help/mynewfile.tpl"}

in other words, add a new elseif section to show your new file if requested.

Next, open up skin1/help.tpl and add the link to your new page along with the other links


And that should be about it. Just change every instance of mynewfile for whatever you want it to be and change the titles and link text and you should be ok.

Ive not tested this just written off the top of my head so let me know how you get on...
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 02-27-2003, 06:08 AM
 
machnhed1 machnhed1 is offline
 

eXpert
  
Join Date: Feb 2003
Location: Illinois
Posts: 274
 

Default

The following was taken from the FAQ page of the members section - http://www.x-cart.com/faq.html.

Hope this helps.

Quote:
Q: I want to add aditional text page to X-cart where I can place some additional info about my site, how it can be done?

A: 1. First you have to edit template customer/home.tpl

Create new menu item that will point to your page, you can put it for example after help menu section (the code between HTML comments):

Code:
{ include file="help.tpl" } <table border=0 cellPadding=5 cellSpacing=0 width=100%> <tr><td colspan=2 class="TableLeftElements"> About us </td></tr> </table> </td> <td width=20> </td> <td valign=top>

Then add selector which will diplay your About Us template in the center of the cart:

Code:
{if $smarty.get.mode eq "subscribed"} {include file="main/subscribe_confirmation.tpl"} {elseif $smarty.get.mode eq "about_us"} {include file="main/about_us.tpl"} {elseif $smarty.get.mode eq "unsubscribed"} {include file="main/unsubscribe_confirmation.tpl"}

2. Then create About Us template that will be displayed in the center, create file skin1/main/about_us.tpl and put the following lines there:

Code:
{ include file="location.tpl" last_location="About Us"} {capture name=dialog} Put your about us text here... {/capture} { include file="dialog.tpl" title="Information about our company" content=$smarty.capture.dialog extra="width=100%"}
Reply With Quote
  #4  
Old 02-27-2003, 07:17 PM
 
dtherio dtherio is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: Dallas, Texas
Posts: 84
 

Default

Foolish me, I was looking in the offline docs for this info

Thanks to both of you for the info. I am traveling and staying with a work at home relative that has 1 phone line for internet access so I am doing as much offline as possible, hence using the docs.

Dale

Quote:
Originally Posted by machnhed1
The following was taken from the FAQ page of the members section - http://www.x-cart.com/faq.html.

Hope this helps.
Reply With Quote
  #5  
Old 03-27-2003, 04:59 PM
 
ms425 ms425 is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 37
 

Default Question about this very thing

I am trying to add a page under help that would be for login. I put the

{if $login eq "" }
{ include file="auth.tpl" }
{else}
{ include file="authbox.tpl" }
{/if}

in the login.tpl file and it shows up.

I login and after directs me back to the main page, but when I try to click on the link and then press "log out" it comes up with an error.

Not a php or smarty error but the little error picture in the browser status window.

Any idea?
Reply With Quote
  #6  
Old 03-28-2003, 06:03 AM
 
machnhed1 machnhed1 is offline
 

eXpert
  
Join Date: Feb 2003
Location: Illinois
Posts: 274
 

Default

If you click on the error it should give you the line it is occurring on. Use that as your guide, or try posting it here. The problem could be so many things that it's like asking a mechanic to diagnose a problem over the phone when all you know is that you car is making a noise.
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat]
Reply With Quote
  #7  
Old 03-28-2003, 10:46 AM
 
ms425 ms425 is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 37
 

Default

This is what it shows. Any help would be appreciated.

Line: 1
Char: 1
Error: Object doesn't support this property or method.
Code: 0
URL: ........./customer/help.php?section=login
Reply With Quote
  #8  
Old 03-31-2003, 12:10 PM
 
ms425 ms425 is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 37
 

Default

any ideas yet?
Reply With Quote
  #9  
Old 03-31-2003, 12:18 PM
 
machnhed1 machnhed1 is offline
 

eXpert
  
Join Date: Feb 2003
Location: Illinois
Posts: 274
 

Default

can you send me a URL where I can look at it? it could be something with the form tags.
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat]
Reply With Quote
  #10  
Old 03-31-2003, 12:33 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

More than likely you lost a <FORM> or </FORM> tag somewhere.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 05:29 PM.

   

 
X-Cart forums © 2001-2020