Hi to all,
as i know when a notice like this ->? PHP Notice: Undefined variable happens in a .tpl file it means that is not defined(the variable) in controller file.... but what does it mean when this notice happens inside a controller file? the full notice is:
PHP Notice: Undefined variable: the_category_customer_groups in httpdocs/vqmod/vqcache/vq2-system_modification_admin_controller_catalog_category.php on line 684 the line is :
'category_customer_groups' => $the_category_customer_groups,
how to resolve it? my main purpose first is to understand what is the problem here and secondly to fix it.
If you have any idea i would be grateful to hear it.
thank you in advance.
$the_category_customer_groups is blank or null. Whatever variable is passing data to it, isn't returning anything.
So find the original reference to $the_category_customer_groups - are any of the surrounding variables like $the_category_customer_groups['something'] ? If so, it's missing its array.
Or is there something like: anywhere?
If so, 'something' is passing null or blank, or $query doesn't exist.
So find the original reference to $the_category_customer_groups - are any of the surrounding variables like $the_category_customer_groups['something'] ? If so, it's missing its array.
Or is there something like:
Code: Select all
$the_category_customer_groups = $query['something']
If so, 'something' is passing null or blank, or $query doesn't exist.
inside xml file there are only two $the_category_customer_groups
<operation>
<search position="before"><![CDATA[
$data['categories'][] = array(
]]></search>
<add><![CDATA[
if ($this->config->get('config_update_category_customer_groups_in_category_list') == 1){
$this->model_catalog_category->updateAllCategoriesToDefaultCustomerGroups();
}
$this->load->model('customer/customer_group');
$data['customer_groups'] = $this->model_customer_customer_group->getCustomerGroups();
$the_category_customer_groups = $this->model_catalog_category->getCategoryCustomerGroups($result['category_id']);
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
'category_id' => $result['category_id'],
]]></search>
<add><![CDATA[
'category_customer_groups' => $the_category_customer_groups,
]]></add>
</operation>
any idea? i am searching this many days now and i am at dead end with no any info in forum...so i appreciate your help
<operation>
<search position="before"><![CDATA[
$data['categories'][] = array(
]]></search>
<add><![CDATA[
if ($this->config->get('config_update_category_customer_groups_in_category_list') == 1){
$this->model_catalog_category->updateAllCategoriesToDefaultCustomerGroups();
}
$this->load->model('customer/customer_group');
$data['customer_groups'] = $this->model_customer_customer_group->getCustomerGroups();
$the_category_customer_groups = $this->model_catalog_category->getCategoryCustomerGroups($result['category_id']);
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
'category_id' => $result['category_id'],
]]></search>
<add><![CDATA[
'category_customer_groups' => $the_category_customer_groups,
]]></add>
</operation>
any idea? i am searching this many days now and i am at dead end with no any info in forum...so i appreciate your help
Focus on this:
Is this plugin supposed to append code that contains the getCategoryCustomerGroups() function?
I don't have that in my model.
If you can't find the getCategoryCustomerGroups() function in either your plugin or category model file, this is your culprit. It isn't being appended to where it needs to be in order for the vQmod to work.
Code: Select all
$this->model_catalog_category->getCategoryCustomerGroups($result['category_id']);
I don't have that in my model.
If you can't find the getCategoryCustomerGroups() function in either your plugin or category model file, this is your culprit. It isn't being appended to where it needs to be in order for the vQmod to work.
Who is online
Users browsing this forum: No registered users and 222 guests