Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Sheedy

Користувачі
  
  • Публікації

    98
  • З нами

  • Відвідування

Усі публікації користувача Sheedy

  1. хм, а почта реально не работает, хорошо, отпишусь А почта разве связана с комментариями ?
  2. https://snabzhenec.zp.ua/zapchasti_k_traktoram/zapchasti_yumz/kpp_i_zadnij_most_umz/differencial_40_2403010.html
  3. <?php class ControllerProductProduct extends Controller { private $error = array(); public function index() { $this->load->language('product/product'); $data['breadcrumbs'] = array(); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home') ); $this->load->model('catalog/category'); if (isset($this->request->get['path'])) { $path = ''; $parts = explode('_', (string)$this->request->get['path']); $category_id = (int)array_pop($parts); foreach ($parts as $path_id) { if (!$path) { $path = $path_id; } else { $path .= '_' . $path_id; } $category_info = $this->model_catalog_category->getCategory($path_id); if ($category_info) { $data['breadcrumbs'][] = array( 'text' => $category_info['name'], 'href' => $this->url->link('product/category', 'path=' . $path) ); } } // Set the last category breadcrumb $category_info = $this->model_catalog_category->getCategory($category_id); if ($category_info) { $url = ''; if (isset($this->request->get['sort'])) { $url .= '&sort=' . $this->request->get['sort']; } if (isset($this->request->get['order'])) { $url .= '&order=' . $this->request->get['order']; } if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } if (isset($this->request->get['limit'])) { $url .= '&limit=' . $this->request->get['limit']; } $data['breadcrumbs'][] = array( 'text' => $category_info['name'], 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url) ); } } $this->load->model('catalog/manufacturer'); if (isset($this->request->get['manufacturer_id'])) { $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_brand'), 'href' => $this->url->link('product/manufacturer') ); $url = ''; if (isset($this->request->get['sort'])) { $url .= '&sort=' . $this->request->get['sort']; } if (isset($this->request->get['order'])) { $url .= '&order=' . $this->request->get['order']; } if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } if (isset($this->request->get['limit'])) { $url .= '&limit=' . $this->request->get['limit']; } $manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($this->request->get['manufacturer_id']); if ($manufacturer_info) { $data['breadcrumbs'][] = array( 'text' => $manufacturer_info['name'], 'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url) ); } } if (isset($this->request->get['search']) || isset($this->request->get['tag'])) { $url = ''; if (isset($this->request->get['search'])) { $url .= '&search=' . $this->request->get['search']; } if (isset($this->request->get['tag'])) { $url .= '&tag=' . $this->request->get['tag']; } if (isset($this->request->get['description'])) { $url .= '&description=' . $this->request->get['description']; } if (isset($this->request->get['category_id'])) { $url .= '&category_id=' . $this->request->get['category_id']; } if (isset($this->request->get['sub_category'])) { $url .= '&sub_category=' . $this->request->get['sub_category']; } if (isset($this->request->get['sort'])) { $url .= '&sort=' . $this->request->get['sort']; } if (isset($this->request->get['order'])) { $url .= '&order=' . $this->request->get['order']; } if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } if (isset($this->request->get['limit'])) { $url .= '&limit=' . $this->request->get['limit']; } $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_search'), 'href' => $this->url->link('product/search', $url) ); } if (isset($this->request->get['product_id'])) { $product_id = (int)$this->request->get['product_id']; } else { $product_id = 0; } $this->load->model('catalog/product'); $product_info = $this->model_catalog_product->getProduct($product_id); if ($product_info) { $url = ''; if (isset($this->request->get['path'])) { $url .= '&path=' . $this->request->get['path']; } if (isset($this->request->get['filter'])) { $url .= '&filter=' . $this->request->get['filter']; } if (isset($this->request->get['manufacturer_id'])) { $url .= '&manufacturer_id=' . $this->request->get['manufacturer_id']; } if (isset($this->request->get['search'])) { $url .= '&search=' . $this->request->get['search']; } if (isset($this->request->get['tag'])) { $url .= '&tag=' . $this->request->get['tag']; } if (isset($this->request->get['description'])) { $url .= '&description=' . $this->request->get['description']; } if (isset($this->request->get['category_id'])) { $url .= '&category_id=' . $this->request->get['category_id']; } if (isset($this->request->get['sub_category'])) { $url .= '&sub_category=' . $this->request->get['sub_category']; } if (isset($this->request->get['sort'])) { $url .= '&sort=' . $this->request->get['sort']; } if (isset($this->request->get['order'])) { $url .= '&order=' . $this->request->get['order']; } if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } if (isset($this->request->get['limit'])) { $url .= '&limit=' . $this->request->get['limit']; } $data['breadcrumbs'][] = array( 'text' => $product_info['name'], 'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id']) ); if ($product_info['meta_title']) { $this->document->setTitle($product_info['meta_title']); } else { $this->document->setTitle($product_info['name']); } $this->document->setDescription($product_info['meta_description']); $this->document->setKeywords($product_info['meta_keyword']); $this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical'); $this->document->addScript('catalog/view/javascript/jquery/magnific/jquery.magnific-popup.min.js'); $this->document->addStyle('catalog/view/javascript/jquery/magnific/magnific-popup.css'); $this->document->addScript('catalog/view/javascript/jquery/datetimepicker/moment.js'); $this->document->addScript('catalog/view/javascript/jquery/datetimepicker/locale/'.$this->session->data['language'].'.js'); $this->document->addScript('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js'); $this->document->addStyle('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css'); if ($product_info['meta_h1']) { $data['heading_title'] = $product_info['meta_h1']; } else { $data['heading_title'] = $product_info['name']; } $data['text_select'] = $this->language->get('text_select'); $data['text_manufacturer'] = $this->language->get('text_manufacturer'); $data['text_model'] = $this->language->get('text_model'); $data['text_reward'] = $this->language->get('text_reward'); $data['text_points'] = $this->language->get('text_points'); $data['text_stock'] = $this->language->get('text_stock'); $data['text_discount'] = $this->language->get('text_discount'); $data['text_tax'] = $this->language->get('text_tax'); $data['text_option'] = $this->language->get('text_option'); $data['text_minimum'] = sprintf($this->language->get('text_minimum'), $product_info['minimum']); $data['text_write'] = $this->language->get('text_write'); $data['text_login'] = sprintf($this->language->get('text_login'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL')); $data['text_note'] = $this->language->get('text_note'); $data['text_tags'] = $this->language->get('text_tags'); $data['text_related'] = $this->language->get('text_related'); $data['text_payment_recurring'] = $this->language->get('text_payment_recurring'); $data['text_loading'] = $this->language->get('text_loading'); $data['entry_qty'] = $this->language->get('entry_qty'); $data['entry_name'] = $this->language->get('entry_name'); $data['entry_review'] = $this->language->get('entry_review'); $data['entry_rating'] = $this->language->get('entry_rating'); $data['entry_good'] = $this->language->get('entry_good'); $data['entry_bad'] = $this->language->get('entry_bad'); $data['button_cart'] = $this->language->get('button_cart'); $data['button_wishlist'] = $this->language->get('button_wishlist'); $data['button_compare'] = $this->language->get('button_compare'); $data['button_upload'] = $this->language->get('button_upload'); $data['button_continue'] = $this->language->get('button_continue'); $data['compare'] = $this->url->link('product/compare'); $this->load->model('catalog/review'); $data['tab_description'] = $this->language->get('tab_description'); $data['tab_attribute'] = $this->language->get('tab_attribute'); $data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']); $data['product_id'] = (int)$this->request->get['product_id']; $data['manufacturer'] = $product_info['manufacturer']; $data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']); $data['model'] = $product_info['model']; $data['reward'] = $product_info['reward']; $data['points'] = $product_info['points']; $data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8'); if ($product_info['quantity'] <= 0) { $data['stock'] = $product_info['stock_status']; } elseif ($this->config->get('config_stock_display')) { $data['stock'] = $product_info['quantity']; } else { $data['stock'] = $this->language->get('text_instock'); } $this->load->model('tool/image'); if ($product_info['image']) { $data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')); } else { $data['popup'] = $this->model_tool_image->resize('no_image.png', $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));; } if ($product_info['image']) { $data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')); $this->document->setOgImage($data['thumb']); } else { $data['thumb'] = $this->model_tool_image->resize('no_image.png', $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')); } $data['images'] = array(); $results = $this->model_catalog_product->getProductImages($this->request->get['product_id']); foreach ($results as $result) { $data['images'][] = array( 'popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')), 'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')) ); } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))); } else { $data['price'] = false; } if ((float)$product_info['special']) { $data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax'))); } else { $data['special'] = false; } if ($this->config->get('config_tax')) { $data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']); } else { $data['tax'] = false; } $discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']); $data['discounts'] = array(); foreach ($discounts as $discount) { $data['discounts'][] = array( 'quantity' => $discount['quantity'], 'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) ); } $data['options'] = array(); foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) { $product_option_value_data = array(); foreach ($option['product_option_value'] as $option_value) { if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) { if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) { $price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax') ? 'P' : false)); } else { $price = false; } $product_option_value_data[] = array( 'product_option_value_id' => $option_value['product_option_value_id'], 'option_value_id' => $option_value['option_value_id'], 'name' => $option_value['name'], 'image' => $this->model_tool_image->resize($option_value['image'], 50, 50), 'price' => $price, 'price_prefix' => $option_value['price_prefix'] ); } } $data['options'][] = array( 'product_option_id' => $option['product_option_id'], 'product_option_value' => $product_option_value_data, 'option_id' => $option['option_id'], 'name' => $option['name'], 'type' => $option['type'], 'value' => $option['value'], 'required' => $option['required'] ); } if ($product_info['minimum']) { $data['minimum'] = $product_info['minimum']; } else { $data['minimum'] = 1; } $data['review_status'] = $this->config->get('config_review_status'); if ($this->config->get('config_review_guest') || $this->customer->isLogged()) { $data['review_guest'] = true; } else { $data['review_guest'] = false; } if ($this->customer->isLogged()) { $data['customer_name'] = $this->customer->getFirstName() . '&nbsp;' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; } $data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']); $data['rating'] = (int)$product_info['rating']; // Captcha if ($this->config->get($this->config->get('config_captcha') . '_status') && in_array('review', (array)$this->config->get('config_captcha_page'))) { $data['captcha'] = $this->load->controller('captcha/' . $this->config->get('config_captcha')); } else { $data['captcha'] = ''; } $data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']); $data['products'] = array(); $results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']); foreach ($results as $result) { if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height')); } else { $image = $this->model_tool_image->resize('placeholder.png', $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height')); } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $price = false; } if ((float)$result['special']) { $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $special = false; } if ($this->config->get('config_tax')) { $tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']); } else { $tax = false; } if ($this->config->get('config_review_status')) { $rating = (int)$result['rating']; } else { $rating = false; } $data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('config_product_description_length')) . '..', 'price' => $price, 'special' => $special, 'tax' => $tax, 'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1, 'rating' => $rating, 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']) ); } $data['tags'] = array(); if ($product_info['tag']) { $tags = explode(',', $product_info['tag']); foreach ($tags as $tag) { $data['tags'][] = array( 'tag' => trim($tag), 'href' => $this->url->link('product/search', 'tag=' . trim($tag)) ); } } $data['recurrings'] = $this->model_catalog_product->getProfiles($this->request->get['product_id']); $this->model_catalog_product->updateViewed($this->request->get['product_id']); $data['column_left'] = $this->load->controller('common/column_left'); $data['column_right'] = $this->load->controller('common/column_right'); $data['content_top'] = $this->load->controller('common/content_top'); $data['content_bottom'] = $this->load->controller('common/content_bottom'); $data['footer'] = $this->load->controller('common/footer'); $data['header'] = $this->load->controller('common/header'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) { $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/product.tpl', $data)); } else { $this->response->setOutput($this->load->view('default/template/product/product.tpl', $data)); } } else { $url = ''; if (isset($this->request->get['path'])) { $url .= '&path=' . $this->request->get['path']; } if (isset($this->request->get['filter'])) { $url .= '&filter=' . $this->request->get['filter']; } if (isset($this->request->get['manufacturer_id'])) { $url .= '&manufacturer_id=' . $this->request->get['manufacturer_id']; } if (isset($this->request->get['search'])) { $url .= '&search=' . $this->request->get['search']; } if (isset($this->request->get['tag'])) { $url .= '&tag=' . $this->request->get['tag']; } if (isset($this->request->get['description'])) { $url .= '&description=' . $this->request->get['description']; } if (isset($this->request->get['category_id'])) { $url .= '&category_id=' . $this->request->get['category_id']; } if (isset($this->request->get['sub_category'])) { $url .= '&sub_category=' . $this->request->get['sub_category']; } if (isset($this->request->get['sort'])) { $url .= '&sort=' . $this->request->get['sort']; } if (isset($this->request->get['order'])) { $url .= '&order=' . $this->request->get['order']; } if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } if (isset($this->request->get['limit'])) { $url .= '&limit=' . $this->request->get['limit']; } $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_error'), 'href' => $this->url->link('product/product', $url . '&product_id=' . $product_id) ); $this->document->setTitle($this->language->get('text_error')); $data['heading_title'] = $this->language->get('text_error'); $data['text_error'] = $this->language->get('text_error'); $data['button_continue'] = $this->language->get('button_continue'); $data['continue'] = $this->url->link('common/home'); $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); $data['column_left'] = $this->load->controller('common/column_left'); $data['column_right'] = $this->load->controller('common/column_right'); $data['content_top'] = $this->load->controller('common/content_top'); $data['content_bottom'] = $this->load->controller('common/content_bottom'); $data['footer'] = $this->load->controller('common/footer'); $data['header'] = $this->load->controller('common/header'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/error/not_found.tpl', $data)); } else { $this->response->setOutput($this->load->view('default/template/error/not_found.tpl', $data)); } } } public function review() { $this->load->language('product/product'); $this->load->model('catalog/review'); $data['text_no_reviews'] = $this->language->get('text_no_reviews'); if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } $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) { $data['reviews'][] = array( 'author' => $result['author'], 'text' => nl2br($result['text']), 'rating' => (int)$result['rating'], '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->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}'); $data['pagination'] = $pagination->render(); $data['results'] = sprintf($this->language->get('text_pagination'), ($review_total) ? (($page - 1) * 5) + 1 : 0, ((($page - 1) * 5) > ($review_total - 5)) ? $review_total : ((($page - 1) * 5) + 5), $review_total, ceil($review_total / 5)); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/review.tpl')) { $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/review.tpl', $data)); } else { $this->response->setOutput($this->load->view('default/template/product/review.tpl', $data)); } } public function write() { $this->load->language('product/product'); $json = array(); if ($this->request->server['REQUEST_METHOD'] == 'POST') { if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 25)) { $json['error'] = $this->language->get('error_name'); } if ((utf8_strlen($this->request->post['text']) < 25) || (utf8_strlen($this->request->post['text']) > 1000)) { $json['error'] = $this->language->get('error_text'); } if (empty($this->request->post['rating']) || $this->request->post['rating'] < 0 || $this->request->post['rating'] > 5) { $json['error'] = $this->language->get('error_rating'); } // Captcha if ($this->config->get($this->config->get('config_captcha') . '_status') && in_array('review', (array)$this->config->get('config_captcha_page'))) { $captcha = $this->load->controller('captcha/' . $this->config->get('config_captcha') . '/validate'); if ($captcha) { $json['error'] = $captcha; } } if (!isset($json['error'])) { $this->load->model('catalog/review'); $this->model_catalog_review->addReview($this->request->get['product_id'], $this->request->post); $json['success'] = $this->language->get('text_success'); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function getRecurringDescription() { $this->language->load('product/product'); $this->load->model('catalog/product'); if (isset($this->request->post['product_id'])) { $product_id = $this->request->post['product_id']; } else { $product_id = 0; } if (isset($this->request->post['recurring_id'])) { $recurring_id = $this->request->post['recurring_id']; } else { $recurring_id = 0; } if (isset($this->request->post['quantity'])) { $quantity = $this->request->post['quantity']; } else { $quantity = 1; } $product_info = $this->model_catalog_product->getProduct($product_id); $recurring_info = $this->model_catalog_product->getProfile($product_id, $recurring_id); $json = array(); if ($product_info && $recurring_info) { if (!$json) { $frequencies = array( 'day' => $this->language->get('text_day'), 'week' => $this->language->get('text_week'), 'semi_month' => $this->language->get('text_semi_month'), 'month' => $this->language->get('text_month'), 'year' => $this->language->get('text_year'), ); if ($recurring_info['trial_status'] == 1) { $price = $this->currency->format($this->tax->calculate($recurring_info['trial_price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax'))); $trial_text = sprintf($this->language->get('text_trial_description'), $price, $recurring_info['trial_cycle'], $frequencies[$recurring_info['trial_frequency']], $recurring_info['trial_duration']) . ' '; } else { $trial_text = ''; } $price = $this->currency->format($this->tax->calculate($recurring_info['price'] * $quantity, $product_info['tax_class_id'], $this->config->get('config_tax'))); if ($recurring_info['duration']) { $text = $trial_text . sprintf($this->language->get('text_payment_description'), $price, $recurring_info['cycle'], $frequencies[$recurring_info['frequency']], $recurring_info['duration']); } else { $text = $trial_text . sprintf($this->language->get('text_payment_cancel'), $price, $recurring_info['cycle'], $frequencies[$recurring_info['frequency']], $recurring_info['duration']); } $json['success'] = $text; } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } }
  4. Доброй ночи! Версия ocStore 2.1.0.2.1 Шаблон свой, делал верстку, потом натяжку по примеру дефолтного шаблона. На странице товара, не могу вывести уведомление об отправке комментария и при нажатие на кнопку "Продолжить" пишет Загрузка... и больше ничего, поля также не сбрасываются, но в админку приходят коменты для модерации. На дефолтном шаблоне тоже не работает... $('#review').delegate('.pagination a', 'click', function(e) { e.preventDefault(); $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); }); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').on('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: $("#form-review").serialize(), beforeSend: function() { $('#button-review').button('loading'); }, complete: function() { $('#button-review').button('reset'); }, success: function(json) { $('.alert-success, .alert-danger').remove(); if (json['error']) { $('#revie').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').after('<div class="alert alert-success"><i class="fa fa-check-circle"></i> ' + json['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').prop('checked', false); } } }); }); <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form class="form-horizontal" id="form-review"> <div id="review"></div> <h2><?php echo $text_write; ?></h2> <?php if ($review_guest) { ?> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label" for="input-name"><?php echo $entry_name; ?></label> <input type="text" name="name" value="" id="input-name" class="form-control" /> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label" for="input-review"><?php echo $entry_review; ?></label> <textarea name="text" rows="5" id="input-review" class="form-control"></textarea> <div class="help-block"><?php echo $text_note; ?></div> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> &nbsp;&nbsp;&nbsp; <?php echo $entry_bad; ?>&nbsp; <input type="radio" name="rating" value="1" /> &nbsp; <input type="radio" name="rating" value="2" /> &nbsp; <input type="radio" name="rating" value="3" /> &nbsp; <input type="radio" name="rating" value="4" /> &nbsp; <input type="radio" name="rating" value="5" /> &nbsp;<?php echo $entry_good; ?> </div> </div> <?php echo $captcha; ?> <div class="buttons clearfix"> <div class="pull-right"> <button type="button" id="button-review" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary"><?php echo $button_continue; ?></button> </div> </div> <?php } else { ?> <?php echo $text_login; ?> <?php } ?> </form> </div> <?php } ?>
  5. Добрый вечер! Версия ocStore 2.1.0.2.1 Шаблон свой, делал верстку, потом натяжку по примеру дефолтного шаблона. Такая проблема, не работает кнопка "В корзину" на странице товара, при нажатие выдает "Загрузка..." и больше ничего... Ссылка на сайт: https://snabzhenec.zp.ua/zapchasti_k_traktoram/zapchasti_yumz/kpp_i_zadnij_most_umz/differencial_40_2403010.html <div class="section-buy"> <div class="add-to-cart"> <div class="coint-product"> <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity-num" /> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <div class="arrow-coint"> <i id="up-product" class="fas fa-sort-up"></i> <i id="down-product" class="fas fa-sort-down"></i> </div> </div> <button type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary btn-lg btn-block"><?php echo $button_cart; ?></button> </div> <?php if ($minimum > 1) { ?> <div class="alert alert-info"><i class="fa fa-info-circle"></i> <?php echo $text_minimum; ?></div> <?php } ?> <div class="fast-add-to-cart"> <button type="button" data-toggle="tooltip" class="comparisons btn-default" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product_id; ?>');"><i class="fas fa-exchange-alt"></i></button> </div> </div> <script type="text/javascript"><!-- $('#button-cart').on('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'), dataType: 'json', beforeSend: function() { $('#button-cart').button('loading'); }, complete: function() { $('#button-cart').button('reset'); }, success: function(json) { $('.alert, .text-danger').remove(); $('.add-to-cart').removeClass('has-error'); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { var element = $('#input-option' + i.replace('_', '-')); if (element.parent().hasClass('input-group')) { element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } else { element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } } } if (json['error']['recurring']) { $('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>'); } // Highlight any found errors $('.text-danger').parent().addClass('has-error'); } if (json['success']) { $('#content').after('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>'); $('#cart > div').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart > ul').load('index.php?route=common/cart/info ul li'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); //--> </script>
  6. Добрый вечер! Нужна помощь, есть такая проблема, на первой странице всё в порядке, а дальше идет такая вот фигня. Что делать не знаю, подскажите пожалуйста. Ссылка на сайт: https://axk.com.ua/zasobi-zahistu-roslin/?page=3
  7. Разобрался, я изначально всё делал правильно, но не показывало, потому что нужно было обновить кэш модификатора , а так как вылетала ошибка, я проверить форму не мог. В общем сравнил два файлика на которых жалуется, один перед обновление кэша, воторой после, и сделал как нужно.
  8. Странно очень, ведь категории, которые я отдельно добавлял как в хедер так и футер, отлично работают, а с формой проблемы и шо делать? шаблон so-funi, ещё при обновление кэша модификаторов вылетает ошибка, не верный синтаксис. Это может всё быть связанно? private function getLayoutPath($categoryID) { $sql_query = " SELECT route FROM " . DB_PREFIX . "layout_route INNER JOIN " . DB_PREFIX . "category_to_layout ON " . DB_PREFIX . "layout_route.layout_id = " . DB_PREFIX . "category_to_layout.layout_id WHERE " . DB_PREFIX . "category_to_layout.category_id = " . (int) $categoryID . " AND " . DB_PREFIX . "category_to_layout.store_id = '" . (int) $this->config->get('config_store_id') . "'"; $query = $this->db->query($sql_query); if ($query->num_rows) { return $query->row['route']; } else { return 'product/category'; } }
  9. всё там правильно, вот ошкибка, просто не видно полностью <input required="" type="text" class="send-field" name="name" placeholder="<b>Notice</b>: Undefined variable: name_header in <b>/home/yl322963/mertenshop.com.ua/www/catalog/view/theme/so-funi/template/header/header1.tpl</b> on line <b>83</b>" value="" id="name">
  10. Получается вот что. $data['name_header'] = $this->language->get('name_header'); $data['phone_header'] = $this->language->get('phone_header'); $data['send_header'] = $this->language->get('send_header'); Это вставил в контролер хедера, так как форма находится в хедере. <div class="form-group"> <input required type="text" class="send-field" name="name" placeholder="<?php echo $name_header; ?>" value="" id="name"> </div> <div class="form-group"> <input required type="text" placeholder="<?php echo $phone_header; ?>" value="" id="phone" name="phone" class="send-field phone"> </div> <div class="form-submit"> <input type="submit" value="<?php echo $send_header; ?>" class="submit-button send-field" name="callback_submit" id="ret" onclick="registr()"> <div class="results1"></div>
  11. делал так, не работает, мне нужно надписи в инпуте перевести
  12. Добрый вечер! Версия ocStore 2.3 Сделал форму, всё работает, но я не знаю как перевести на укр язык. Прописал переменные, но в контролере именно куда и что прописать, я не могу понять. Не подскажите?
  13. А есть документация по встроенной библиотеке, а то нужно разобраться сначала)
  14. Добрый вечер! Сайт: https://mertenshop.com.ua Ostore 2.3 Сделал форму для быстрого заказа, но не получается отправить данные на почту. Помогите новичку, пожалуйста! Работает скрипт открытие и закрытие popup окошока, а с отправкой письма на почту не выходит. Я не могу понять, где проблема, потому что отдельно от всего сайта всё работает и приходит (https://mertenshop.com.ua/test/html-form.html) , а в шапке сайта ничего не происходит ( <div class="callback-request"> <div class="callback-button" rel="popup1"> Заказать звонок </div> <!--POPUP--> <div class="overlay_popup"></div> <div class="popup-container"id="popup1"> <form class="callback-form" id="callback-form" name="callback-form"> <div class="form-row"> <label class="name-icon" for="name"></label> <input type="text" class="send-field" name="name" placeholder="Ваше имя" value="" id="name"> </div> <div class="form-row"> <label class="phone-icon" for="phone"></label> <input type="text" placeholder="Ваш телефон" value="" id="phone" name="phone" class="send-field phone"> </div> <div class="form-submit"> <input type="submit" value="заказать" class="submit-button send-field" name="callback_submit"> <div class="results1"></div> <div class="popup-form-preload"></div> </form> </div> </div> <div class="popup-result"> <div class="close">+</div> <div class="popup-result-content">Ваш запрос успешно отправлен!</div> </div> <!--POPUP--> </div> <?php $recepient = "[email protected]"; $siteName = "Ajax-форма"; $name = trim($_POST["name"]); $phone = trim($_POST["phone"]); $message = "Имя: $name \nТелефон: $phone"; $pagetitle = "Заявка с сайта \"$siteName\""; mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\"\n From: $recepient"); ?> //открыть и закрыть popup $('.callback-button').click(function() { var popup_id = $('#' + $(this).attr("rel")); $(popup_id).show(); $('.overlay_popup').show(); }) $('.overlay_popup').click(function() { $('.overlay_popup, .popup-container').hide(); }) // Отправка заявки $(document).ready(function() { $('#callback-form').submit(function() { // проверка на пустоту заполненных полей. Атрибут html5 — required не подходит (не поддерживается Safari) if (document.form.name.value == '' || document.form.phone.value == '' ) { valid = false; return valid; } $.ajax({ type: "POST", url: "/formpopup/mail.php", data: $(this).serialize() }).done(function() { $(this).find('input').val(''); $('#callback-form').trigger('reset'); }); return false; }); }); /* // Закрыть попап «спасибо» $('.close').click(function() { // по клику на крестик $('.popup-result').fadeOut(); }); $(document).mouseup(function (e) { // по клику вне попапа var popup = $('.popup'); if (e.target!=popup[0]&&popup.has(e.target).length === 0){ $('.popup-result').fadeOut(); } });*/ // Маска ввода номера телефона (плагин maskedinput) $(function($){ $('[name="phone"]').mask("+38(999) 999-9999"); });
  15. Добрый вечер, форумчане, у меня проблема с адаптивностью меню, уже как не игрался с настройками не получается сделать. В пк версии всё норм: Но с телефона и планшета такая бяка
  16. Я нашел где добавляются картинки брендов. Сначала добавляем производителя в Каталог->Производитель. После в карточке товара переходим в вкладку "Связь" и там будет поле "Производитель" где пишем название бренда.
  17. ок, если ручками самому делать, то в каком файле это искать?
  18. Добрый день! Нужна помощь. Версия опенкарт 1.5.6.4 мне нужно добавить картинки Бренда, как на скриншоте, я не могу понять где это добавляется в админе, не подскажите пожалуйста.
  19. Здравствуйте, помогите, у меня версия опенкарт 3.0.2.0, я не знаю где отключить "расчет стоимость доставки"

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.