Links to marketplaces links2marketplaces 1.0.0 05.08.2024 Kuzmichev Ruslan http://kuzmichev.pw error['name'])) { ]]> config->get('module_links_to_marketplaces_status'); $data['module_links_to_marketplaces'] = $this->config->get('module_links_to_marketplaces'); if (isset($this->error['url_ozon'])) { $data['error_url_ozon'] = $this->error['url_ozon']; } else { $data['error_url_ozon'] = array(); } if (isset($this->error['url_wildberries'])) { $data['error_url_wildberries'] = $this->error['url_wildberries']; } else { $data['error_url_wildberries'] = array(); } if (isset($this->error['url_yandex_market'])) { $data['error_url_yandex_market'] = $this->error['url_yandex_market']; } else { $data['error_url_yandex_market'] = array(); } if (isset($this->error['url_megamarket'])) { $data['error_url_megamarket'] = $this->error['url_megamarket']; } else { $data['error_url_megamarket'] = array(); } ]]> request->post['model'])) { ]]> request->post['url_ozon'])) { $data['url_ozon'] = $this->request->post['url_ozon']; } elseif (!empty($product_info)) { $data['url_ozon'] = $product_info['url_ozon']; } else { $data['url_ozon'] = ''; } if (isset($this->request->post['url_wildberries'])) { $data['url_wildberries'] = $this->request->post['url_wildberries']; } elseif (!empty($product_info)) { $data['url_wildberries'] = $product_info['url_wildberries']; } else { $data['url_wildberries'] = ''; } if (isset($this->request->post['url_yandex_market'])) { $data['url_yandex_market'] = $this->request->post['url_yandex_market']; } elseif (!empty($product_info)) { $data['url_yandex_market'] = $product_info['url_yandex_market']; } else { $data['url_yandex_market'] = ''; } if (isset($this->request->post['url_megamarket'])) { $data['url_megamarket'] = $this->request->post['url_megamarket']; } elseif (!empty($product_info)) { $data['url_megamarket'] = $product_info['url_megamarket']; } else { $data['url_megamarket'] = ''; } ]]> error && !isset($this->error['warning'])) { ]]> request->post['url_ozon']) && !preg_match($url_pattern, $this->request->post['url_ozon'])) { $this->error['url_ozon'] = $this->language->get('error_invalid_url'); } if (!empty($this->request->post['url_wildberries']) && !preg_match($url_pattern, $this->request->post['url_wildberries'])) { $this->error['url_wildberries'] = $this->language->get('error_invalid_url'); } if (!empty($this->request->post['url_yandex_market']) && !preg_match($url_pattern, $this->request->post['url_yandex_market'])) { $this->error['url_yandex_market'] = $this->language->get('error_invalid_url'); } if (!empty($this->request->post['url_megamarket']) && !preg_match($url_pattern, $this->request->post['url_megamarket'])) { $this->error['url_megamarket'] = $this->language->get('error_invalid_url'); } ]]> db->query("UPDATE ". DB_PREFIX . "product SET url_ozon = '" . $this->db->escape($data['url_ozon']) . "', url_wildberries = '" . $this->db->escape($data['url_wildberries']) . "', url_yandex_market = '" . $this->db->escape($data['url_yandex_market']) . "', url_megamarket = '" . $this->db->escape($data['url_megamarket']) . "' WHERE product_id = '" . (int)$product_id . "'"); } ]]> ]]> {{ entry_links_to_marketplace }} {% if module_links_to_marketplaces.ozon.show %}
{% if error_url_ozon %}
{{ error_url_ozon }}
{% endif %}
{% endif %} {% if module_links_to_marketplaces.wildberries.show %}
{% if error_url_wildberries %}
{{ error_url_wildberries }}
{% endif %}
{% endif %} {% if module_links_to_marketplaces.yandex_market.show %}
{% if error_url_yandex_market %}
{{ error_url_yandex_market }}
{% endif %}
{% endif %} {% if module_links_to_marketplaces.megamarket.show %}
{% if error_url_megamarket %}
{{ error_url_megamarket }}
{% endif %}
{% endif %} {% endif %} {% endif %} ]]>
load->controller('common/column_left'); ]]> document->addStyle('catalog/view/theme/default/stylesheet/links_to_marketplaces.css'); ]]> response->setOutput($this->load->view('product/product', $data)); ]]> model_tool_image->resize('no_image.png', 100, 100); $data['url_ozon'] = !empty($product_info['url_ozon']) ? $product_info['url_ozon'] : ''; $data['url_wildberries'] = !empty($product_info['url_wildberries']) ? $product_info['url_wildberries'] : ''; $data['url_yandex_market'] = !empty($product_info['url_yandex_market']) ? $product_info['url_yandex_market'] : ''; $data['url_megamarket'] = !empty($product_info['url_megamarket']) ? $product_info['url_megamarket'] : ''; $data['module_links_to_marketplaces_status'] = $this->config->get('module_links_to_marketplaces_status'); $data['module_links_to_marketplaces'] = $this->config->get('module_links_to_marketplaces'); if (!empty($data['module_links_to_marketplaces']) && count($data['module_links_to_marketplaces'])) { foreach($data['module_links_to_marketplaces'] as $key => $linkData) { if (!empty($data['module_links_to_marketplaces'][$key]['image'])) { $data['module_links_to_marketplaces'][$key]['thumb'] = $this->model_tool_image->resize($data['module_links_to_marketplaces'][$key]['image'], $data['module_links_to_marketplaces']['icon']['width'], $data['module_links_to_marketplaces']['icon']['height']); } else { $data['module_links_to_marketplaces'][$key]['thumb'] = $data['placeholder']; } } } ]]> $query->row['date_modified'], ]]> $query->row['url_ozon'], 'url_wildberries' => $query->row['url_wildberries'], 'url_yandex_market' => $query->row['url_yandex_market'], 'url_megamarket' => $query->row['url_megamarket'], ]]> ]]> {% if module_links_to_marketplaces.ozon.show and url_ozon %}
{% endif %} {% if module_links_to_marketplaces.wildberries.show and url_wildberries %}
{% endif %} {% if module_links_to_marketplaces.yandex_market.show and url_yandex_market %}
{% endif %} {% if module_links_to_marketplaces.megamarket.show and url_megamarket %}
{% endif %} {% endif %} {% endif %} ]]>