Jump to content

Dr. Gonzo

Member
  • Posts

    30
  • Joined

  • Last visited

Dr. Gonzo's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Im on samsung galaxy s6 using the native android browser when i have the issue.
  2. Hello all, I seem to be having a problem with the Foundation skin and the add to basket popup that appears when you click the add to basket button. On a regular browser such as IE or Firefox it works fine however when browsing on a mobile device such as a phone, the popup window is cut off by the menu bar. Anyone know how I can fix this? For now I have the cart set to go to basket on add but it makes it easier to continue shopping if I could have this popup working on mobile devices.
  3. I used ayz1's method and it at least pointed me in the right direction. When I implemented it in the way he described with the closing div tag where it is, it looks kinda funky with the white boxes around the currency, language, and basket indicators as bsmither had mentioned so I put the closing tag right behind the closer for the store logo and it looks better. After some messing with the div tags I think I got the layout where I want it. Thanks everyone for your help and input.
  4. Thanks Dirty Butter, but I did use firebug and found the style sheet controlling it but when I made attempts to make changes myself, it seemed to color the entire page with the background color.
  5. Hello everyone, Does anyone by chance know how I can specify a background color for the header (where the logo and search box reside)in the Foundation skin on version 6? I notice the entire thing is controlled by style sheets so kinda hard to wrap my head around how to do this without creating an addition to the style sheets myself. Sorry, had to edit this I put the wrong name of the skin in.
  6. Ok thats good to know for future reference. I am still in the same boat where I cannot return search results from category fields however.
  7. Ya, I took a whack at it by adding CubeCart_category as C, right before CubeCart_inventory AS I LEFT JOIN ( with no luck, the page fails to load and comes back blank. I appear to be back in the same boat though with not being able to generate a proper hit on seo_meta_keywords for categories. Some peculiar things I am noticing while working with the code thus far: I notice I get an error at the top of the debug log telling me that $order is an undefined variable if I use 'like' (and I believe this may be causing the blanks in the query we were seeing earlier) and I notice it's when RLIKE is used. If I get a hit on part of a product name, I get the same product listed over and over again when using 'fulltext' search (almost like a loop). I get the same irrelevant products returned if I search using a known term I specified under a category or product seo_meta_keywords field. I get nothing returned if I use a keyword that is nowhere to be found in any product or category fields (which I would expect) but notice the blank query when using RLIKE: [12] SHOW INDEX FROM `CubeCart_inventory`; -- (0.00047087669372559 sec) [CACHE WRITE] [13] SHOW INDEX FROM `CubeCart_category`; -- (0.00048589706420898 sec) [CACHE WRITE] [14] SHOW VARIABLES LIKE 'ft_min_word_len' -- (0.00055718421936035 sec) [CACHE WRITE] [15] SELECT I.*, MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST('testing4' IN BOOLEAN MODE) AS Relevance FROM CubeCart_category AS C, CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST('testing4' IN BOOLEAN MODE)) >= 0.5 ORDER BY Relevance DESC LIMIT 12 OFFSET 0 -- (9.3560028076172 sec) [CACHE WRITE] [16] SHOW INDEX FROM `CubeCart_inventory`; -- (9.3560028076172 sec) [CACHE READ] [17] SHOW INDEX FROM `CubeCart_category`; -- (9.3560028076172 sec) [CACHE READ] [18] SHOW VARIABLES LIKE 'ft_min_word_len' -- (9.3560028076172 sec) [CACHE READ] [19] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) LIMIT 12 OFFSET 0 -- (0.0071730613708496 sec) [CACHE WRITE] [20] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) -- (0.0065910816192627 sec) [CACHE WRITE] Debug Messages: [0] The words to search are: testing4 [1] The $search_mode is: fulltext [2] The $search_str_len is: 8 [3] The $max_word_len is: 4 [4] The words to search are: testing4 [5] The $search_mode is: like [6] The $search_str_len is: 8 [7] The $max_word_len is: 4
  8. I do have caching enabled under the advanced tab. I noticed this code here(I remarked the original to add the seo_meta_keywords code update from Dirty Butter's thread on the subject): /*$rlike = ''; if (!empty($search_data['keywords'])) { $searchwords = preg_split( '/[\s,]+/', $GLOBALS['db']->sqlSafe($search_data['keywords'])); foreach ($searchwords as $word) { $searchArray[] = $word; } $noKeys = count($searchArray); $regexp = ''; for ($i=0; $i<$noKeys; ++$i) { $ucSearchTerm = strtoupper($searchArray[$i]); if (($ucSearchTerm != 'AND') && ($ucSearchTerm != 'OR')) { $regexp .= '[[:<:]]'.$searchArray[$i].'[[:>:]].*'; } } $regexp = substr($regexp, 0, strlen($regexp)-2); **** Changed to search product meta keywords $rlike = " AND (I.name RLIKE '".$regexp."' OR I.description RLIKE '".$regexp."' OR I.product_code RLIKE '".$regexp."')"; }*/ $rlike = ''; if (!empty($search_data['keywords'])) { $searchwords = preg_split( '/[ ,]/', $GLOBALS['db']->sqlSafe($search_data['keywords'])); foreach ($searchwords as $word) { if ((strtoupper($word) != 'AND') && (strtoupper($word) != 'OR')) $searchArray[] = $word; } $regexp = ''; $columnsToSearch = array( 'I.name', 'I.description', 'I.product_code', 'I.seo_meta_keywords', ); foreach($columnsToSearch as $col) { for ($i=0, $noKeys=count($searchArray); $i<$noKeys; ++$i) { $regexp[$col][] = $col." RLIKE '[[:<:]]".$searchArray[$i]."[[:>:]]'"; } $regexp[$col] = '(' . implode(' AND ', $regexp[$col]) . ')'; } $rlike = " AND (" . implode(' OR ', $regexp) . ")"; } $q2 = "SELECT I.* FROM ".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM ".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_pricing_group $group_id GROUP BY product_id) as G ON G.product_id = I.product_id $joinString WHERE I.product_id IN (SELECT product_id FROM `".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_category_index` as CI INNER JOIN ".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 ".$whereString.$rlike; Is it possible to alter this SELECT statement here in this code for } else { 'like' to query the category data? If so that would not only increase the responsiveness of the search but also return hits from category seo_meta_keywords. At the moment there is no reference to that table for this part of the code.
  9. Ahhhh, stupid me. Ok after the change the search is a little slow but it does return not only a hit on the seo_meta_keywords from a product, but also from category as well. I also notice that it is returning irrelevant items that do not contain the keyword I specified unless I go back to 'like' instead of 'fulltext' at this line: public function searchCatalogue($search_data = null, $page = 1, $per_page = 10, $search_mode = 'like') { $per_page = (!is_numeric($per_page) || $per_page < 1) ? 10 : $per_page; $original_search_data = $search_data; not to mention the search is sped up substantially. But if I do this, it is now not generating hits on the seo_meta_keywords field for categories but still returning hits from seo_meta_keywords for products. Oh, I noticed why in the code. If $search_mode is 'like' then it bypasses that code we added to include the category fields.
  10. Here is the debug message section: [0] The words to search are: 10ah [1] The $search_mode is: fulltext [2] The $search_str_len is: 4 [3] The $max_word_len is: 4 Weird thing is, now all those MATCH statements show my keywords AND show the c.cat_name, c.cat_desc, c.seo_meta_keywords we were looking for: [14] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1603] \"SELECT I.*, MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS C, CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE)) >= 0.5 ORDER BY Relevance DESC LIMIT 12 OFFSET 0 \" - Unknown column \'C.cat_name\' in \'field list\'','1462310409'); -- (0.00051498413085938 sec) [ERROR - NOT CACHED] [15] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1603] \"SELECT I.*, MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS C, CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE)) >= 0.5 ORDER BY Relevance DESC LIMIT 12 OFFSET 0 \" - Unknown column \'C.cat_name\' in \'field list\'','1462310409'); -- (0.00051498413085938 sec) [ERROR - CACHE WRITE] [ 16] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1609] \"SELECT COUNT(I.product_id) as count, MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS C, CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE)) >= 0.5 GROUP BY I.product_id ORDER BY Relevance DESC \" - Unknown column \'C.cat_name\' in \'field list\'','1462310409'); -- (0.00062894821166992 sec) [ERROR - NOT CACHED] [17] INSERT INTO `CubeCart_system_error_log` (`message`,`time`) VALUES ('File: [catalogue.class.php] Line: [1609] \"SELECT COUNT(I.product_id) as count, MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS C, CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name,C.cat_name,C.cat_desc,C.seo_meta_keywords) AGAINST(\'10ah\' IN BOOLEAN MODE)) >= 0.5 GROUP BY I.product_id ORDER BY Relevance DESC \" - Unknown column \'C.cat_name\' in \'field list\'','1462310409'); -- (0.00062894821166992 sec) [ERROR - CACHE WRITE]
  11. I went in to phpMyAdmin and attempted to alter the existing index and received the error that the used table type does not support FULLTEXT indexes. So maybe that explains why the advanced option did not allow that sql command to go through. Ok update on search. I have the code for $indexes you laid out for the catalogue.class.php file, the table has been set to a myISAM engine and has allowed me to specify fulltext indexing which I did directly through myPhPAdmin, and the debug still shows this: [19] SHOW INDEX FROM `CubeCart_inventory`; -- (0.001507043838501 sec) [CACHE READ] [20] SHOW INDEX FROM `CubeCart_category`; -- (0.001507043838501 sec) [CACHE READ] [21] SHOW VARIABLES LIKE 'ft_min_word_len' -- (0.001507043838501 sec) [CACHE READ] [22] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) LIMIT 12 OFFSET 0 -- (0.0090909004211426 sec) [CACHE WRITE] [23] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) -- (0.0072259902954102 sec) [CACHE WRITE]
  12. This is the log from searching and generating a hit on product name: [13] SELECT I.*, MATCH (I.product_code,I.description,I.name) AGAINST('10amp' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS C, CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name) AGAINST('10amp' IN BOOLEAN MODE)) >= 0.5 ORDER BY Relevance DESC LIMIT 12 OFFSET 0 -- (0.0097630023956299 sec) [CACHE WRITE] [14] SELECT COUNT(I.product_id) as count, MATCH (I.product_code,I.description,I.name) AGAINST('10amp' IN BOOLEAN MODE) AS Relevance FROM CubeCart_inventory AS C, CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (MATCH (I.product_code,I.description,I.name) AGAINST('10amp' IN BOOLEAN MODE)) >= 0.5 GROUP BY I.product_id ORDER BY Relevance DESC -- (0.0014050006866455 sec) [CACHE WRITE] And this is the log from searching for a keyword under a product's seo_meta_keywords field(notice it generated a hit but is missing the keyword in the routine). [22] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) LIMIT 12 OFFSET 0 -- (0.0097780227661133 sec) [CACHE WRITE] [23] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) -- (0.010262012481689 sec) [CACHE WRITE] And I unfortunately do not see any reference to the c.cat_name or c.seo_meta_keywords fields I defined under the custom sql earlier in the post. I also notice something at the top of the debug log where it gives a PhP notice: "classes/cubecart.class.php:746 - Undefined index: search" when I search on a term used in a product name and a similar notice and an additional notice when searching on something that generates a hit on a seo_meta_keywords term: "classes/catalogue.class.php:1542 - Undefined variable: order"
  13. Ok found out what was causing the sequence to be blank. Turns out this line of code: public function searchCatalogue($search_data = null, $page = 1, $per_page = 10, $search_mode = 'fulltext') { had been changed to: public function searchCatalogue($search_data = null, $page = 1, $per_page = 10, $search_mode = 'like') { during the modifications for the product table's seo_meta_keywords search and once I changed it back to 'fulltext', the sequence now shows my keywords. However we are back in the same boat we were in before with the code not querying the category table's 'seo_meta_keywords' field.
  14. SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) LIMIT 12 OFFSET 0 -- (0.0041220188140869 sec) [CACHE WRITE] [14] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND ((I.name RLIKE '[[::]]') OR (I.description RLIKE '[[::]]') OR (I.product_code RLIKE '[[::]]') OR (I.seo_meta_keywords RLIKE '[[::]]')) -- (0.01549506187439 sec) [CACHE WRITE]
  15. I do not seem to have any string containing the words "MATCH" in my debug output.
×
×
  • Create New...