I am loading the admin products view using a modal window in another view (custom field) and facing the following issues:
1. Products do not show.
Seems like the products query is using the parent window's custom_id param:
WHERE ( ( (pf.`virtuemart_custom_id`="34" ) ) )
2. After a search for a product (when a custom_id exists in the parent window), the following sql error comes out:
Column 'product_sku' in where clause is ambiguous
Looking at your query in the sortSearchListQuery function, it turns out that:
a. Some fields are included more than once in the where clause, with different format.
$this->valid_search_fields;
0 = "product_name"
1 = "product_sku"
2 = "`l`.`slug`"
3 = "product_s_desc"
4 = "`l`.`metadesc`"
6 = "`p`.product_sku"
8 = "product_desc"
9 = "category_name"
10 = "category_description"
11 = "mf_name"
b. Some of the fields do not contain the table name or the alias, becoming ambiguous.