X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   how to add a new 'help' file/template (https://forum.x-cart.com/showthread.php?t=1656)

dtherio 02-26-2003 08:18 PM

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

shan 02-27-2003 02:58 AM

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

machnhed1 02-27-2003 06:08 AM

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

Hope this helps. :o

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%"}



dtherio 02-27-2003 07:17 PM

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. :o


ms425 03-27-2003 04:59 PM

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?

machnhed1 03-28-2003 06:03 AM

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. :wink:

ms425 03-28-2003 10:46 AM

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

ms425 03-31-2003 12:10 PM

any ideas yet?

machnhed1 03-31-2003 12:18 PM

can you send me a URL where I can look at it? it could be something with the form tags.

B00MER 03-31-2003 12:33 PM

More than likely you lost a <FORM> or </FORM> tag somewhere. ;)


All times are GMT -8. The time now is 07:48 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.