result['tax_class_id'], $this->config->get('config_tax')), $result['sembol']); } else { $price = false; $doviz_kur = false; } if ((float)$result['special']) { $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); $doviz_kur2 = $this->currency->format($this->tax->calculate($result['doviz_kur2'], $result['tax_class_id'], $this->config->get('config_tax')), $result['sembol']); } else { $special = false; $doviz_kur2 = false; } if ($this->config->get('config_review_status')) { $rating = (int)$result['rating']; } else { $rating = false; } //code start if((strtotime(date('Y-m-d')) >= strtotime($result['promo_date_start'])) && (strtotime(date('Y-m-d')) <= strtotime($result['promo_date_end'])) || (($result['promo_date_start'] == '0000-00-00') && ($result['promo_date_end'] == '0000-00-00'))) { $promo_on = TRUE; } else { $promo_on = FALSE; } $promo_top_right = $this->model_catalog_product->getPromo($result['product_id'],$result['promo_top_right']); if (!empty($promo_top_right['promo_text']) && $promo_on) { $promo_tag_top_right = ''; } else { $promo_tag_top_right = ''; } $promo_top_left = $this->model_catalog_product->getPromo($result['product_id'],$result['promo_top_left']); if (!empty($promo_top_left['promo_text']) && $promo_on) { $promo_tag_top_left = ''; } else { $promo_tag_top_left = ''; } $promo_bottom_left = $this->model_catalog_product->getPromo($result['product_id'],$result['promo_bottom_left']); if (!empty($promo_bottom_left['promo_text']) && $promo_on) { $promo_tag_bottom_left = ''; } else { $promo_tag_bottom_left = ''; } $promo_bottom_right = $this->model_catalog_product->getPromo($result['product_id'],$result['promo_bottom_right']); if (!empty($promo_bottom_right['promo_text']) && $promo_on) { $promo_tag_bottom_right = ''; } else { $promo_tag_bottom_right = ''; } //code end $this->data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'thumb_swap' => $this->model_tool_image1->resize($images, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')), 'quantity' => $result['quantity'], 'name' => $result['name'], 'price' => $price, 'sembol' => $result['sembol'], 'doviz_kur' => $doviz_kur, 'doviz_kur2' => $doviz_kur2, 'special' => $special, 'saving' => round((($result['price'] - $result['special'])/$result['price'])*100, 0), //code start 'promo_tag_top_right' => $promo_tag_top_right, 'promo_tag_top_left' => $promo_tag_top_left, 'promo_tag_bottom_left' => $promo_tag_bottom_left, 'promo_tag_bottom_right' => $promo_tag_bottom_right, //code end 'rating' => $rating, 'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']), 'href' => $this->url->link('urun-sayfasi', 'product_id=' . $result['product_id']), ); } $this->data['tags'] = array(); $results = $this->model_catalog_product->getProductTags($this->request->get['product_id']); foreach ($results as $result) { $this->data['tags'][] = array( 'tag' => $result['tag'], 'href' => $this->url->link('product/search', 'filter_tag=' . $result['tag']) ); } $this->model_catalog_product->updateViewed($this->request->get['product_id']); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/product.tpl'; } else { $this->template = $this->config->get('config_template') . '/template/product/product.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header', ); $this->response->setOutput($this->render()); } else { $url = ''; if (isset($this->request->get['path'])) { $url .= '&path=' . $this->request->get['path']; } if (isset($this->request->get['manufacturer_id'])) { $url .= '&manufacturer_id=' . $this->request->get['manufacturer_id']; } if (isset($this->request->get['filter_name'])) { $url .= '&filter_name=' . $this->request->get['filter_name']; } if (isset($this->request->get['filter_tag'])) { $url .= '&filter_tag=' . $this->request->get['filter_tag']; } if (isset($this->request->get['filter_description'])) { $url .= '&filter_description=' . $this->request->get['filter_description']; } if (isset($this->request->get['filter_category_id'])) { $url .= '&filter_category_id=' . $this->request->get['filter_category_id']; } $this->data['breadcrumbs'][] = array( 'text' => $this->language->get('text_error'), 'href' => $this->url->link('urun-sayfasi', $url . '&product_id=' . $product_id), 'separator' => $this->language->get('text_separator') ); $this->document->setTitle($this->language->get('text_error')); $this->data['heading_title'] = $this->language->get('text_error'); $this->data['text_error'] = $this->language->get('text_error'); $this->data['button_continue'] = $this->language->get('button_continue'); $this->data['continue'] = $this->url->link('anasayfa'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; } else { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this->response->setOutput($this->render()); } } public function review() { $this->language->load('product/product'); $this->language->load('module/related_options'); $this->load->model('catalog/review'); $this->data['text_no_reviews'] = $this->language->get('text_no_reviews'); if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } $this->data['reviews'] = array(); $review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']); $results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5); foreach ($results as $result) { $this->data['reviews'][] = array( 'author' => $result['author'], 'text' => strip_tags($result['text']), 'rating' => (int)$result['rating'], 'reviews' => sprintf($this->language->get('text_reviews'), (int)$review_total), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])) ); } $pagination = new Pagination(); $pagination->total = $review_total; $pagination->page = $page; $pagination->limit = 5; $pagination->text = $this->language->get('text_pagination'); $pagination->url = $this->url->link('index.php/?ozesbilisim=product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}'); $this->data['pagination'] = $pagination->render(); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/review.tpl'; } else { $this->template = $this->config->get('config_template') . '/template/product/review.tpl'; } $this->response->setOutput($this->render()); } public function write() { $this->language->load('product/product'); $this->language->load('module/related_options'); $this->load->model('catalog/review'); $json = array(); if ((strlen(utf8_decode($this->request->post['name'])) < 3) || (strlen(utf8_decode($this->request->post['name'])) > 25)) { $json['error'] = $this->language->get('error_name'); } if ((strlen(utf8_decode($this->request->post['text'])) < 25) || (strlen(utf8_decode($this->request->post['text'])) > 1000)) { $json['error'] = $this->language->get('error_text'); } if (!$this->request->post['rating']) { $json['error'] = $this->language->get('error_rating'); } if (($this->request->server['REQUEST_METHOD'] == 'POST') && !isset($json['error'])) { $this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post); $json['success'] = $this->language->get('text_success'); } $this->load->library('json'); $this->response->setOutput(Json::encode($json)); } public function captcha() { $this->load->library('captcha'); $captcha = new Captcha(); $this->session->data['captcha'] = $captcha->getCode(); $captcha->showImage(); } public function upload() { $this->language->load('product/product'); $this->language->load('module/related_options'); $json = array(); if (!empty($this->request->files['file']['name'])) { $filename = basename(html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8')); if ((strlen($filename) < 3) || (strlen($filename) > 128)) { $json['error'] = $this->language->get('error_filename'); } $allowed = array(); $filetypes = explode(',', $this->config->get('config_upload_allowed')); foreach ($filetypes as $filetype) { $allowed[] = trim($filetype); } if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) { $json['error'] = $this->language->get('error_filetype'); } if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) { $json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']); } } else { $json['error'] = $this->language->get('error_upload'); } if (($this->request->server['REQUEST_METHOD'] == 'POST') && !isset($json['error'])) { if (is_uploaded_file($this->request->files['file']['tmp_name']) && file_exists($this->request->files['file']['tmp_name'])) { $file = basename($filename) . '.' . md5(rand()); // Hide the uploaded file name sop people can not link to it directly. $this->load->library('encryption'); $encryption = new Encryption($this->config->get('config_encryption')); $json['file'] = $encryption->encrypt($file); move_uploaded_file($this->request->files['file']['tmp_name'], DIR_DOWNLOAD . $file); } $json['success'] = $this->language->get('text_upload'); } $this->response->setOutput(json_encode($json)); } public function question($product_id = null, $page = 1, $ajax = true, $per_page = null) { $this->language->load('product/product'); $this->language->load('module/related_options'); $this->load->model('catalog/qa'); $this->data['text_question'] = $this->language->get('text_question'); $this->data['text_answer'] = $this->language->get('text_answer'); $this->data['text_no_questions'] = $this->language->get('text_no_questions'); $this->data['text_no_answer'] = $this->language->get('text_no_answer'); $this->data['qa_question_author'] = $this->config->get('qa_question_author'); $this->data['qa_question_date'] = $this->config->get('qa_question_date'); $this->data['qa_answer_author'] = $this->config->get('qa_answer_author'); $this->data['qa_answer_date'] = $this->config->get('qa_answer_date'); if ($ajax) { if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } $product_id = $this->request->get['product_id']; } $this->data['qas'] = array(); if (is_null($per_page)) $per_page = (int)$this->config->get('qa_items_per_page'); $results = $this->model_catalog_qa->getQAsByProductId($product_id, ($page - 1) * $per_page, $per_page); foreach ($results as $result) { $this->data['qas'][] = array( 'q_author' => $result['q_author'], 'a_author' => $result['a_author'], 'question' => strip_tags($result['question']), 'answer' => $result['answer'], 'date_asked' => date($this->language->get('date_format_short'), strtotime($result['date_asked'])), 'date_answered' => date($this->language->get('date_format_short'), strtotime($result['date_answered'])) ); } $qa_total = $this->model_catalog_qa->getTotalQAsByProductId($product_id); $pagination = new Pagination(); $pagination->total = $qa_total; $pagination->page = $page; $pagination->limit = ($per_page) ? $per_page : $qa_total; $pagination->text = $this->language->get('text_pagination'); $pagination->url = $this->url->link('index.php/?ozesbilisim=product/product/question', 'product_id=' . $product_id . '&page={page}'); $this->data['pagination'] = $pagination->render(); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/qa.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/qa.tpl'; } else { $this->template = $this->config->get('config_template') . '/template/product/qa.tpl'; } if ($ajax) $this->response->setOutput($this->render()); else return $this->render(); } public function ask() { $this->language->load('product/product'); $this->language->load('module/related_options'); $this->load->model('catalog/qa'); $json = array(); if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateQuestion()) { $this->model_catalog_qa->addQA($this->request->get['product_id'], $this->request->post); $json['success'] = $this->language->get('text_success_question'); } else { $json['error'] = $this->error['message']; } $this->response->setOutput(json_encode($json)); } private function validateQuestion() { if ((strlen(utf8_decode($this->request->post['name'])) < 3) || (strlen(utf8_decode($this->request->post['name'])) > 25)) { $this->error['message'] = $this->language->get('error_q_author'); } if ((strlen(utf8_decode($this->request->post['email'])) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) { $this->error['message'] = $this->language->get('error_q_email'); } if ((strlen(utf8_decode($this->request->post['question'])) < 15) || (strlen(utf8_decode($this->request->post['question'])) > 1000)) { $this->error['message'] = $this->language->get('error_question'); } if (!$this->error) { return true; } else { return false; } } function valid_email($email) { $isValid = true; $atIndex = strrpos($email, "@"); if (is_bool($atIndex) && !$atIndex) { $isValid = false; } else { $domain = substr($email, $atIndex+1); $local = substr($email, 0, $atIndex); $localLen = strlen($local); $domainLen = strlen($domain); if ($localLen < 1 || $localLen > 64) { // local part length exceeded $isValid = false; } else if ($domainLen < 1 || $domainLen > 255) { // domain part length exceeded $isValid = false; } else if ($local[0] == '.' || $local[$localLen-1] == '.') { // local part starts or ends with '.' $isValid = false; } else if (preg_match('/\\.\\./', $local)) { // local part has two consecutive dots $isValid = false; } else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) { // character not valid in domain part $isValid = false; } else if (preg_match('/\\.\\./', $domain)) { // domain part has two consecutive dots $isValid = false; } else if (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\","",$local))) { // character not valid in local part unless // local part is quoted if (!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\","",$local))) { $isValid = false; } } if ($isValid && !(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A"))) { // domain not found in DNS $isValid = false; } } return $isValid; } } ?>
Fatal error: Class 'Controllerproductproduct' not found in /home/wwwcamas/public_html/vqmod/vqcache/vq2-system_engine_front.php on line 47