forked from pavlickm/seopro
-
Notifications
You must be signed in to change notification settings - Fork 28
/
HOWTO-install-manual.en.txt
120 lines (92 loc) · 4.86 KB
/
HOWTO-install-manual.en.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# MANUAL INSTALLATION
=====================
* copy all files from `upload` folder to the root of your Opencart store.
No files will be overwritten, if you install the extension first time;
* compare and make changes to all other files. See `dev-modified` folder.
GUI tools that can help you compare files and directories:
Total Commander (Windows), WinMerge (Windows), Meld (Linux).
Of course, you can just copy and overwrite files if you use version 2.0.1.1
of Opencart, but you can lose your earlier modifications. In general this is
not recommended.
* open phpMyAdmin and execute SQL query
ALTER TABLE `product_to_category` ADD `main_category` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `product_to_category` ADD INDEX `main_category` (`main_category`);
**if you use prefix**, add it to the table name (for example: `oc_product_to_category`);
If you got warning `Error Code: 1060. Duplicate column name 'main_category'`
then previous version of `seopro` extension had been installed. It is OK,
please continue installation.
* Open file `index.php`, find
$controller->addPreAction(new Action('common/seo_url'));
and replace this line with following
if (!$seo_type = $config->get('config_seo_url_type')) {
$seo_type = 'seo_url';
}
$controller->addPreAction(new Action('common/' . $seo_type));
ATTN (Windows users): Please do not use stupid Windows Notepad, use
[Notepad++](http://notepad-plus-plus.org/) for editing files. Files must be
saved in UTF-8 encoding without BOM.
* fix wrong "canonical" link for homepage: open file
`catalog/controller/common/home.php`, find line
$this->document->addLink(HTTP_SERVER, 'canonical');
and replace it with:
$this->document->addLink($this->url->link('common/home'), 'canonical');
## Finalize install: check personal settings, switch to SeoPro
* rename `.htaccess.txt` to `.htaccess`, check `RewriteBase` setting
RewriteBase /
# RewriteBase /shop/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^ru/sitemap.xml$ ru/index.php?route=feed/google_sitemap [L]
RewriteRule ^en/sitemap.xml$ en/index.php?route=feed/google_sitemap [L]
add rules for all languages you use on the site;
* Go to Admin backend:
* edit products (set "Main category" in "Links" tab),
* edit categories (seokeyword field should be filled everywhere),
* go to shop settings, tab Server
- switch "SEO URL Type" from default (SeoUrl) to SeoPro,
- select "SEO URL for product with categories":
- if YES, the URL will be like
`example.com/category-subcategory/subcategory/product.html`,
- if NO - like `example.com/product.html`
- select "SEO URL ending" (for example: ".html") or leave it empty
## Nice URLs on any route
You can have nice URL on any URL just by adding aliases to `url_alias` table.
Еxecute SQL query in phpMyAdmin.
If you use table prefix, add it to the table name (change `url_alias` to
`YOURPREFIX_url_alias`: for example, `oc_url_alias`).
INSERT INTO url_alias (query, keyword) VALUES
('common/home', ''),
('account/wishlist', 'wishlist'),
('account/account', 'my-account'),
('checkout/cart', 'shopping-cart'),
('checkout/checkout', 'checkout'),
('account/login', 'login'),
('account/logout', 'logout'),
('account/order', 'order-history'),
('account/newsletter', 'newsletter'),
('product/special', 'specials'),
('affiliate/account', 'affiliates'),
('checkout/voucher', 'gift-vouchers'),
('product/manufacturer', 'brands'),
('information/contact', 'contact-us'),
('account/return/insert', 'request-return'),
('information/sitemap', 'sitemap'),
('account/forgotten', 'forgot-password'),
('account/download', 'downloads'),
('account/return', 'returns'),
('account/transaction', 'transactions'),
('account/register', 'create-account'),
('product/compare', 'compare-products'),
('product/search', 'search'),
('account/edit', 'edit-account'),
('account/password', 'change-password'),
('account/address', 'address-book'),
('account/reward', 'reward-points'),
('affiliate/edit', 'edit-affiliate-account'),
('affiliate/password', 'change-affiliate-password'),
('affiliate/payment', 'affiliate-payment-options'),
('affiliate/tracking', 'affiliate-tracking-code'),
('affiliate/transaction', 'affiliate-transactions'),
('affiliate/logout', 'affiliate-logout'),
('affiliate/forgotten', 'affiliate-forgot-password'),
('affiliate/register', 'create-affiliate-account'),
('affiliate/login', 'affiliate-login');