X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Inserting an html page into the cart as a category? (https://forum.x-cart.com/showthread.php?t=21863)

smocksam 05-17-2006 12:05 PM

Inserting an html page into the cart as a category?
 
I'd really like to add a static page to my categories menu.

Right now it has all my product categories.

What I'd like to do is add a "news" category, then when a person clicks on the news button it will open up an html file created by my blogger account.

This is probably as clear as mud right?

If you understand what I"m after and can help, I'll much appreciate it!

thanks in advance!

balinor 05-17-2006 12:17 PM

The easiest way to do that is to create a new static page and insert your html there. Then, hard-code the link in to customer/categories.tpl. Just after the first closing {/section} tag, add your link in this format:

<span class="CategoriesList">Your text for link</SPAN>

Replace 'x' with the number of the static page.

smocksam 05-17-2006 12:40 PM

Ok, here I did it just to test and the link isn't showing up in my categories?



Code:

{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"}
{else}
{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
<FONT class="CategoriesList">{$categories[cat_num].category}</FONT>

{/section}

<span class="CategoriesList">Your text for link</SPAN>

{else} {section name=cat_num loop=$subcategories}
<FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT>

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


balinor 05-17-2006 01:57 PM

Are you using Fancy Categories?

smocksam 05-17-2006 02:00 PM

Yeah, using the icons one to be exact. I'm guessing that's what's causing the issue.

balinor 05-17-2006 02:03 PM

Ok, then move that code I showed you after the last {/if} statement, but before the {/capture} tag.

smocksam 05-18-2006 04:24 AM

Ok, that puts it in there, but leaves me with a few problems.

I'd like to have it at the top of the categories list, but it's currently showing up at the bottom. That's nothing major.


BUT.... here's what I'm doing and can't figure out why.

I can preview the pages in my admin side with no troubles. When I add your link and click on it, it gives me an error

Quote:


Page not found!
The requested page does not exist or you are not allowed to access it!


The link to preview is: (note that is has the httpS)

https://paintballtrader.com/v4/page_002.html

But the link that x-cart uses to normally view it is:

http://www.paintballtrader.com/v4/pages.php?pageid=3


I'll explain a little better what I"m trying to do.

I've got a blogger account. It saves the blog to an Html page on my server.

So I'm trying to setup a static page, then allow the blog to overwrite it on my server, so when I click the link in my categories bar it will bring up the blog, but have it formatted so that it is in a normal x-cart page.

I've not actually gotten that far yet as I can't get the link to display a normal page yet.

Thanks for the help!

balinor 05-18-2006 06:28 AM

Are you creating embedded or root pages? Make sure you are using embedded. Also, please put your X-Cart version in your signature....each version is different. Thanks!

smocksam 05-18-2006 07:27 AM

Ok, switching to the root page made all the difference!


Now any idea how to get my link to the top before the fancy categories?


My x-cart version is 4.0.18

You've been a great help!!

thanks

balinor 05-18-2006 07:37 AM

Move the code up above the if statement for fancy categories, right after {capture name=menu}

Also, please put the version in your signature so we don't have to ask you each time :)

Edit profile, enter version, enter help desk password, click the 'Always attach my signature:' box, save. Thanks!


All times are GMT -8. The time now is 04:12 PM.

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