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

Problem with making additional links on left hand menu bar.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-27-2002, 03:35 PM
 
fusionartstamps fusionartstamps is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 124
 

Default Problem with making additional links on left hand menu bar.

The x-cart FAQ says:

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):

{ 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:



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

I'm getting a

Parse error: parse error in /home/fusionar/public_html/dev/store/templates_c/151/1512206380/0.php on line 184


Here is my code:
{* $Id: home.tpl,v 1.39 2002/09/11 11:25:00 zorg Exp $ *}
{ config_load file="$skin_config" }
<html>
<head>
<title>{$lng.txt_site_title}
{if $main eq "catalog"}
{$lng.txt_subtitle_home}
{elseif $main eq "help"}
{$lng.txt_subtitle_help}
{elseif $main eq "cart"}
{$lng.txt_subtitle_cart}
{elseif $main eq "checkout"}
{$lng.txt_subtitle_checkout}
{elseif $main eq "order_message"}
{$lng.txt_subtitle_thankyou}
{/if}
</title>
{ include file="meta.tpl" }
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
</head>
<body class="background">
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }

<table border=0 width=100% cellpadding=0 cellspacing=0 align="center">
<tr>
<td class=TableLeft width=6 rowspan=2></td>
<td class=TableLeft width=150 valign=top>
{ include file="customer/categories.tpl" }
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"}
{ include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Gift_Certificates ne ""}


{ include file="modules/Gift_Certificates/gc_menu.tpl" }
{/if}


{ include file="help.tpl" }
</td>
<td width=20></td>
<td valign=top>


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



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



{include file="customer/home_main.tpl"}


</td>
<td width=20></td>
<td width=148 valign=top>
{ include file="customer/menu_cart.tpl" }
{if $login eq "" }
{ include file="auth.tpl" }
{else}
{ include file="authbox.tpl" }
{/if}
{ include file="news.tpl" }


{ include file="poweredby.tpl" }
</td>
</tr>
<tr>
<td class=TableLeft></td>
<td></td>
<td>{ include file="copyright.tpl" }</td>
<td></td>
<td></td>
</tr>
</table>
{ include file="rectangle_bottom.tpl" }
</body>
</html>
----------------------------------------------------------------------

Can someone tell me what I've done wrong?

Thanks,

Amy
Reply With Quote
  #2  
Old 10-27-2002, 09:49 PM
 
StylinFX StylinFX is offline
 

Advanced Member
  
Join Date: Oct 2002
Location: US
Posts: 36
 

Default

I'm not for sure that I understand what your trying to do....Are you wanting additional links under your categories menu? Or are you wanting the under another menu?

Nevertheless it can be done pretty easily....You just have to insert the code into your menu file your wanting to edit. I haven't tried this for the categories menu.

But it did work fine for my help section. and under the specials.

Hope this helps.
Reply With Quote
  #3  
Old 10-27-2002, 10:08 PM
 
syddos syddos is offline
 

eXpert
  
Join Date: Sep 2002
Location: London, England, UK
Posts: 259
 

Default

Hi Amy,

xcart v3.2.1?

1. Create your "About Us" Template file in "xcart/skin1/help/" directory. To include the dialog.tpl, your code in your About_us.tpl, should look like this:-
Quote:

{capture name=dialog}
{$lng.txt_about}
Put your HTML, TEXT etc here, I used the Language database with a variable to hold my About Us text.
{/capture}
{include file="dialog.tpl" title=$lng.lbl_about_our_site content=$smarty.capture.dialog extra="width=100%"}

2. Edit xcart/skin1/help/index.tpl to include your "About Us" template. I have highlighted 2 that I created for my site (About Us, How2shop)

Quote:
{* $Id: index.tpl,v 1.5 2002/05/20 06:55:20 lucky Exp $ *}
{include file="location.tpl" last_location=$lng.lbl_help_zone}
{if $section eq "Password_Recovery"}
{include file="help/Password_Recovery.tpl"}

