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

Inserting an html page into the cart as a category?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-17-2006, 12:05 PM
 
smocksam smocksam is offline
 

Member
  
Join Date: Aug 2003
Posts: 24
 

Default 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!
Reply With Quote
  #2  
Old 05-17-2006, 12:17 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-17-2006, 12:40 PM
 
smocksam smocksam is offline
 

Member
  
Join Date: Aug 2003
Posts: 24
 

Default

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 }
Reply With Quote
  #4  
Old 05-17-2006, 01:57 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Are you using Fancy Categories?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 05-17-2006, 02:00 PM
 
smocksam smocksam is offline
 

Member
  
Join Date: Aug 2003
Posts: 24
 

Default

Yeah, using the icons one to be exact. I'm guessing that's what's causing the issue.
Reply With Quote
  #6  
Old 05-17-2006, 02:03 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Ok, then move that code I showed you after the last {/if} statement, but before the {/capture} tag.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 05-18-2006, 04:24 AM
 
smocksam smocksam is offline
 

Member
  
Join Date: Aug 2003
Posts: 24
 

Default

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!
Reply With Quote
  #8  
Old 05-18-2006, 06:28 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 05-18-2006, 07:27 AM
 
smocksam smocksam is offline
 

Member
  
Join Date: Aug 2003
Posts: 24
 

Default

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
Reply With Quote
  #10  
Old 05-18-2006, 07:37 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
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 01:09 PM.

   

 
X-Cart forums © 2001-2020