Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search by Product Tag Bug
#1
In frontend product displaying page ver. 1.11.0. 
I have a tag with four words, let's say:
word1 word2 word3 word4. When I click on the tag I goto search page with this URL part:
index.php?route=product/search&search=word1%20word2%20word3%20word4&tag=word1%20word2%20word3%20word4

because of the search term: 
&search=word1%20word2%20word3%20word4 
I get 15 results - for any product that contains even one of the 4 words.
If i manually change the URL and make it:
index.php?route=product/search&tag=word1%20word2%20word3%20word4
I get the right results - the 2 products that are using this tag.

I had a look in file:
catalog\controller\product\product.php
and I saw that in line 859 has an if statement:
if ($product_info['tag']) {
inside the if statement the right link call is written. Line 867:
'href' => $this->url->link('product/search', 'search=' . $tag . '&tag=' . $tag, 'SSL')
but something make it not appear (or change it later) in the actual link reference at the frontend.
Reply
#2
(06-13-2018, 09:09 PM)Sp1ke Wrote: In frontend product displaying page ver. 1.11.0. 
I have a tag with four words, let's say:
word1 word2 word3 word4. When I click on the tag I goto search page with this URL part:
index.php?route=product/search&search=word1%20word2%20word3%20word4&tag=word1%20word2%20word3%20word4

because of the search term: 
&search=word1%20word2%20word3%20word4 
I get 15 results - for any product that contains even one of the 4 words.
If i manually change the URL and make it:
index.php?route=product/search&tag=word1%20word2%20word3%20word4
I get the right results - the 2 products that are using this tag.

I had a look in file:
catalog\controller\product\product.php
and I saw that in line 859 has an if statement:
if ($product_info['tag']) {
inside the if statement the right link call is written. Line 867:
'href' => $this->url->link('product/search', 'search=' . $tag . '&tag=' . $tag, 'SSL')
but something make it not appear (or change it later) in the actual link reference at the frontend.

I made a vqmod file solving this. This works both for the Tags module and for the tags link(s) in product page. You may download and use this one for free. Note that this is tested only in ver. 1.11.0
Two points:
1. It returns the right results BUT is not showing the tags in the search input box ("Search for" input shows nothing).
2. Remarks or questions are welcome but please keep in mind that I am not a professional programmer...just helping a friend with her company website.


Attached Files
.zip   tagssearchlink.zip (Size: 561 bytes / Downloads: 2)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)