{elseif $section eq "Password_Recovery_message"}
{include file="help/Password_Recovery_message.tpl"}

{elseif $section eq "Password_Recovery_error"}
{include file="help/Password_Recovery.tpl"}

{elseif $section eq "FAQ"}
{include file="help/FAQ_HTML.tpl"}

{elseif $section eq "contactus"}
{include file="help/contactus.tpl"}

{elseif $section eq "about"}
{include file="help/about.tpl"}


{elseif $section eq "business"}
{include file="help/business.tpl"}

{elseif $section eq "conditions"}
{include file="help/conditions.tpl"}

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

{elseif $section eq "how2shop"}
{include file="help/how2shop.tpl"}


{else}
{include file="help/general.tpl"}
{/if}


3. Change your code in to:-
Quote:
{ 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>

In my code I used section=about I just forgot to put the "us" on the end.

Regards,
__________________
Syddos

Nothing is impossible, We just don't know how to do it ........Yet!

Xcart 4.1.X PRO (Testing Platform: winXP Pro)
Perl 5.8.7 (win32)
WINAMP 1.6.3 (win32 server package. Includes the following)
- phpMyAdmin v2.8.03
- MySql 5.0.21
- Apache 2.0.55 (win32)
- php 5.1.4
- SQLitemanager 1.2.0
Reply With Quote
  #4  
Old 10-28-2002, 07:44 AM
 
chris chris is offline
 

Senior Member
  
Join Date: Sep 2002
Location: UK
Posts: 145
 

Default Syddos most helpful - you should become a moderator

Syddos I have been following all the posts and find that you have been trying to share the load in helping us find our way - this forum is excellent in the way we all come to each other's aid - probably because working with xcart in the absence of a decent manual certainly taxes the imagination and results in many of the "where the hell is it??" type questions.

Boomer and Shan's assistance in answering a myriad of questions has been phenemonal in that respect but as the number of users grow so does the task of "moderating" which thankfully has been interpreted by them both as "solve as many problems as possible."

I wonder if others would mind if I asked the current moderators by this post to include you, minorgod, jeannie and the like in a "panel of experts" or as a moderator(s) as this might help share the ever increasing load.

Note because this post is of a general nature I have copied it to the Rants & Raves section.

Chris
__________________
Chris
some carts at v4.4.5 security patched on a hardened managed unix server
Reply With Quote
  #5  
Old 10-28-2002, 08:37 AM
 
syddos syddos is offline
 

eXpert
  
Join Date: Sep 2002
Location: London, England, UK
Posts: 259
 

Default

Quote:
Originally Posted by Chris
"where the hell is it??" type questions.

Hi Chris,

The above quote is one I use about 3 - 5 times, for every hour I spend customising my xcart, and I admit, sometimes I just don't find it, so I move on to something else until I remember where it is.

Xcart forum membership is growing rapidly, and yes the number of questions wil grow with it, luckily for newbies, nearly the answers are already in the forum, it's just a case of finding it.

I also use the forum to test my own knowledge of xcart so far, 2 months ago I had never heard of Smarty, I understand what it does, now I'm trying to learn how it does it, along with php and MySQL.

My total knowledge is still limited, but I'm halfway towards completing my reading of every xcart file, line by line, taking notes as I go. The files I don't understand will, make sense as my knowledge of the technologies used to produce xcart increases, and assisting in the forum, keeps what I have learnt active in my mind.

Regards,
__________________
Syddos

Nothing is impossible, We just don't know how to do it ........Yet!

Xcart 4.1.X PRO (Testing Platform: winXP Pro)
Perl 5.8.7 (win32)
WINAMP 1.6.3 (win32 server package. Includes the following)
- phpMyAdmin v2.8.03
- MySql 5.0.21
- Apache 2.0.55 (win32)
- php 5.1.4
- SQLitemanager 1.2.0
Reply With Quote
  #6  
Old 10-28-2002, 02:05 PM
 
fusionartstamps fusionartstamps is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 124
 

Default

Syddos,

In what .tpl am I to add

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


Thanks!

Amy
Reply With Quote
  #7  
Old 11-04-2002, 09:57 AM
 
fusionartstamps fusionartstamps is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 124
 

Default

Syddos,

I still can't seem to get it to work. The "About" link is showing up in the left hand side of the navigation, but the link just goes back to the main page instead of to the about page. Go here to see what I mean:

www.fusionartstamps.com/dev/store

Here is my code again:

skin1/help/about.tpl


Quote:
{* $Id: about.tpl,v 1.5 2002/05/20 06:55:20 lucky Exp $ *}
{capture name=dialog}
{$lng.txt_about}
Put your HTML, TEXT etc here, I used the Language database with a variable to hold my About Us text.
{/capture}
{include file="dialog.tpl" title=$lng.lbl_about_our_site content=$smarty.capture.dialog extra="width=100%"}


skin1/help/index.tpl


Quote:
{* $Id: index.tpl,v 1.5 2002/05/20 06:55:20 lucky Exp $ *}
{include file="location.tpl" last_location=$lng.lbl_help_zone}
{if $section eq "Password_Recovery"}
{include file="help/Password_Recovery.tpl"}

{elseif $section eq "Password_Recovery_message"}
{include file="help/Password_Recovery_message.tpl"}

{elseif $section eq "Password_Recovery_error"}
{include file="help/Password_Recovery.tpl"}

{elseif $section eq "FAQ"}
{include file="help/FAQ_HTML.tpl"}

{elseif $section eq "contactus"}
{include file="help/contactus.tpl"}

{elseif $section eq "about"}
{include file="help/about.tpl"}

{elseif $section eq "business"}
{include file="help/business.tpl"}

{elseif $section eq "conditions"}
{include file="help/conditions.tpl"}

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

{else}
{include file="help/general.tpl"}
{/if}

skin1/customer/home.tpl
Quote:
{* $Id: home.tpl,v 1.39 2002/09/11 11:25:00 zorg Exp $ *}
{ config_load file="$skin_config" }
<html>
<head>
<title>{$lng.txt_site_title}
{if $main eq "catalog"}
{$lng.txt_subtitle_home}
{elseif $main eq "help"}
{$lng.txt_subtitle_help}
{elseif $main eq "cart"}
{$lng.txt_subtitle_cart}
{elseif $main eq "checkout"}
{$lng.txt_subtitle_checkout}
{elseif $main eq "order_message"}
{$lng.txt_subtitle_thankyou}
{/if}
</title>
{ include file="meta.tpl" }
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
</head>
<body class="background">
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }

