News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to seek product with "(double quotes) in its names?[SOLVED]

Started by borro, September 05, 2015, 09:18:16 AM

Previous topic - Next topic

borro

Hello.

At my Virtuemart 3.0.9 there is a problem to find the products having " in their names. If I'm trying to find the product called like souvenir "Big" by typing this souvenir "Big" in VM searchmodule field I shall find nothing. But if I type souvenir Big I'll see my product.

Any ideas how to fix this issue?
Wish you happiness!

Studio 42

Hi,
quotes get reencoded on search for security reason. I don't think you can change this without changing virtuemart core code(and this is bad)

borro

Quote from: Studio 42 on September 05, 2015, 10:50:22 AM
Hi,
quotes get reencoded on search for security reason. I don't think you can change this without changing virtuemart core code(and this is bad)
I'm ready to fix the core code. But I need to understand what php file my searching words are been changed in after hiting Enter.
Is it possible to enable double quotes search and keep safe Virtuemart site?
Wish you happiness!

Studio 42


Milbo

Hello borro,
I write you a pm with my skype. The problem is not trivial, but maybe already solved partly. I would like to send you the last version RC 3.0.9.8 per skype.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

borro

Thank you, Milbo. Yes, new release works fine.

For those who cann't use a new release: if you want to find products with " in their names correspondingly typing searching words with double quotes in a built-in VM search find administrator/components/com_virtuemart/models/product.php
and replace this line(approximately line 259):
$keyword = htmlspecialchars(html_entity_decode($this->keyword, ENT_QUOTES, "UTF-8"), ENT_QUOTES, "UTF-8");
with this one:
$keyword = $db->escape( html_entity_decode($this->keyword, ENT_QUOTES, "UTF-8") );

Good luck
Wish you happiness!