I just got a new OpenCart Store and I got some PHP errors

www.efekten.comm This is my store. I get 2 messages saying that I have errors.

Notice: Undefined index: name in /home/efektenc/public_html/catalog/controller/extension/module/beauty_tab.php on line 28Notice: Undefined index: name in /home/efektenc/public_html/catalog/controller/extension/module/shoes_tab.php on line 28

It’s ready template, so I started to delete the categories AND it happens when I deleted the very first one.

But there is no option in the admin menu where I can change them and if you can help me I would appreciate it.

I just needed to change those categories, but not able trough the panel, they are installed like modules… It’s quite not good.

The code is:

class ControllerExtensionModuleShoesTab extends Controller {
	public function index($setting) {
		$this->load->language('extension/module/shoes_tab');

		$this->load->model('catalog/category');

		$this->load->model('catalog/product');
		
		$this->load->model('tool/image');

		$data['categories'] = array();

		if (!$setting['limit']) {
			$setting['limit'] = 4;
		}

		if (!empty($setting['category'])) {
			//$categories = array_slice($setting['category'], 0, (int)$setting['limit']);

			$categories = $setting['category'];
			$data['template_name'] = $setting['name'];

			foreach ($categories as $category_id) {

				$category = $this->model_catalog_category->getCategory($category_id);

				$datainfo['category'] = $category['name'];

				$filter_data = array(
					'filter_category_id'  => $category_id,
					'filter_sub_category' => true,
					'limit'               => (int)$setting['limit'],
					'start'               => 0
				);

				$category_info = $this->model_catalog_product->getProducts($filter_data);

				if ($category_info) {
					$datainfo['products'] = array(); // сбрасываем datainfo['products'] чтобы не было дубликата
					foreach ($category_info as $key => $value) {
 						if ($value['image']) {
							$image = $this->model_tool_image->resize($value['image'], $setting['width'], $setting['height']);
						} else {
							$image = $this->model_tool_image->resize('placeholder.png', $setting['width'], $setting['height']);
						}

						if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
							$price = $this->currency->format($this->tax->calculate($value['price'], $value['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
						} else {
							$price = false;
						}

						if ((float)$value['special']) {
							$special = $this->currency->format($this->tax->calculate($value['special'], $value['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
						} else {
							$special = false;
						}

						$datainfo['products'][] = array(
							'product_id'  => $value['product_id'],
							'thumb'       => $image,
							'name'        => $value['name'],
							'description' => utf8_substr(strip_tags(html_entity_decode($value['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',
							'price'       => $price,
							'special'     => $special,
							'rating'      => $value['rating'],
							'href'        => $this->url->link('product/product', 'product_id=' . $value['product_id'])
						);
					}
				}
				$data['categories'][] = $datainfo;
			}
		}

		if ($data['categories']) {
			return $this->load->view('extension/module/shoes_tab', $data);
		}
	}
}

And the next one:

class ControllerExtensionModuleBeautyTab extends Controller {
	public function index($setting) {
		$this->load->language('extension/module/beauty_tab');

		$this->load->model('catalog/category');

		$this->load->model('catalog/product');
		
		$this->load->model('tool/image');

		$data['categories'] = array();

		if (!$setting['limit']) {
			$setting['limit'] = 4;
		}

		if (!empty($setting['category'])) {
			//$categories = array_slice($setting['category'], 0, (int)$setting['limit']);

			$categories = $setting['category'];
			$data['template_name'] = $setting['name'];

			foreach ($categories as $category_id) {

				$category = $this->model_catalog_category->getCategory($category_id);

				$datainfo['category'] = $category['name'];

				$filter_data = array(
					'filter_category_id'  => $category_id,
					'filter_sub_category' => true,
					'limit'               => (int)$setting['limit'],
					'start'               => 0
				);

				$category_info = $this->model_catalog_product->getProducts($filter_data);

				if ($category_info) {
					$datainfo['products'] = array(); // сбрасываем datainfo['products'] чтобы не было дубликата
					foreach ($category_info as $key => $value) {
 						if ($value['image']) {
							$image = $this->model_tool_image->resize($value['image'], $setting['width'], $setting['height']);
						} else {
							$image = $this->model_tool_image->resize('placeholder.png', $setting['width'], $setting['height']);
						}

						if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
							$price = $this->currency->format($this->tax->calculate($value['price'], $value['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
						} else {
							$price = false;
						}

						if ((float)$value['special']) {
							$special = $this->currency->format($this->tax->calculate($value['special'], $value['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
						} else {
							$special = false;
						}

						$datainfo['products'][] = array(
							'product_id'  => $value['product_id'],
							'thumb'       => $image,
							'name'        => $value['name'],
							'description' => utf8_substr(strip_tags(html_entity_decode($value['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',
							'price'       => $price,
							'special'     => $special,
							'rating'      => $value['rating'],
							'href'        => $this->url->link('product/product', 'product_id=' . $value['product_id'])
						);
					}
				}
				$data['categories'][] = $datainfo;
			}
		}

		if ($data['categories']) {
			return $this->load->view('extension/module/beauty_tab', $data);
		}
	}
}

I got those codes in two different places, maybe even more…

I have them in both modules in admin folder, catalog folder as well. Maybe they are related somehow and when I have deleted the category there is obviously problem with the module… But how I can change those categories?

And If someone is Familiar with coding I WOULD LOVE IF HE EXPLAIN ME how to find the codes for the mobile version, because IF YOU CAN check the site trough the mobile version of www.efekten.com YOU CAN see that the LOGO itself is getting TO CLOSE to the TAB MENU BUTTON? Can this be fixed and how?

Can I make the button bigger for the MOBILE version or somehow separated from the logo, because it’s hard to get in the menu.

Thank you, guys! I love you!

Look for a config file, or a settings area in the UI

Sponsor our Newsletter | Privacy Policy | Terms of Service