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

Add headings to category and product pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 06-20-2006, 01:23 PM
 
Jiser Jiser is offline
 

Senior Member
  
Join Date: Oct 2004
Posts: 118
 

Default

Right....

Adding headings to category and product pages is very important if you want to become a topranker.
(Remember, always make a backup of your files and database)

1:
Run the fallowing query:
Code:
alter table xcart_categories add header varchar(255) not null; INSERT INTO xcart_languages VALUES ('US', 'lbl_header', 'lbl_header', 'lbl_header', 'Labels');

2:
in admin/category_modify.php

replace

Code:
db_query("UPDATE $sql_tbl[categories] SET category='$category_name', description='$description', meta_descr='$meta_descr', meta_keywords='$meta_keywords', avail='$avail', order_by='$order_by', membership='$cat_membership' WHERE categoryid='$cat'");

with

Code:
db_query("UPDATE $sql_tbl[categories] SET category='$category_name', description='$description', header='$header', meta_descr='$meta_descr', meta_keywords='$meta_keywords', avail='$avail', order_by='$order_by', membership='$cat_membership' WHERE categoryid='$cat'");


3:
skin1/admin/main/category_modify.tpl

Find

Code:
<TR> <TD height="10" class="FormButton" nowrap valign="top">{$lng.lbl_description}:</TD> <TD width="10" height="10"><FONT class="CustomerMessage"></FONT></TD> <TD height="10"> <TEXTAREA cols="65" rows="15" name="description"> {if $category_error ne ""}{$smarty.post.description|escape:"html"}{elseif $mode ne "add"}{$current_category.description|escape:"html"}{/if} </TEXTAREA> </TD> </TR>

insert above:

Code:
<TR> <TD height="10" class="FormButton" nowrap valign="top">{$lng.lbl_header}:</TD> <TD width="10" height="10"><FONT class="CustomerMessage"></FONT></TD> <TD height="10"> <TEXTAREA cols="65" rows="1" name="header"> {if $category_error ne ""}{$smarty.post.header|escape:"html"}{elseif $mode ne "add"}{$current_category.header|escape:"html"}{/if} </TEXTAREA> </TD> </TR>

4:
Open skin1/customer/main/subcategories.tpl

replace:
Code:
{$current_category.description|regex_replace:"/[\n]/":" "}

with:
Code:
<h1>{$current_category.category} - {$current_category.header|regex_replace:"/[\n]/":" "}</h1> <h2>{$current_category.description|regex_replace:"/[\n]/":" "}</h2>

5:
Open skin1/customer/main/product.tpl

replace:
Code:
{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}

with:
Code:
<h1>{$product.product}</h1> <h2>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}</h2>

Good Luck!
__________________
x-cart 4.05
Linux CENTOS
APACHE
Heavily customized
Reply With Quote
  #2  
Old 06-23-2006, 08:43 AM
 
balinor balinor is offline
 

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

Default

Moving to custom mods....you are on an SEO custom mods roll!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 06-23-2006, 08:59 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default

Thanks for posting this, I was just going to write something like this for my site.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #4  
Old 06-23-2006, 11:29 AM
 
Jiser Jiser is offline
 

Senior Member
  
Join Date: Oct 2004
Posts: 118
 

Default

I'm just posting possible usefull mods of things I've finished for our website
__________________
x-cart 4.05
Linux CENTOS
APACHE
Heavily customized
Reply With Quote
  #5  
Old 06-25-2006, 09:50 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default

Would this work for V3.4.6 ?

Thanks in Advance !
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #6  
Old 06-25-2006, 10:00 AM
 
Jiser Jiser is offline
 

Senior Member
  
Join Date: Oct 2004
Posts: 118
 

Default

I dunno.... Haven't got any experience with..... I've created this one for version 4.05. Let's try it out I guess..
__________________
x-cart 4.05
Linux CENTOS
APACHE
Heavily customized
Reply With Quote
  #7  
Old 06-25-2006, 10:02 AM
 
Jiser Jiser is offline
 

Senior Member
  
Join Date: Oct 2004
Posts: 118
 

Default

Nice website you have btw
__________________
x-cart 4.05
Linux CENTOS
APACHE
Heavily customized
Reply With Quote
  #8  
Old 06-25-2006, 10:13 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default

Thanks for the nice comment.. Will look at it sometime next week .. of course do a backup first....

Michael
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #9  
Old 06-25-2006, 06:07 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default

Just my 2 cents here - I opted not to impliment the product.tpl part of the mod - I think that visually the bold text looked bad. I am going to tweak the catagory fonts as well. I do like the inclusion of the missing text though... very nice and surprising that no one has brought this up before..

Well done!
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #10  
Old 06-30-2006, 08:15 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default

Quote:
Originally Posted by Vacman
Just my 2 cents here - I opted not to impliment the product.tpl part of the mod - I think that visually the bold text looked bad. I am going to tweak the catagory fonts as well. I do like the inclusion of the missing text though... very nice and surprising that no one has brought this up before..

Well done!

The bolded text is because it's in a <Hx> tag. Use css to change the way it looks. You should always use <Hx> tags for the most important keywords in a page.

I use <h1> for the Category/product title, <h2> for the headline and <h3> for the description.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 02:38 AM.

   

 
X-Cart forums © 2001-2020