Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
The initial use of Ecshop to find not the general complexity, design a good ecshop template, absolutely painstaking, like me and other rookie is certainly not to do, I am a full ten of the poor, buy a business template that is also impossible, so only to find some free templates, make a small adjustment will be used first, But the default to change the place is not just a template of the problem, there are a little bit below, slightly recorded for a rainy.
1, ecshop title optimization
How to modify the Ecshop title, now want to change the title of the site, to achieve the effect of the following site home page title is displayed for the Ecshop Management Center [store title]. and the channel page, shows [channel name + store Name], of course, the product page is displayed [Product name + store Name]
The first step is to remove the powered by Ecshop on the title. In includes/lib_main.php find the lib_main.php file, remove the following code.
. ‘ - ‘ . ' Powered by Ecshop '
In the second step, open the template folder's GOODS.DWT file, locate {$page _title}, and modify it to {$goods. goods_style_name}_{$shop _name}
Step three, find includes/lib_main.php line 143th. Will
$page _title= $GLOBALS [' _cfg '] [' shop_title '];
to:
$page _title= $GLOBALS [' _cfg '] [' shop_name '];
then find 241 lines or so, and find the following code
if (!empty ($STR))
{
$page _title = $str. '_' . $page _title;
$ur _here. = ' <code>&gt; ' . $STR;
}
we need to join
in front of this code.
if ($filename = = ' index ') $page _title= $GLOBALS [' _cfg '] [' shop_title '];
this code.
Well, this ecshop title we have modified, so more in line with SEO.
2, remove the ecshop head between the generator "content=" Ecshop v2.7.1 "
Ecshop put generator in front of the title look very uncomfortable, decided to remove, keep the bottom of the footer copyright on it
<meta name= "generator" content= "Ecshop v2.7.1"/>
Here is how to delete this line of code, so that the system no longer automatically generated.
Open the includes/cls_template.php file,
About 1087 lines, find
$source = preg_replace ('/<head>/i ', "<head>\r\n<meta name=\" generator\ "content=\". APPNAME. ' ' . VERSION. "/>", $source);
Delete it or comment it out.
3, Ecshop classification tree in all the pages show all the way
My shop merchandise classification is relatively few, want to all the page to the category tree all show up, the following is to modify the method
Open includes/lib_goods.php, find the Get_categories_tree () function section, and find this paragraph:
function Get_categories_tree ($cat _id = 0)
{
if ($cat _id > 0)
{
$sql = ' SELECT parent_id from '. $GLOBALS [' ECS ']->table (' category '). "WHERE cat_id = ' $cat _id '";
$parent _id = $GLOBALS [' db ']->getone ($sql);
}
Else
{
$parent _id = 0;
}
modified into:
function Get_categories_tree ($cat _id = 0)
{
if ($cat _id > 0)
{
$sql = ' SELECT parent_id from '. $GLOBALS [' ECS ']->table (' category '). "WHERE cat_id = ' $cat _id '";
}
Author: Xiaoyu QQ space Station http://www.93193.cn
Note: Please make a copy of the original file before modifying it so that it can be recovered when needed.