Post by Scott2018s » Thu Jun 07, 2018 6:17 am

Hello everyone

Could you please let me know how change this url from :

https://example.com/index.php?route=pro ... ch&search=

to

https://example.com/search

(/search) works good direct in browser bar, but always after use search box in site going to /index.php?route=product/search&search=

Regards

User avatar
New member

Posts

Joined
Fri May 18, 2018 7:59 am

User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Scott2018s » Fri Jun 08, 2018 1:07 am

paulfeakins wrote:
Thu Jun 07, 2018 5:38 pm
What about this?
https://www.opencart.com/index.php?rout ... n_id=24846
I edit common.js as he explained to fix search & cart remove problem but no avail
https://example.com/index.php?route=pro ... ch&search=
to https://example.com/search&search=
not working
and auto refresh for remove cart also not working
Please help ;(
thank you advance

User avatar
New member

Posts

Joined
Fri May 18, 2018 7:59 am

Post by Johnathan » Fri Jun 08, 2018 9:23 pm

If you can't get that other extension working, Rewrite Manager can do this. It will change all redirects to the rewritten version you enter, including both the page URL and URLs generated by OpenCart (e.g. for links in the header or footer). Note that search pages do still use a URL parameter, so the URL will end up looking like this for search pages:

www.yourdomain.com/search?search=macbook

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Scott2018s » Sat Jun 09, 2018 10:57 pm

Johnathan wrote:
Fri Jun 08, 2018 9:23 pm
If you can't get that other extension working, Rewrite Manager can do this. It will change all redirects to the rewritten version you enter, including both the page URL and URLs generated by OpenCart (e.g. for links in the header or footer). Note that search pages do still use a URL parameter, so the URL will end up looking like this for search pages:

www.yourdomain.com/search?search=macbook

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.
I fixed all the links to pages which contains ( index.php?route=) and also "search" yesterday after more than a week of failed after editing some files, now works as you said ( search?search= )

now the only problem still I've (auto refresh for remove cart also not working) and also in Rewrite Manager demo not working
http://demo.getclearthinking.com/cart when click on remove, the item removed but without refresh page to empty page (Your shopping cart is empty!)

I hope can get assistance in this forum anyway thanks Jonathan & everyone

User avatar
New member

Posts

Joined
Fri May 18, 2018 7:59 am

Post by Johnathan » Sat Jun 09, 2018 11:55 pm

Thanks for pointing that out. I took a look and this is due to some hard-coded checks on the "route" variable in the URL. Because that's missing, the redirect doesn't happen, so the page doesn't refresh.

I fixed it on my demo with this edit:

Code: Select all

IN:
/catalog/view/javascript/common.js

REPLACE ALL INSTANCES OF:
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') {

WITH:
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout' || location.href.indexOf('/cart') != -1 || location.href.indexOf('/checkout') != -1) {

You'd replace '/cart' and '/checkout' in that edit with whatever your rewritten URL values are. I'll add instructions on this in the next update of Rewrite Manager as well, so others know how to do this.

Hope that helps.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Scott2018s » Mon Jun 11, 2018 7:10 am

Johnathan wrote:
Sat Jun 09, 2018 11:55 pm
Thanks for pointing that out. I took a look and this is due to some hard-coded checks on the "route" variable in the URL. Because that's missing, the redirect doesn't happen, so the page doesn't refresh.

I fixed it on my demo with this edit:

Code: Select all

IN:
/catalog/view/javascript/common.js

REPLACE ALL INSTANCES OF:
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') {

WITH:
if (getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout' || location.href.indexOf('/cart') != -1 || location.href.indexOf('/checkout') != -1) {

You'd replace '/cart' and '/checkout' in that edit with whatever your rewritten URL values are. I'll add instructions on this in the next update of Rewrite Manager as well, so others know how to do this.

Hope that helps.
:star::star::star:You Rock dude:star::star::star::star: 7 star support Thank you so much
There is no solution to the problem with most seo urls extensions in opencart marketplace, I'm sure you're the first one solved this problem you're legendary :thumbsup: cheers :beers:
:blush:
Thank you so much for your help
Best Wishes

User avatar
New member

Posts

Joined
Fri May 18, 2018 7:59 am
Who is online

Users browsing this forum: No registered users and 12 guests