Complete Seo Optimization for ecshop programs

Source: Internet
Author: User

1. Completely customize the titile of the page and discard the title format defined by ecshop: [product name] _ [category name] _ [online shop name]-powered by ecshop

1. Analysis: we all know the basics and importance of titile, kewords, and description in Seo. However, many similar or identical page titles will appear in the titile implementation method officially provided by ecshop, in addition, some pages cannot customize kewords and description. I have provided a fully custom method here. In fact, the method is very simple, as long as you know a little bit of code.

2. modifications include: Brand page, product page, product category page, article page, and Article category page.

3. Brand pages (Add title, keywords, and description): Brand. php, admin \ brand. php, admin \ Templates \ brand_info.htm

Product Page (Add title): Goods. php, admin \ goods. php, admin \ Templates \ goods_info.htm

Product Category page (Add title): category. php, admin \ category. php, admin \ Templates \ category_info.htm

Article Page (Add title): Article. php, admin \ article. php, admin \ Templates \ article_info.htm

Document category page (Add title): article_cat.php, admin \ articlecat. php, admin \ Templates \ articlecat_info.htm

4. Specific modification: Take the modification on the brand page as an example:

1) First, modify the database. If it is not installed, install \ data \ structure in the database structure file. in SQL, manually modify the installed data in the database after installation, and add the brand_title, brand_keywords, and brand_description fields to the brand table.

2) Modify admin \ brand. php. This file is the administrator background file.

· 88 rows:

$ SQL = "insert ". $ ECs-> table ('brand '). "(brand_name, site_url, brand_desc, brand_logo, is_show, sort_order )". "values ('$ _ post [brand_name]', '$ site_url', '$ _ post [brand_desc]', '$ img_name', '$ is_show ', '$ _ post [sort_order]') ";
$ Db-> query ($ SQL );

Changed:

$ SQL = "insert ". $ ECs-> table ('brand '). "(brand_name, site_url, brand_desc, brand_title, brand_keywords, brand_description, brand_logo, is_show, sort_order )". "values ('$ _ post [brand_name]', '$ site_url', '$ _ post [brand_desc]', '$ _ post [brand_title]', '$ _ post [brand_keywords]', '$ _ post [brand_description]', '$ img_name', '$ is_show', '$ _ post [sort_order]') ";
$ Db-> query ($ SQL );

· 113 rows

Admin_priv ('brand _ manage ');
$ SQL = "select brand_id, brand_name, site_url, brand_logo, brand_desc, brand_logo, is_show, sort_order ". "from ". $ ECs-> table ('brand '). "Where brand_id = '$ _ request [ID]'";
$ Brand = $ db-> getrow ($ SQL );

Changed:

Admin_priv ('brand _ manage ');
$ SQL = "select brand_id, brand_name, site_url, brand_logo, brand_desc, brand_title, brand_keywords, brand_description, brand_logo, is_show, sort_order ". "from ". $ ECs-> table ('brand '). "Where brand_id = '$ _ request [ID]'";
$ Brand = $ db-> getrow ($ SQL );

· 151 rows

$ Img_name = basename ($ image-> upload_image ($ _ FILES ['brand _ logo '], 'brandlogo '));
$ Param = "brand_name = '$ _ post [brand_name]', site_url = '$ site_url', brand_desc = '$ _ post [brand_desc]', is_show = '$ is_show ', sort_order = '$ _ post [sort_order]' ";

Changed:

$ Img_name = basename ($ image-> upload_image ($ _ FILES ['brand _ logo '], 'brandlogo '));
$ Param = "brand_name = '$ _ post [brand_name]', site_url = '$ site_url', brand_desc = '$ _ post [brand_desc]', brand_title = '$ _ post [brand_title]', brand_keywords = '$ _ post [brand_keywords]', brand_description = '$ _ post [brand_description]', is_show = '$ is_show ', sort_order = '$ _ post [sort_order]' ";

 

3) Modify admin \ Templates \ brand_info.htm.

· Insert data in row 31st:

<Tr>
<TD class = "label"> page title </TD>
<TD> <input type = "text" name = "brand_title" maxlength = "120" value = "{$ brand. brand_title | escape}"/> </TD>
</Tr>
<Tr>
<TD class = "label"> page keywords </TD>
<TD> <input type = "text" name = "brand_keywords" maxlength = "120" value = "{$ brand. brand_keywords | escape}"/> </TD>
</Tr>
<Tr>
<TD class = "label"> page description </TD>
<TD> <textarea name = "brand_description" Cols = "60" rows = "4" >{$ brand. brand_description }</textarea> </TD>
</Tr>

4) Finally, change brand. php. This file is the foreground control file.

· 93 and 94 rows

$ Smarty-> assign ('keyword', htmlspecialchars ($ brand_info ['brand _ desc']);
$ Smarty-> assign ('description', htmlspecialchars ($ brand_info ['brand _ desc']);

Changed:

$ Smarty-> assign ('page _ title', htmlspecialchars ($ brand_info ['brand _ title']);
$ Smarty-> assign ('keyword', htmlspecialchars ($ brand_info ['brand _ keyword']);
$ Smarty-> assign ('description', htmlspecialchars ($ brand_info ['brand _ description']);

In this way, the title, keywords, and description on the brand page are all customized. You only need to add the title to the product page, product category page, article page, and Article category page, the modification method is exactly the same as that on the brand page. It is up to you to decide how to change it.

 

Ii. Modify the remaining page title format

1. Analysis: Each ecshop page contains the store title, which is not conducive to Se and is not personalized enough. Previously, the important page has been modified to be conducive to se, the rest can be changed to your favorite format, for example: homepage format: store title _ store name; product name _ category name _ store name

2. Modify the file des \ lib_main.php.

3. Specific modifications:

· 142 rows

$ Page_title = $ globals ['_ CFG'] ['shop _ title']. '-'. 'powered by ecshop ';

Changed:

$ Page_title = $ globals ['_ CFG'] ['shop _ name'];

· Insert data in row 241:

If ($ filename = 'index ')
$ Page_title = $ globals ['_ CFG'] ['shop _ title']. '_'. $ page_title;

 

Iii. 404 optimization. As we all know, improper handling of 404 errors has a very huge impact on Search Engine indexing, and ecshop is doing very poorly in this regard, many websites are not indexed by search engines.

1. Analysis: ecshop program file category. PHP and goods. the following code exists in multiple pages such as PHP: ecs_header ("Location :. /\ n "); exit; the Code above indicates that if you cannot find the category or product under the current ID, you will be redirected to the homepage of the website. In this way, the returned HTTP code will be 302, indicating that the page information is temporarily transferred. This type of Jump code can easily cause search engine blocking, so we need to make a 404 optimization.

2. Modify the files involved: article. php, article_cat.php, brand. php, category. php, comment. php, goods. php, topic. php

3. Modification Method: Convert the ecs_header ("Location :. /\ n "); change all to ecs_header (" HTTP/1.0 404 Not Found "); $ smarty-> display('404_error.html ');

Add the 404_error.html file to the template file at the same time

Complete Seo Optimization for ecshop programs

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.