Post by daniel2008 » Mon Oct 18, 2010 4:35 pm

Hi,

I think it's a bug for v1.491.
Afer searching a product (say, No. #84)from the Search, you can find 3 products but can't click any of them
in the result page -as it saying 'Product not found!'
http://www.smartebuy.com.au/index.php?r ... uct_id=654

However, if you browsing the category and find out the product 'C5017A #84', you can surely click its details
in that page
http://www.smartebuy.com.au/index.php?r ... uct_id=654

The problem is not for all products but for those share the part of common keywords.

Previously I thought it was caused by SEO. but after I turn off SEO, the problem is still there.

Can anyone help me out? Thanks,

http://www.smartebuy.com.au/ http://www.myleathers.com.au/ http://www.cctv4oz.com.au/ http://www.origreen.com.au/


Active Member

Posts

Joined
Wed Jul 07, 2010 8:54 pm

Post by JAY6390 » Mon Oct 18, 2010 6:59 pm

The problem is the #
When a # is in a URL, a browser classes anything after it as an anchor link. The # needs to be URL encoded to prevent this
OPEN

Code: Select all

/catalog/controller/product/search.php
FIND:

Code: Select all

                        'href'    => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&keyword=' . $this->request->get['keyword'] . $url . '&product_id=' . $result['product_id']), 
CHANGE TO:

Code: Select all

                        'href'    => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&keyword=' . urlencode($this->request->get['keyword']) . $url . '&product_id=' . $result['product_id']), 
That will clear up the issue for when someone selects the products. You will also need to make changes to the pagination, breadcrumbs and sort order links.
To do that, find ALL instances of

Code: Select all

$url .= '&keyword=' . $this->request->get['keyword']; 
and change them to

Code: Select all

$url .= '&keyword=' . urlencode($this->request->get['keyword']); 
You can do this with a simple search and replace

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by daniel2008 » Mon Oct 18, 2010 8:08 pm

Hi JAY6390,

You're right. By using your method, I've solved the trouble.

But after I turn on SEO, the similar problem happened as follows,
Search with '#85',
http://www.smartebuy.com.au/index.php?r ... cription=1
While clicking any listed products, 'The page you requested cannot be found.'
http://www.smartebuy.com.au/HP_ink_#85_ ... cription=1

I think there is another file to be changed. But where is it? Thanks again.

http://www.smartebuy.com.au/ http://www.myleathers.com.au/ http://www.cctv4oz.com.au/ http://www.origreen.com.au/


Active Member

Posts

Joined
Wed Jul 07, 2010 8:54 pm

Post by JAY6390 » Mon Oct 18, 2010 8:18 pm

Hi Daniel

Unfortunately this is just because you cannot have a # in your product names, it's not possible to do this no matter what since as I previously mentioned the # has a special function. You will need to remove the # from product titles, and replace them with either nothing or another character

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by daniel2008 » Mon Oct 18, 2010 8:24 pm

Hi JAY6390,

Is there other method than removing '#' away to get SEO work?
I just need your confirmation for it.
As search with # is a way customers may use (or their habit), it'll
be better to keep such the search. But if there is no solution, I'll
surely replace #. Thanks,

http://www.smartebuy.com.au/ http://www.myleathers.com.au/ http://www.cctv4oz.com.au/ http://www.origreen.com.au/


Active Member

Posts

Joined
Wed Jul 07, 2010 8:54 pm

Post by JAY6390 » Mon Oct 18, 2010 8:31 pm

You only need to remove the # from your product seo keywords, not the title sorry. The title is fine, it's the seo keyword that you need to make sure you don't have the # in

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by daniel2008 » Mon Oct 18, 2010 8:59 pm

Hi JAY6390,

I'll get # replace then. Without #, shall I have to change the file
/catalog/controller/product/search.php?

Thanks,

http://www.smartebuy.com.au/ http://www.myleathers.com.au/ http://www.cctv4oz.com.au/ http://www.origreen.com.au/


Active Member

Posts

Joined
Wed Jul 07, 2010 8:54 pm
Who is online

Users browsing this forum: Semrush [Bot] and 76 guests