Post by xench » Wed May 24, 2017 7:22 am

Hello,

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)
2. Leverage browser caching for the following cacheable resources

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)
3. Add Expires headers

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
4. Use cookie-free domains

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
5) Make fewer HTTP requests

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.
Thank you for support.

Regards

Newbie

Posts

Joined
Mon Jan 26, 2015 12:08 am

Post by IP_CAM » Thu May 25, 2017 9:48 pm

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.


Well, you are seemengly expecting a lot of free assistance, but this probably won't be the case,
as it looks, OC is strictly a Moneymaker Project, and not a 'common goal' Idea, where peoples freely share
their hard earned wisdom, to enable anybody, to run a Top Notch Online-Shop.

But if you are looking for Code-Solutions, this place is full of such, one just has to invest some time, and
patience, still, for latest OC-Versions, much of such code would not even function, as it comes, so, one needs
to have some Coder Knowledge as well, if one plans, to change existing OC-things.

It's the way it works, like in real life, on i.E. automobiles exactly, like on software. So, who does not know, has
to get a hold of someone, who does, and such does likely not always come for free.

Just to get you down to earth... ;)
Good Luck, nothing personal, just plain information !
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sculptex » Fri May 26, 2017 3:37 pm

1) seo links for non product/category/info pages such as checkout - why? You don't want Google to try checking out on your website do you? in fact its a good idea to exclude checkout, cart, account pages etc. from search engine crawl using robots.txt because they are not suitable for indexing. So seo on these pages is pointless.
2) these results are on opencart servers, results for stuff like caching would be different on your server, best way to find out is install and try on your server. See article linked in my sig for more info. For blocking stuff is more complicated, as Ernie says, don't expect everything for free.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK
Who is online

Users browsing this forum: Google [Bot] and 266 guests