VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: garyamort on July 01, 2014, 17:51:38 PM

Title: Anyone else having problems with quotes in product names?
Post by: garyamort on July 01, 2014, 17:51:38 PM
Ran into a weird problem with products with quotes in the product names.   Turned out to be be in the getNeighborProducts method in the file administrator/components/com_virtuemart/models/product.php.

I had to change line 1492 from
            $qm = ' AND '.$orderByName.' '.$op.' "'.$orderByValue.'" ORDER BY '.$orderByName.' '.$direction.' LIMIT 1';
to
            $qm = ' AND '.$orderByName.' '.$op.' "'.$this->_db->quote($orderByValue).'" ORDER BY '.$orderByName.' '.$direction.' LIMIT 1';

I was wondering if anyone else has run across this?