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)
-   -   Please help me add static page (https://forum.x-cart.com/showthread.php?t=5796)

thinksuccess 12-31-2003 11:07 AM

Please help me add static page
 
Hi,

I want to add a static page to the Category section not the help section. Can someone please give me directions on what I need to do to make this happen.

I want it to still work and be embedded like a help section page is but want to place it in a different area of the xcart template.

I don't have the static page feature in my version.

Thanks

shan 01-03-2004 04:52 PM

http://forum.x-cart.com/viewtopic.php?t=2158

thinksuccess 01-03-2004 08:29 PM

Hi Shan,

This is the same post everyone sends me but I dont' want to have it under the help section. I want it to be under the category section. Can this not be done?

adpboss 01-03-2004 08:40 PM

This is a double post.

http://forum.x-cart.com/viewtopic.php?p=35774

shan 01-04-2004 04:08 AM

Then do the same thing but add the link to the categories.tpl instead of the help.tpl or anywhere else for that matter :wink:

John7 01-04-2004 08:10 AM

This is what you really want.
 
This is what you really want.

http://forum.x-cart.com/viewtopic.php?t=5412&start=0

John7

John7 01-04-2004 08:15 AM

Re: This is what you really want.
 
Create a file called extrainfo.tpl in your skin1/customer/main/ directory.

Here is some sample code for your extrainfo.tpl file:
Code:

{ include file="location.tpl" last_location="Extra Info"}
{capture name=dialog}
{/capture}
{ include file="dialog.tpl" title="Extra Info" content=$smarty.capture.dialog extra="width=100%"}


Then go into skin1/customer/ and open the file home_main.tpl then insert these two lines of code
Code:

{elseif $smarty.get.mode eq "extra"}
{include file="customer/main/extrainfo.tpl"}



Then you can create a hyperlink as such
Code:

http://www.yoursite.com/yourlink/customer/home.php?mode=extra




John7

adpboss 01-04-2004 08:15 AM

Nice mod John 7. You should get a moderator to move that to Custom Modifications. Handy thread.

CenturyPerf 01-18-2004 04:37 PM

Is there an example somewhere of what this looks like when implemented?

I would like to add "manufacturer specific" pages to my website that are embedded, but NOT with links showing in Help.

In my post at: http://forum.x-cart.com/viewtopic.php?t=8272&highlight= you will see that I would like to be able to create say a Manufacturer drop-down above the Category list. When you select a manufacturer name it would redirect the customer to an embedded page I can build for that manufacturer.

I would need to be able to create an unlimited number of pages that I can link to. Say for example, once I have the main manufacturer page I may want to have an assortment of links built within that page to added information and content. (tech articles, instructions, warranty info, etc).

I see that the embedded pages contain no specific X-Cart code, meaning that it must be added by using include tags. From here knowing what to add or change, I'm stuck.

adpboss 01-18-2004 04:45 PM

Create pages exactly as the mod tells you to, just rename them from extrainfo to whatever you want to call them ie. Manufacturer1 page is manufacturer1.tpl.

You need to do what this thread describes. Do it for a test page to see what it looks like. It will take you less than 5 minutes.

You can create an infinite number of pages with this mod.

It's a lot simpler than it looks.

p4wel 01-23-2004 02:52 AM

Re: This is what you really want.
 
Quote:

Originally Posted by John7
Create a file called extrainfo.tpl in your skin1/customer/main/ directory.


I am trying to do this, but there is no existing directory, as above. Was this post related to the old version of X-cart?

I'm running Version 3.4.10

adpboss 01-23-2004 02:56 AM

Which directory are you referring to?

p4wel 01-23-2004 03:22 AM

ok, i figured out the category

but i don't know where to paste the hyperlink (as mentioned below)?
which template and where? I'm lost!

Quote:

Then you can create a hyperlink as such
Code:
http://www.yoursite.com/yourlink/customer/home.php?mode=extra

adpboss 01-23-2004 03:23 AM

Whichever template you want the hyperlink to show up in.

p4wel 01-23-2004 03:36 AM

ok, i want the link:
How to fit teeth

to appear in categories section, below all product categories (template below). where should I put it? any ideas?

{* $Id: categories.tpl,v 1.18 2003/02/25 08:58:46 olga Exp $ *}
{capture name=menu}
{if $config.General.root_categories eq "Y"}

{section name=cat_num loop=$categories}
<font class=CategoriesList>{ $categories[cat_num].category_name|escape }

{/section}
{else} {section name=cat_num loop=$subcategories}
<font class=CategoriesList>{ $subcategories[cat_num].category_name|escape }</font>

{/section}
{/if}


{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

shan 01-23-2004 05:18 AM

there you go

Code:

{* $Id: categories.tpl,v 1.18 2003/02/25 08:58:46 olga Exp $ *}
{capture name=menu}
{if $config.General.root_categories eq "Y"}

{section name=cat_num loop=$categories}
<font class=CategoriesList>{ $categories[cat_num].category_name|escape }

{/section}
{else} {section name=cat_num loop=$subcategories}
<font class=CategoriesList>{ $subcategories[cat_num].category_name|escape }</font>

{/section}
{/if}


{$pages_menu[pg].title}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }


p4wel 01-23-2004 05:44 AM

shan, that worked a treat! thank you very much. i have tried to paste it just about everywhere, but not there :)

The 'How to fit teeth' page is an embeded static page, which also appears under Help menu, as you will see: http://www.billybobteeth-spain.com/store/customer/home.php

is there any way of removing this page from Help menu?

CenturyPerf 01-25-2004 06:35 PM

I have followed John's direction on this and even tried a few variables and still cannot get it to work.

I created a file "mallory.tpl" and tried it in both a sub directory of "skin1/customer/main/" and tried "skin1/customer/main/mallory". Form that I tried both of these versions of code in skin1/customer/home_main.tpl:

Code:

{elseif $smarty.get.mode eq "mallory"}
{include file="customer/main/mallory.tpl"}

and
Code:

{elseif $smarty.get.mode eq "mallory"}
{include file="customer/main/mallory.mallory.tpl"}


I also built the page "mallory.tpl" with this as the code:
Code:

{ include file="location.tpl" last_location="mallory"}
{capture name=dialog}
{/capture}

test data for Mallory main page

{ include file="dialog.tpl" title="mallory" content=$smarty.capture.dialog extra="width=100%"}


When I try the link below I get NO change and just the default store home page: http://216.82.68.68/shop/customer/home.php?mode=mallory

I would prefer to use sub directories (one for each manufacturer) with their specific pages within that directory. What am I missing?

shan 01-26-2004 03:29 AM

Quote:

Originally Posted by p4wel
shan, that worked a treat! thank you very much. i have tried to paste it just about everywhere, but not there :)

The 'How to fit teeth' page is an embeded static page, which also appears under Help menu, as you will see: http://www.billybobteeth-spain.com/store/customer/home.php

is there any way of removing this page from Help menu?


in help.tpl remove this

Code:

{$lng.lbl_terms_n_conditions}

{include file="pages_menu.tpl"}


p4wel 01-26-2004 03:41 AM

thank you shan, i'll try this.

the website will be produced with at least 2 versions, english and spanish.
does this method of including links in categories menu work for multiple languages?

shan 01-26-2004 01:03 PM

Quote:

Originally Posted by p4wel
thank you shan, i'll try this.

the website will be produced with at least 2 versions, english and spanish.
does this method of including links in categories menu work for multiple languages?


I edited the original post so it should

CenturyPerf 01-26-2004 02:29 PM

Any idea on what is causing my problem? (see above)


All times are GMT -8. The time now is 10:23 PM.

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