VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: duncan12 on October 13, 2015, 23:07:39 PM

Title: Product Search is Broken
Post by: duncan12 on October 13, 2015, 23:07:39 PM
I've been using the Joomla search because the VM search is broken. It either returns no results or in some cases it generates a 1054 error.

If I set the module to "Search Filter Category: No" it generates no results. Then subsequent searches on that page generate the following error:
Quote1054
Unknown column 'ld.product_name' in 'where clause' SQL=SELECT SQL_CALC_FOUND_ROWS p.`virtuemart_product_id` FROM `mby9i_virtuemart_products` as p INNER JOIN `mby9i_virtuemart_products_en_us` as l using (`virtuemart_product_id`) LEFT JOIN `mby9i_virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `mby9i_virtuemart_product_categories` as pc ON p.`virtuemart_product_id` = `pc`.`virtuemart_product_id` LEFT JOIN `mby9i_virtuemart_categories_en_us` as cl ON cl.`virtuemart_category_id` = `pc`.`virtuemart_category_id` WHERE ((`ld`.product_name LIKE "%spade%" OR `l`.product_name LIKE "%spade%" OR `p`.product_sku LIKE "%spade%" OR `ld`.product_s_desc LIKE "%spade%" OR `l`.product_s_desc LIKE "%spade%" OR `ld`.product_desc LIKE "%spade%" OR `l`.product_desc LIKE "%spade%" OR `category_name` LIKE "%spade%" OR `category_description` LIKE "%spade%") AND ((p.`product_parent_id` = "0" AND `pc`.`virtuemart_category_id` > "0") OR p.`product_parent_id` > "0") AND ((p.`product_parent_id` > "0" AND `pc`.`virtuemart_category_id` > "0") OR p.`product_parent_id` = "0") AND ( `ps`.`virtuemart_shoppergroup_id`= "1" OR `ps`.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`="1" ) group by p.`virtuemart_product_id` ORDER BY `category_name` ASC LIMIT 0, 18

If I change the setting to "Search Filter Category: Yes" it never generates any results.

I'm on virtuemart 3.0.10. http://www.bevaradesign.com
Title: Re: Product Search is Broken
Post by: jenkinhill on October 13, 2015, 23:21:42 PM
Search?

http://forum.virtuemart.net/index.php?topic=131613
http://forum.virtuemart.net/index.php?topic=131487
Title: Re: Product Search is Broken
Post by: duncan12 on October 13, 2015, 23:34:02 PM
The previous forum issues do not seem to help. I have en english only site. My joomla install is english only. My virtuemart is english only.
Title: Re: Product Search is Broken
Post by: duncan12 on October 14, 2015, 00:59:18 AM
OK, as a result of another disaster, I think I am closer to solving this, but still not sure what to do.

My active language in VM is en-US.
My active language in Joomla is en-GB.

So I'm guessing that's why I have no search results and that ugly error. The solution is to either, change my VM language or my Joomla language, so that they match?
Title: Re: Product Search is Broken
Post by: GJC Web Design on October 14, 2015, 10:39:58 AM
yes - these are two separate languages!

clone all the VM tables with en_gb to their equivalent en_us

en_gb is always the "base" VM lang
Title: Re: Product Search is Broken
Post by: Milbo on October 14, 2015, 12:48:15 PM
http://docs.virtuemart.net/manual/general-concepts/218-installation-updating.html

"LANGUAGES

Before the installation of VirtueMart it is recommended to install the preferred main language first. The preferred language should be configured as 'site' language in Joomla.

When installing VirtueMart, the installer creates the language database tables for the selected site language, into which for example the product information is stored. Only English language files are delivered with the VirtueMart installation packages. All other language packs can be downloaded from http://virtuemart.net/community/translations and installed using the Joomla Extension Manager. Afterwards the language(s) is (are) available for selection in the VirtueMart configuration.

When updating old versions of VirtueMart or when it was accidently installed with the wrong language, it is possible to change the used language and let VirtueMart create the new tables or update the old ones by storing the VirtueMart configuration.

A guide for setting up a multilanguage shop is available here:
http://docs.virtuemart.net/tutorials/multilingual-store/99-multilanguage-setup.html "
Title: Re: Product Search is Broken - Solved
Post by: duncan12 on October 15, 2015, 22:18:43 PM
This has been solved. I changed my Joomla installed language to be the same as Virtuemart and all is fine.

for those installing the Gavick InStyle template/virtuemart combo, this issue is present in the installed package. You will need to deal with it if you ever want search to work.
Title: Re: Product Search is Broken
Post by: GJC Web Design on October 15, 2015, 22:23:03 PM
A perfect reason as any to do as is often advised here..

On a new site start with a clean Joomla, add VM .. get it working and checked as you want it .. add your extensions - then start worrying about styling and a template

IMHO these quickstarts or what ever you want to call them cause so many  more problems