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)
-   -   Add headings to category and product pages (https://forum.x-cart.com/showthread.php?t=22715)

Jiser 06-20-2006 01:23 PM

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!

balinor 06-23-2006 08:43 AM

Moving to custom mods....you are on an SEO custom mods roll! :)

Alltribes 06-23-2006 08:59 AM

Thanks for posting this, I was just going to write something like this for my site.

Jiser 06-23-2006 11:29 AM

I'm just posting possible usefull mods of things I've finished for our website :)

Lingerieblowout 06-25-2006 09:50 AM

Would this work for V3.4.6 ?

Thanks in Advance !

Jiser 06-25-2006 10:00 AM

I dunno.... Haven't got any experience with..... I've created this one for version 4.05. Let's try it out I guess..

Jiser 06-25-2006 10:02 AM

Nice website you have btw :)

Lingerieblowout 06-25-2006 10:13 AM

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

Michael

Vacman 06-25-2006 06:07 PM

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!

Alltribes 06-30-2006 08:15 AM

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.


All times are GMT -8. The time now is 07:44 PM.

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