Closed screamingjungle closed 7 years ago
Oops, I meant v1.5.5.1 not v1.5.4. I was wondering if my v1.5.4 was different to yours. My bad.
I use a custom search page module which replaces the default search controller and it uses the v1.5.4 approach.
Maybe worth mentioning something about this in readme/faq.
Related to issue #16 .
Had another user report, with the following comment on opencart.com;
Just found out another 2 notice when you use the search of OC.
OC 1.5.5 - PHP 5.4 - VqMod 2.4.1
PHP Notice: Undefined variable: filter_name in /vqmod/vqcache/vq2-catalog_controller_product_search.php on line 465
PHP Notice: Undefined variable: filter_category_id in /vqmod/vqcache/vq2-catalog_controller_product_search.php on line 465
I am far from being php knowledgeable, but would changing the lines of code in the vqmod file FROM: // BOF - Piwik Opencart mod $this->load->model('tool/piwik'); $this->session->data['last_search_total'] = $product_total; $this->model_tool_piwik->trackSiteSearch($filter_name, $filter_category_id, $product_total); // EOF - Piwik Opencart mod
TO: // BOF - Piwik Opencart mod $this->load->model('tool/piwik'); $this->session->data['last_search_total'] = $product_total; $this->model_tool_piwik->trackSiteSearch($search, $category_id, $product_total); // EOF - Piwik Opencart mod Fix at least some of the issue as $search and $category_id are what OpenCart are looking for.
It got rid of the error being reported on my site, but as stated "not knowledgeable" so no way of knowing if it actually fixed it or masked it.
I have made some more changes as part of issue #16 which should stop the errors appearing - I will do a new minor release with these in in the next few days. I am going to be making more changes to the site search feature later though to tackle this issue ticket.
I will leave this issue open as the core issue of the variables to call ($filter_name versus $search) I haven't quite got my head round. I'm trying to maximise compatibility between different versions of OC and they do things differently.
I may well change the method used for site search anyway, see issue #14 .
the variables to call $product_total is still showing as an error with OCv 1.5.6.4. though only on a search with an empty search parameter, though you probably knew about the empty search already. Looking forward to the new release
Do you mean you still get an error with the latest develop branch commit https://github.com/InaneCoding/Piwik-OpenCart-Ecommerce-VQMod/commit/caac80813cb459a091991cc5f3df669bab985d3b on OC 1.5.6.4 - what is the error?
No not with the new minor updates did not notice these till after I posted. Sorry will try with the new files and edits.
Sent from my Samsung Galaxy Note 10.1 On 21 Jun 2014 16:38, "kevinb456" notifications@github.com wrote:
Do you mean you still get an error with the latest develop branch commit caac808 https://github.com/InaneCoding/Piwik-OpenCart-Ecommerce-VQMod/commit/caac80813cb459a091991cc5f3df669bab985d3b on OC 1.5.6.4 - what is the error?
— Reply to this email directly or view it on GitHub https://github.com/InaneCoding/Piwik-OpenCart-Ecommerce-VQMod/pull/15#issuecomment-46756793 .
Superseded by newer releases where this issue is fixed. No longer supporting OC 1.x releases. Closing.
v1.5.4 saw the following errors in vqmod/vqcache/vq2-catalog_controller_product_search.php: PHP Notice: Undefined variable: filter_name PHP Notice: Undefined variable: filter_category_i
I have not tested later versions.