forked from pavlickm/seopro
-
Notifications
You must be signed in to change notification settings - Fork 28
/
HOWTO-install-ocmod.en.txt
132 lines (100 loc) · 5.38 KB
/
HOWTO-install-ocmod.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
121
122
123
124
125
126
127
128
129
130
131
132
# AUTOMATIC INSTALLATION (OCMOD)
================================
## ATTN: you need OC2 Extension Installer configured properly and working
-------------------------------------------------------------------------
In case you have properly configured OC2 Extension Installer and it works fine
installing other extensions - you only need OCMOD Multiline fix to be added.
## ATTN: our OCMOD Multiline fix required for automated install
---------------------------------------------------------------
Please see [OCMOD Multiline fix](http://www.opencartjazz.com/en/opencart-bugfix/oc2011-bugfix-extension-installer).
## Installation
---------------
* execute SQL query in phpMyAdmin
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.
Mini-FAQ
- Q: why not include this SQL query in OCMOD istaller?
- A: because installer will fail if you have used (or tried to use) SeoPro.
And we can't said something like "just delete this column if you want an
automated install", because you migt have lot of products edited and
`main_category` used in your setup.
It pretty simple to do this query manually.
`index.php` cannot be modified via OCMOD, so you need to do it manually anyway.
## 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:
* install extension `ocjazz-seopro-v203x-21xx.ocmod.zip`,
* go to the "Extensions / Modifications" menu and click "Refresh" button,
* go to the "Extensions / Modules" menu and install **[OCJazz] SeoPro** module,
* edit products, go to "Links" tab and set "Main category",
* edit categories (seokeyword field must be filled everywhere, in all
categories),
* go to shop settings, tab Server:
- turn "Use SEO URLs" on,
- 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');