I am currently using latest OpenCart 2.3.0.2 and trying to optimise default shop template to my requirements. Could you please help me and answer following questions:
1) Fixing SEO Links with "index.php?route="
I have enabled SEO URLs in OpenCart settings and edited .htaccess file. URL addresses for products, categories and sample pages are simplified and work properly. However some sites are still not SEO friendly (ie. [Domain Name]/index.php?route=checkout/checkout, etc.)
My goal is to have such URLs with simple address like:
[Domain Name]/index.php?route=checkout/checkout -> [Domain Name]/checkout
[Domain Name]/index.php?route=checkout/cart -> [Domain Name]/cart
etc.
Additionally, if it will be possible I would like to have custom names for each address (ie. [Domain Name]/index.php?route=checkout/checkout -> [Domain Name]/pay, etc.).
I know that there are paid extensions which can change those links, but I would like to have a code solution which can be added by me.
2) Increasing PageSpeed
I would like to increase shop speed. That's why I have checked default OpenCart demo site for performance and load time grades. Below are the results from GTmetrix, Google PageSpeed Insights and Pingdom.
GTmetrix
https://gtmetrix.com/reports/demo.opencart.com/px4ElG89
Pagespeed: B (86%)
YSlow: B (81%)
Fully loaded time: 1,7 s
Total page size: 475 KB
Google PageSpeed Insights
https://developers.google.com/speed/pag ... tab=mobile Mobile: 68/100 (Needs work)
Desktop: 77/100 (Needs work)
Pingdom
https://tools.pingdom.com/#!/nHBT5/http ... ncart.com/
Performance grade: B 81
Load time: 553 ms
As you can see from above results there is some place for improvements. Could you please provide me a solutions to increase the grades for the following points:
1. Defer parsing JavaScript to reduce blocking of page rendering.
Code: Select all
https://demo.opencart.com/catalog/view/javascript/jquery/jquery-2.1.1.min.js (76.1KiB)
https://demo.opencart.com/catalog/view/javascript/bootstrap/js/bootstrap.min.js (24.2KiB)
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/jquery.flexslider-min.js (18.9KiB)
https://demo.opencart.com/catalog/view/javascript/common.js (5.6KiB)
https://demo.opencart.com/ (180B of inline JavaScript)
Code: Select all
https://demo.opencart.com/catalog/view/javascript/bootstrap/css/bootstrap.min.css (4 hours)
https://demo.opencart.com/catalog/view/javascript/bootstrap/js/bootstrap.min.js (4 hours)
https://demo.opencart.com/catalog/view/javascript/common.js (4 hours)
https://demo.opencart.com/catalog/view/javascript/font-awesome/css/font-awesome.min.css (4 hours)
https://demo.opencart.com/catalog/view/javascript/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0 (4 hours)
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/flexslider.css (4 hours)
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/fonts/flexslider-icon.woff (4 hours)
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/jquery.flexslider-min.js (4 hours)
https://demo.opencart.com/catalog/view/javascript/jquery/jquery-2.1.1.min.js (4 hours)
https://demo.opencart.com/catalog/view/theme/default/stylesheet/stylesheet.css (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/apple_cinema_30-200x200.jpg (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/banners/MacBookAir-1140x380.jpg (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/banners/iPhone6-1140x380.jpg (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/canon_eos_5d_1-200x200.jpg (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/iphone_1-200x200.jpg (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/macbook_1-200x200.jpg (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/burgerking-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/canon-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/cocacola-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/dell-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/disney-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/harley-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/nfl-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/nintendo-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/redbull-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/sony-130x100.png (4 hours)
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/starbucks-130x100.png (4 hours)
https://demo.opencart.com/image/catalog/logo.png (4 hours)
There are 27 static components without a far-future expiration date.
h
Code: Select all
ttps://demo.opencart.com/catalog/view/javascript/jquery/jquery-2.1.1.min.js
https://demo.opencart.com/catalog/view/javascript/bootstrap/css/bootstrap.min.css
https://demo.opencart.com/catalog/view/javascript/bootstrap/js/bootstrap.min.js
https://demo.opencart.com/catalog/view/javascript/font-awesome/css/font-awesome.min.css
https://fonts.googleapis.com/css?family=Open+Sans:400,400i,300,700
https://demo.opencart.com/catalog/view/theme/default/stylesheet/stylesheet.css
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/flexslider.css
https://demo.opencart.com/catalog/view/javascript/common.js
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/jquery.flexslider-min.js
https://demo.opencart.com/image/catalog/logo.png
https://demo.opencart.com/image/cache/catalog/demo/banners/MacBookAir-1140x380.jpg
https://demo.opencart.com/image/cache/catalog/demo/banners/iPhone6-1140x380.jpg
https://demo.opencart.com/image/cache/catalog/demo/macbook_1-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/iphone_1-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/apple_cinema_30-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/canon_eos_5d_1-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/dell-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/disney-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/cocacola-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/nintendo-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/burgerking-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/starbucks-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/canon-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/sony-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/redbull-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/nfl-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/harley-130x100.png
There are 26 components that are not cookie-free
Code: Select all
https://demo.opencart.com/catalog/view/javascript/jquery/jquery-2.1.1.min.js
https://demo.opencart.com/catalog/view/javascript/bootstrap/css/bootstrap.min.css
https://demo.opencart.com/catalog/view/javascript/bootstrap/js/bootstrap.min.js
https://demo.opencart.com/catalog/view/javascript/font-awesome/css/font-awesome.min.css
https://demo.opencart.com/catalog/view/theme/default/stylesheet/stylesheet.css
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/flexslider.css
https://demo.opencart.com/catalog/view/javascript/common.js
https://demo.opencart.com/catalog/view/javascript/jquery/flexslider/jquery.flexslider-min.js
https://demo.opencart.com/image/catalog/logo.png
https://demo.opencart.com/image/cache/catalog/demo/banners/MacBookAir-1140x380.jpg
https://demo.opencart.com/image/cache/catalog/demo/banners/iPhone6-1140x380.jpg
https://demo.opencart.com/image/cache/catalog/demo/macbook_1-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/iphone_1-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/apple_cinema_30-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/canon_eos_5d_1-200x200.jpg
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/dell-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/disney-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/cocacola-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/nintendo-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/burgerking-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/starbucks-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/canon-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/sony-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/redbull-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/nfl-130x100.png
https://demo.opencart.com/image/cache/catalog/demo/manufacturer/harley-130x100.png
Code: Select all
This page has 4 external Javascript scripts. Try combining them into one.
This page has 5 external stylesheets. Try combining them into one.
Regards