<table border=0 width=100% cellpadding=0 cellspacing=0 align="center">
<tr>
<td class=TableLeft width=6 rowspan=2></td>
<td class=TableLeft width=150 valign=top>
{ include file="customer/categories.tpl" }
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"}
{ include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Gift_Certificates ne ""}


{ include file="modules/Gift_Certificates/gc_menu.tpl" }
{/if}



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

{include file="customer/home_main.tpl"}


</td>
<td width=20></td>
<td width=148 valign=top>
{ include file="customer/menu_cart.tpl" }
{if $login eq "" }
{ include file="auth.tpl" }
{else}
{ include file="authbox.tpl" }
{/if}
{ include file="news.tpl" }


{ include file="poweredby.tpl" }
</td>
</tr>
<tr>
<td class=TableLeft></td>
<td></td>
<td>{ include file="copyright.tpl" }</td>
<td></td>
<td></td>
</tr>
</table>
{ include file="rectangle_bottom.tpl" }
</body>
</html>
Reply With Quote
  #8  
Old 11-08-2002, 09:59 AM
 
fusionartstamps fusionartstamps is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 124
 

Default

The problem was that in file customer-home.tpl

it should be
About us

instead of
About us

So please change the code above by Syddos to this for linking.

-Amy
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 06:24 AM.

   

 
X-Cart forums © 2001-2020