Search in keywords

Phoca Cart - complex e-commerce extension
Cliffdiver
Phoca Member
Phoca Member
Posts: 30
Joined: 05 Apr 2020, 09:10

Search in keywords

Post by Cliffdiver »

Hallo,
I try to find a solution for a special search. I have many digital articels which are tagget with startnumbers. In older versions of phocacart I entered this numbers in the metakey field. For example 152 or 796 or 452 etc. if only one athlete is on the picture and sometimes there were mor people on one picture, so the metakey field contained for example 452, 6, 1025, 458, 37. The values were seperated by empty spaces.

In the early version (phoca 3) I made a core-hack in search.php but since that time a lot changed and I am ending in a sql error.
The codesnipped I tried in phoca 6

Code: Select all

 $keyword = "(^| )".$keyword."( |$)";
                    $conditions = [
                        'a.metakey REGEXP '. $keyword,
                        
                    ];
Can anybody help me.
Thanks