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

Помогите с Additonal Tab


Recommended Posts

http://www.opencart....tension_id=2376

Купил вот такую шнягу. установил шняга якобы заработала!!! вот результат!!!

ИзображениеНазвал одну (В комплекте) вторую (Видео) всё как бы шикарно работает!!! но есть одно НО!!!

походу перестал работать vqmod и фильтры не отоброжают помощ. тоесть когда пишешь в фильтре какуето букву раньше он выдавал все что начинается на эту букву, теперь нет :(( помогите пожалуйста!!!

я сам этот модуль хоть просто так выставлю на сайт!!!!

Надіслати
Поділитися на інших сайтах


в каком фильтре? Как устанавливалось? Какие файлы затрагивались... Как на бум помогать??

сейчас скину. меняет он много файлов скорей всего просто надо было выдернуть каждый код по одельности и вставлять в ручную..... а я всё сделал с заменой!!!

Вложил скрипт!!!

вот скрин примера фильтра!!

Изображение

Вот когда в фильтре название товара нажимаешь букву должны идти подсказки товаров которые есть!! а ничего не происходит!!!

additonaltab.zip

Надіслати
Поділитися на інших сайтах


ну так все правильно... заменой не надо было делать... надо было добавить ручками...

хорошо что бэкап сделал, ну завтра на работе буду уже сидеть и по кусочкам разберать этот скрипт!!! когда всё разберу и протестирую выложу инструкцию вдруг комуто пригодится!!! там всеравно есть что ещё доробатовать!!!!
Надіслати
Поділитися на інших сайтах


И так инструкция как это сделать в ручную... только есть один косяк который я пропустил!!! почему он скрипт залез в Строку

ИзображениеИ так вот инстукция, языки я не вводил!!!! это для меня не главное!!!!

В admincontrollercatalogproduct.php

После

$this->data['entry_layout'] = $this->language->get('entry_layout');
Добовляем

// herman
$this->data['entry_features'] = $this->language->get('entry_features');
$this->data['entry_additional'] = $this->language->get('entry_additional');
После

  foreach ($products as $product_id) {
   $related_info = $this->model_catalog_product->getProduct($product_id);
  
   if ($related_info) {
    $this->data['product_related'][] = array(
	 'product_id' => $related_info['product_id'],
	 'name'	   => $related_info['name']
    );
   }
  }
Добовляем

// herman
 
  $this->data['product_additional'] = array();
 
   $related_info = $this->model_catalog_product->getProductAdditional($this->request->get['product_id']);
   if($related_info){
    $this->data['product_additional'] = array(
	 'product_id' => $related_info['product_id'],
	 'features'	   => $related_info['features'],
	 'additions'	   => $related_info['additions']
    );
   }else{
    $this->data['product_additional'] = array(
	 'product_id' => $this->request->get['product_id'],
	 'features'	   =>'',
	 'additions'	   => ''
    );
   }
В adminmodelcatalogproduct.php

После

$product_id = $this->db->getLastId();
Добовляем

  // additional
// by yusuf hermanto
$this->db->query("DELETE FROM " . DB_PREFIX . "product_addition WHERE product_id = '" . (int)$product_id . "'");
$sql  = "insert into " . DB_PREFIX . "product_addition (product_id,features,additions)values('". (int)$product_id . "','".$this->db->escape($data['product_features'])."','".$this->db->escape($data['product_additional'])."')";
$this->db->query($sql);
//////
После

public function editProduct($product_id, $data) {
  $this->db->query("UPDATE " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . (int)$data['tax_class_id'] . "', sort_order = '" . (int)$data['sort_order'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");
Добовляем

// additional
// by yusuf hermanto
$this->db->query("DELETE FROM " . DB_PREFIX . "product_addition WHERE product_id = '" . (int)$product_id . "'");
$sql  = "insert into " . DB_PREFIX . "product_addition (product_id,features,additions)values('". (int)$product_id . "','".$this->db->escape($data['product_features'])."','".$this->db->escape($data['product_additional'])."')";
$this->db->query($sql);
//////
После

  $this->cache->delete('product');
}
Добовляем

// by yusuf hermanto
public function getProductAdditional($product_id){
  $sql = "SELECT * from  " . DB_PREFIX . "product_addition WHERE product_id = '" . (int)$product_id . "' ";
  $query = $this->db->query($sql);
  return $query->row;
}
В adminviewtemplatecatalogproduct_form.tpl

После

			    <td colspan="2"></td>
			    <td class="left"><a onclick="addImage();" class="button"><?php echo $button_add_image; ?></a></td>
			  </tr>
		    </tfoot>
		  </table>
	    </div>
Добовляем

		 <div id="tab-addition">
		  <table class="form">			 
			  <tr>
			    <td><?php echo $entry_features ?></td>
			    <td><textarea name="product_features" id="product_features">
			    <?php echo $product_additional['features'] ?>
			    </textarea></td>
			  </tr>
			  <tr>
			    <td><?php echo $entry_additional ?></td>
			    <td><textarea name="product_additional" id="product_additional">
				 <?php echo $product_additional['additions'] ?>
			    </textarea></td>
			  </tr>
		    </table>
	 </div>
После

filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
<?php } ?>
Добовляем

CKEDITOR.replace('product_features', {
filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
CKEDITOR.replace('product_additional', {
filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
В catalogcontrollerproductproduct.php

После

$this->data['text_tags'] = $this->language->get('text_tags');
Добовляем

   /// herman
   $this->data['text_features'] = $this->language->get('text_features');
   $this->data['text_additional'] = $this->language->get('text_additional');
После

   $this->data['products'] = array();
Добовляем

   // herman
 
  $this->data['product_additional'] = array();
 
   $related_info = $this->model_catalog_product->getProductAdditional($this->request->get['product_id']);
   if($related_info){
    $this->data['product_additional'] = array(
	 'product_id' => $related_info['product_id'],
	 'features'	   =>html_entity_decode($related_info['features'], ENT_QUOTES, 'UTF-8'),
	 'additions'	   => html_entity_decode($related_info['additions'], ENT_QUOTES, 'UTF-8')
    );
   }else{
    $this->data['product_additional'] = array(
	 'product_id' => $this->request->get['product_id'],
	 'features'	   =>'',
	 'additions'	   => ''
    );
   }
В catalogviewthemeВаша ТЕмаtemplateproductproduct.tpl

После

    <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
    <?php } ?>
Доовляем

<a href="#tab-features"><?php echo $text_features; ?></a>
    <a href="#tab-specific"><?php echo $text_additional; ?></a>
  </div>
 
  <div id="tab-features" class="tab-content">
  <table>
  <tr>
  <td>
 <?php echo $product_additional['features'] ?>
 </td>
 </tr>
 </table>
  </div>
  <div id="tab-specific" class="tab-content">
  <table>
  <tr><td>
  <?php echo $product_additional['additions'] ?>
  </td>
  </tr>
  </table>

В catalogmodelcatalogproduct.php

После

public function updateViewed($product_id) {
  $this->db->query("UPDATE " . DB_PREFIX . "product SET viewed = (viewed + 1) WHERE product_id = '" . (int)$product_id . "'");
}
Добавить

//
public function getProductAdditional($product_id){
  $sql = "SELECT * from  " . DB_PREFIX . "product_addition WHERE product_id = '" . (int)$product_id . "' ";
  $query = $this->db->query($sql);
  return $query->row;
}

А так же нужно сделать запрос к БД

-- phpMyAdmin SQL Dump
-- version 2.10.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 01, 2011 at 04:52 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `oc5xxx`
--
-- --------------------------------------------------------
--
-- Table structure for table `product_addition`
--
CREATE TABLE `product_addition` (
  `product_id` int(5) NOT NULL,
  `features` text NOT NULL,
  `additions` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `product_addition`
--
INSERT INTO `product_addition` VALUES (42, '<p>rn xxxx dfffffffffffffff</p>rn', '<p>rn xcxcxcxcx vvvvvvvvvvv</p>rn');
INSERT INTO `product_addition` VALUES (30, '<p>rn dfasfasfasfasdffffffffffffffffffffffff</p>rn', '<p>rn dsfafdasdfasfafasdfasdfafasd</p>rn');

Ну и вот что у меня с этого всего получилось!!!

Изображение

Изображение

Надіслати
Поділитися на інших сайтах


я нашёл что пропустил

В adminviewtemplatecatalogproduct_form.tpl

После

<?php echo $tab_reward; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a>
Добовляется

<a href="#tab-addition"><?php echo $tab_additional; ?></a>
но выдаёт ошибку, чегото ещё не хватает :(
Надіслати
Поділитися на інших сайтах


Не обявлена переменная tab_additional где то в контролере.. Посмотри внимательнее, может что пропустил.

могу не могу найти вот сам рабочий контроллер!!

<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
	  <h1><img src="view/image/product.png" alt="" /> <?php echo $heading_title; ?></h1>
	  <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
    </div>
    <div class="content">
	  <div id="tabs" class="htabs"><a href="#tab-general"><?php echo $tab_general; ?></a><a href="#tab-data"><?php echo $tab_data; ?></a><a href="#tab-links"><?php echo $tab_links; ?></a><a href="#tab-attribute"><?php echo $tab_attribute; ?></a><a href="#tab-option"><?php echo $tab_option; ?></a><a href="#tab-discount"><?php echo $tab_discount; ?></a><a href="#tab-special"><?php echo $tab_special; ?></a><a href="#tab-image"><?php echo $tab_image; ?></a><a href="#tab-reward"><?php echo $tab_reward; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a>
	  <a href="#tab-addition"><?php echo $tab_additional; ?></a>
	  </div>
	  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
	    <div id="tab-general">
		  <div id="languages" class="htabs">
		    <?php foreach ($languages as $language) { ?>
		    <a href="#language<?php echo $language['language_id']; ?>"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a>
		    <?php } ?>
		  </div>
		  <?php foreach ($languages as $language) { ?>
		  <div id="language<?php echo $language['language_id']; ?>">
		    <table class="form">
			  <tr>
			    <td><span class="required">*</span> <?php echo $entry_name; ?></td>
			    <td><input type="text" name="product_description[<?php echo $language['language_id']; ?>][name]" size="100" value="<?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['name'] : ''; ?>" />
				  <?php if (isset($error_name[$language['language_id']])) { ?>
				  <span class="error"><?php echo $error_name[$language['language_id']]; ?></span>
				  <?php } ?></td>
			  </tr>
			  <tr>
			    <td><?php echo $entry_meta_description; ?></td>
			    <td><textarea name="product_description[<?php echo $language['language_id']; ?>][meta_description]" cols="40" rows="5"><?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['meta_description'] : ''; ?></textarea></td>
			  </tr>
			  <tr>
			    <td><?php echo $entry_meta_keyword; ?></td>
			    <td><textarea name="product_description[<?php echo $language['language_id']; ?>][meta_keyword]" cols="40" rows="5"><?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['meta_keyword'] : ''; ?></textarea></td>
			  </tr>
			  <tr>
			    <td><?php echo $entry_description; ?></td>
			    <td><textarea name="product_description[<?php echo $language['language_id']; ?>][description]" id="description<?php echo $language['language_id']; ?>"><?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['description'] : ''; ?></textarea></td>
			  </tr>
			  <tr>
			    <td><?php echo $entry_tag; ?></td>
			    <td><input type="text" name="product_tag[<?php echo $language['language_id']; ?>]" value="<?php echo isset($product_tag[$language['language_id']]) ? $product_tag[$language['language_id']] : ''; ?>" size="80" /></td>
			  </tr>
		    </table>
		  </div>
		  <?php } ?>
	    </div>
	    <div id="tab-data">
		  <table class="form">
		    <tr>
			  <td><span class="required">*</span> <?php echo $entry_model; ?></td>
			  <td><input type="text" name="model" value="<?php echo $model; ?>" />
			    <?php if ($error_model) { ?>
			    <span class="error"><?php echo $error_model; ?></span>
			    <?php } ?></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_price; ?></td>
			  <td><input type="text" name="price" value="<?php echo $price; ?>" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_tax_class; ?></td>
			  <td><select name="tax_class_id">
				  <option value="0"><?php echo $text_none; ?></option>
				  <?php foreach ($tax_classes as $tax_class) { ?>
				  <?php if ($tax_class['tax_class_id'] == $tax_class_id) { ?>
				  <option value="<?php echo $tax_class['tax_class_id']; ?>" selected="selected"><?php echo $tax_class['title']; ?></option>
				  <?php } else { ?>
				  <option value="<?php echo $tax_class['tax_class_id']; ?>"><?php echo $tax_class['title']; ?></option>
				  <?php } ?>
				  <?php } ?>
			    </select></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_quantity; ?></td>
			  <td><input type="text" name="quantity" value="<?php echo $quantity; ?>" size="2" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_minimum; ?></td>
			  <td><input type="text" name="minimum" value="<?php echo $minimum; ?>" size="2" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_subtract; ?></td>
			  <td><select name="subtract">
				  <?php if ($subtract) { ?>
				  <option value="1" selected="selected"><?php echo $text_yes; ?></option>
				  <option value="0"><?php echo $text_no; ?></option>
				  <?php } else { ?>
				  <option value="1"><?php echo $text_yes; ?></option>
				  <option value="0" selected="selected"><?php echo $text_no; ?></option>
				  <?php } ?>
			    </select></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_stock_status; ?></td>
			  <td><select name="stock_status_id">
				  <?php foreach ($stock_statuses as $stock_status) { ?>
				  <?php if ($stock_status['stock_status_id'] == $stock_status_id) { ?>
				  <option value="<?php echo $stock_status['stock_status_id']; ?>" selected="selected"><?php echo $stock_status['name']; ?></option>
				  <?php } else { ?>
				  <option value="<?php echo $stock_status['stock_status_id']; ?>"><?php echo $stock_status['name']; ?></option>
				  <?php } ?>
				  <?php } ?>
			    </select></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_shipping; ?></td>
			  <td><?php if ($shipping) { ?>
			    <input type="radio" name="shipping" value="1" checked="checked" />
			    <?php echo $text_yes; ?>
			    <input type="radio" name="shipping" value="0" />
			    <?php echo $text_no; ?>
			    <?php } else { ?>
			    <input type="radio" name="shipping" value="1" />
			    <?php echo $text_yes; ?>
			    <input type="radio" name="shipping" value="0" checked="checked" />
			    <?php echo $text_no; ?>
			    <?php } ?></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_sku; ?></td>
			  <td><input type="text" name="sku" value="<?php echo $sku; ?>" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_upc; ?></td>
			  <td><input type="text" name="upc" value="<?php echo $upc; ?>" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_location; ?></td>
			  <td><input type="text" name="location" value="<?php echo $location; ?>" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_keyword; ?></td>
			  <td><input type="text" name="keyword" value="<?php echo $keyword; ?>" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_image; ?></td>
			  <td><input type="hidden" name="image" value="<?php echo $image; ?>" id="image" />
			    <img src="<?php echo $preview; ?>" alt="" id="preview" class="image" onclick="image_upload('image', 'preview');" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_date_available; ?></td>
			  <td><input type="text" name="date_available" value="<?php echo $date_available; ?>" size="12" class="date" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_dimension; ?></td>
			  <td><input type="text" name="length" value="<?php echo $length; ?>" size="4" />
			    <input type="text" name="width" value="<?php echo $width; ?>" size="4" />
			    <input type="text" name="height" value="<?php echo $height; ?>" size="4" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_length; ?></td>
			  <td><select name="length_class_id">
				  <?php foreach ($length_classes as $length_class) { ?>
				  <?php if ($length_class['length_class_id'] == $length_class_id) { ?>
				  <option value="<?php echo $length_class['length_class_id']; ?>" selected="selected"><?php echo $length_class['title']; ?></option>
				  <?php } else { ?>
				  <option value="<?php echo $length_class['length_class_id']; ?>"><?php echo $length_class['title']; ?></option>
				  <?php } ?>
				  <?php } ?>
			    </select></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_weight; ?></td>
			  <td><input type="text" name="weight" value="<?php echo $weight; ?>" /></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_weight_class; ?></td>
			  <td><select name="weight_class_id">
				  <?php foreach ($weight_classes as $weight_class) { ?>
				  <?php if ($weight_class['weight_class_id'] == $weight_class_id) { ?>
				  <option value="<?php echo $weight_class['weight_class_id']; ?>" selected="selected"><?php echo $weight_class['title']; ?></option>
				  <?php } else { ?>
				  <option value="<?php echo $weight_class['weight_class_id']; ?>"><?php echo $weight_class['title']; ?></option>
				  <?php } ?>
				  <?php } ?>
			    </select></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_status; ?></td>
			  <td><select name="status">
				  <?php if ($status) { ?>
				  <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
				  <option value="0"><?php echo $text_disabled; ?></option>
				  <?php } else { ?>
				  <option value="1"><?php echo $text_enabled; ?></option>
				  <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
				  <?php } ?>
			    </select></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_sort_order; ?></td>
			  <td><input type="text" name="sort_order" value="<?php echo $sort_order; ?>" size="2" /></td>
		    </tr>
		  </table>
	    </div>
	    <div id="tab-links">
		  <table class="form">
		    <tr>
			  <td><?php echo $entry_manufacturer; ?></td>
			  <td><select name="manufacturer_id">
				  <option value="0" selected="selected"><?php echo $text_none; ?></option>
				  <?php foreach ($manufacturers as $manufacturer) { ?>
				  <?php if ($manufacturer['manufacturer_id'] == $manufacturer_id) { ?>
				  <option value="<?php echo $manufacturer['manufacturer_id']; ?>" selected="selected"><?php echo $manufacturer['name']; ?></option>
				  <?php } else { ?>
				  <option value="<?php echo $manufacturer['manufacturer_id']; ?>"><?php echo $manufacturer['name']; ?></option>
				  <?php } ?>
				  <?php } ?>
			    </select></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_category; ?></td>
			  <td><div class="scrollbox">
				  <?php $class = 'odd'; ?>
				  <?php foreach ($categories as $category) { ?>
				  <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
				  <div class="<?php echo $class; ?>">
				    <?php if (in_array($category['category_id'], $product_category)) { ?>
				    <input type="checkbox" name="product_category[]" value="<?php echo $category['category_id']; ?>" checked="checked" />
				    <?php echo $category['name']; ?>
				    <?php } else { ?>
				    <input type="checkbox" name="product_category[]" value="<?php echo $category['category_id']; ?>" />
				    <?php echo $category['name']; ?>
				    <?php } ?>
				  </div>
				  <?php } ?>
			    </div>
			    <a onclick="$(this).parent().find(':checkbox').attr('checked', true);"><?php echo $text_select_all; ?></a> / <a onclick="$(this).parent().find(':checkbox').attr('checked', false);"><?php echo $text_unselect_all; ?></a></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_store; ?></td>
			  <td><div class="scrollbox">
				  <?php $class = 'even'; ?>
				  <div class="<?php echo $class; ?>">
				    <?php if (in_array(0, $product_store)) { ?>
				    <input type="checkbox" name="product_store[]" value="0" checked="checked" />
				    <?php echo $text_default; ?>
				    <?php } else { ?>
				    <input type="checkbox" name="product_store[]" value="0" />
				    <?php echo $text_default; ?>
				    <?php } ?>
				  </div>
				  <?php foreach ($stores as $store) { ?>
				  <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
				  <div class="<?php echo $class; ?>">
				    <?php if (in_array($store['store_id'], $product_store)) { ?>
				    <input type="checkbox" name="product_store[]" value="<?php echo $store['store_id']; ?>" checked="checked" />
				    <?php echo $store['name']; ?>
				    <?php } else { ?>
				    <input type="checkbox" name="product_store[]" value="<?php echo $store['store_id']; ?>" />
				    <?php echo $store['name']; ?>
				    <?php } ?>
				  </div>
				  <?php } ?>
			    </div></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_download; ?></td>
			  <td><div class="scrollbox">
				  <?php $class = 'odd'; ?>
				  <?php foreach ($downloads as $download) { ?>
				  <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
				  <div class="<?php echo $class; ?>">
				    <?php if (in_array($download['download_id'], $product_download)) { ?>
				    <input type="checkbox" name="product_download[]" value="<?php echo $download['download_id']; ?>" checked="checked" />
				    <?php echo $download['name']; ?>
				    <?php } else { ?>
				    <input type="checkbox" name="product_download[]" value="<?php echo $download['download_id']; ?>" />
				    <?php echo $download['name']; ?>
				    <?php } ?>
				  </div>
				  <?php } ?>
			    </div></td>
		    </tr>
		    <tr>
			  <td><?php echo $entry_related; ?></td>
			  <td><input type="text" name="related" value="" /></td>
		    </tr>
		    <tr>
			  <td> </td>
			  <td><div class="scrollbox" id="product-related">
				  <?php $class = 'odd'; ?>
				  <?php foreach ($product_related as $product_related) { ?>
				  <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
				  <div id="product-related<?php echo $product_related['product_id']; ?>" class="<?php echo $class; ?>"> <?php echo $product_related['name']; ?><img src="view/image/delete.png" />
				    <input type="hidden" name="product_related[]" value="<?php echo $product_related['product_id']; ?>" />
				  </div>
				  <?php } ?>
			    </div></td>
		    </tr>
		  </table>
	    </div>
	    <div id="tab-attribute">
		  <table id="attribute" class="list">
		    <thead>
			  <tr>
			    <td class="left"><?php echo $entry_attribute; ?></td>
			    <td class="left"><?php echo $entry_text; ?></td>
			    <td></td>
			  </tr>
		    </thead>
		    <?php $attribute_row = 0; ?>
		    <?php foreach ($product_attributes as $product_attribute) { ?>
		    <tbody id="attribute-row<?php echo $attribute_row; ?>">
			  <tr>
			    <td class="left"><input type="text" name="product_attribute[<?php echo $attribute_row; ?>][name]" value="<?php echo $product_attribute['name']; ?>" />
				  <input type="hidden" name="product_attribute[<?php echo $attribute_row; ?>][attribute_id]" value="<?php echo $product_attribute['attribute_id']; ?>" /></td>
			    <td class="left"><?php foreach ($languages as $language) { ?>
				  <textarea name="product_attribute[<?php echo $attribute_row; ?>][product_attribute_description][<?php echo $language['language_id']; ?>][text]" cols="40" rows="5"><?php echo isset($product_attribute['product_attribute_description'][$language['language_id']]) ? $product_attribute['product_attribute_description'][$language['language_id']]['text'] : ''; ?></textarea>
				  <img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /><br />
				  <?php } ?></td>
			    <td class="left"><a onclick="$('#attribute-row<?php echo $attribute_row; ?>').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>
			  </tr>
		    </tbody>
		    <?php $attribute_row++; ?>
		    <?php } ?>
		    <tfoot>
			  <tr>
			    <td colspan="2"></td>
			    <td class="left"><a onclick="addAttribute();" class="button"><span><?php echo $button_add_attribute; ?></span></a></td>
			  </tr>
		    </tfoot>
		  </table>
	    </div>
	    <div id="tab-option">
		  <div id="vtab-option" class="vtabs">
		    <?php $option_row = 0; ?>
		    <?php foreach ($product_options as $product_option) { ?>
		    <a href="#tab-option-<?php echo $option_row; ?>" id="option-<?php echo $option_row; ?>"><?php echo $product_option['name']; ?> <img src="view/image/delete.png" alt="" onclick="$('#vtabs a:first').trigger('click'); $('#option-<?php echo $option_row; ?>').remove(); $('#tab-option-<?php echo $option_row; ?>').remove(); return false;" /></a>
		    <?php $option_row++; ?>
		    <?php } ?>
		    <span id="option-add">
		    <input name="option" value="" style="width: 130px;" />
		     <img src="view/image/add.png" alt="<?php echo $button_add_option; ?>" title="<?php echo $button_add_option; ?>" /></span></div>
		  <?php $option_row = 0; ?>
		  <?php $option_value_row = 0; ?>
		  <?php foreach ($product_options as $product_option) { ?>
		  <div id="tab-option-<?php echo $option_row; ?>" class="vtabs-content">
		    <input type="hidden" name="product_option[<?php echo $option_row; ?>][product_option_id]" value="<?php echo $product_option['product_option_id']; ?>" />
		    <input type="hidden" name="product_option[<?php echo $option_row; ?>][name]" value="<?php echo $product_option['name']; ?>" />
		    <input type="hidden" name="product_option[<?php echo $option_row; ?>][option_id]" value="<?php echo $product_option['option_id']; ?>" />
		    <input type="hidden" name="product_option[<?php echo $option_row; ?>][type]" value="<?php echo $product_option['type']; ?>" />
		    <table class="form">
			  <tr>
			    <td><?php echo $entry_required; ?></td>
			    <td><select name="product_option[<?php echo $option_row; ?>][required]">
				    <?php if ($product_option['required']) { ?>
				    <option value="1" selected="selected"><?php echo $text_yes; ?></option>
				    <option value="0"><?php echo $text_no; ?></option>
				    <?php } else { ?>
				    <option value="1"><?php echo $text_yes; ?></option>
				    <option value="0" selected="selected"><?php echo $text_no; ?></option>
				    <?php } ?>
				  </select></td>
			  </tr>
			  <?php if ($product_option['type'] == 'text') { ?>
			  <tr>
			    <td><?php echo $entry_option_value; ?></td>
			    <td><input type="text" name="product_option[<?php echo $option_row; ?>][option_value]" value="<?php echo $product_option['option_value']; ?>" /></td>
			  </tr>
			  <?php } ?>
			  <?php if ($product_option['type'] == 'textarea') { ?>
			  <tr>
			    <td><?php echo $entry_option_value; ?></td>
			    <td><textarea name="product_option[<?php echo $option_row; ?>][option_value]" cols="40" rows="5"><?php echo $product_option['option_value']; ?></textarea></td>
			  </tr>
			  <?php } ?>
			  <?php if ($product_option['type'] == 'file') { ?>
			  <tr style="display: none;">
			    <td><?php echo $entry_option_value; ?></td>
			    <td><input type="text" name="product_option[<?php echo $option_row; ?>][option_value]" value="<?php echo $product_option['option_value']; ?>" /></td>
			  </tr>
			  <?php } ?>
			  <?php if ($product_option['type'] == 'date') { ?>
			  <tr>
			    <td><?php echo $entry_option_value; ?></td>
			    <td><input type="text" name="product_option[<?php echo $option_row; ?>][option_value]" value="<?php echo $product_option['option_value']; ?>" class="date" /></td>
			  </tr>
			  <?php } ?>
			  <?php if ($product_option['type'] == 'datetime') { ?>
			  <tr>
			    <td><?php echo $entry_option_value; ?></td>
			    <td><input type="text" name="product_option[<?php echo $option_row; ?>][option_value]" value="<?php echo $product_option['option_value']; ?>" class="datetime" /></td>
			  </tr>
			  <?php } ?>
			  <?php if ($product_option['type'] == 'time') { ?>
			  <tr>
			    <td><?php echo $entry_option_value; ?></td>
			    <td><input type="text" name="product_option[<?php echo $option_row; ?>][option_value]" value="<?php echo $product_option['option_value']; ?>" class="time" /></td>
			  </tr>
			  <?php } ?>
		    </table>
		    <?php if ($product_option['type'] == 'select' || $product_option['type'] == 'radio' || $product_option['type'] == 'checkbox') { ?>
		    <table id="option-value<?php echo $option_row; ?>" class="list">
			  <thead>
			    <tr>
				  <td class="left"><?php echo $entry_option_value; ?></td>
				  <td class="right"><?php echo $entry_quantity; ?></td>
				  <td class="left"><?php echo $entry_subtract; ?></td>
				  <td class="right"><?php echo $entry_price; ?></td>
				  <td class="right"><?php echo $entry_option_points; ?></td>
				  <td class="right"><?php echo $entry_weight; ?></td>
				  <td></td>
			    </tr>
			  </thead>
			  <?php foreach ($product_option['product_option_value'] as $product_option_value) { ?>
			  <tbody id="option-value-row<?php echo $option_value_row; ?>">
			    <tr>
				  <td class="left"><select name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][option_value_id]">
				    </select>
				    <input type="hidden" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][product_option_value_id]" value="<?php echo $product_option_value['product_option_value_id']; ?>" /></td>
				  <td class="right"><input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][quantity]" value="<?php echo $product_option_value['quantity']; ?>" size="3" /></td>
				  <td class="left"><select name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][subtract]">
					  <?php if ($product_option_value['subtract']) { ?>
					  <option value="1" selected="selected"><?php echo $text_yes; ?></option>
					  <option value="0"><?php echo $text_no; ?></option>
					  <?php } else { ?>
					  <option value="1"><?php echo $text_yes; ?></option>
					  <option value="0" selected="selected"><?php echo $text_no; ?></option>
					  <?php } ?>
				    </select></td>
				  <td class="right"><select name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][price_prefix]">
					  <?php if ($product_option_value['price_prefix'] == '+') { ?>
					  <option value="+" selected="selected">+</option>
					  <?php } else { ?>
					  <option value="+">+</option>
					  <?php } ?>
					  <?php if ($product_option_value['price_prefix'] == '-') { ?>
					  <option value="-" selected="selected">-</option>
					  <?php } else { ?>
					  <option value="-">-</option>
					  <?php } ?>
				    </select>
				    <input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][price]" value="<?php echo $product_option_value['price']; ?>" size="5" /></td>
				  <td class="right"><select name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][points_prefix]">
					  <?php if ($product_option_value['points_prefix'] == '+') { ?>
					  <option value="+" selected="selected">+</option>
					  <?php } else { ?>
					  <option value="+">+</option>
					  <?php } ?>
					  <?php if ($product_option_value['points_prefix'] == '-') { ?>
					  <option value="-" selected="selected">-</option>
					  <?php } else { ?>
					  <option value="-">-</option>
					  <?php } ?>
				    </select>
				    <input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][points]" value="<?php echo $product_option_value['points']; ?>" size="5" /></td>
				  <td class="right"><select name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][weight_prefix]">
					  <?php if ($product_option_value['weight_prefix'] == '+') { ?>
					  <option value="+" selected="selected">+</option>
					  <?php } else { ?>
					  <option value="+">+</option>
					  <?php } ?>
					  <?php if ($product_option_value['weight_prefix'] == '-') { ?>
					  <option value="-" selected="selected">-</option>
					  <?php } else { ?>
					  <option value="-">-</option>
					  <?php } ?>
				    </select>
				    <input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][weight]" value="<?php echo $product_option_value['weight']; ?>" size="5" /></td>
				  <td class="left"><a onclick="$('#option-value-row<?php echo $option_value_row; ?>').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>
			    </tr>
			  </tbody>
			  <?php $option_value_row++; ?>
			  <?php } ?>
			  <tfoot>
			    <tr>
				  <td colspan="6"></td>
				  <td class="left"><a onclick="addOptionValue('<?php echo $option_row; ?>');" class="button"><span><?php echo $button_add_option_value; ?></span></a></td>
			    </tr>
			  </tfoot>
		    </table>
		    <?php } ?>
		  </div>
		  <?php $option_row++; ?>
		  <?php } ?>
		  <script type="text/javascript"><!--
		  <?php $option_row = 0; ?>
		  <?php $option_value_row = 0; ?> 
    <?php foreach ($product_options as $product_option) { ?>
		  <?php if ($product_option['type'] == 'select' || $product_option['type'] == 'radio' || $product_option['type'] == 'checkbox') { ?>
    <?php foreach ($product_option['product_option_value'] as $product_option_value) { ?>
    $('select[name='product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][option_value_id]']').load('index.php?route=catalog/product/option&token=<?php echo $token; ?>&option_id=<?php echo $product_option['option_id']; ?>&option_value_id=<?php echo $product_option_value['option_value_id']; ?>');
    <?php $option_value_row++; ?>
    <?php } ?>
    <?php } ?>
    <?php $option_row++; ?>
		  <?php } ?>
    //--></script>
	    </div>
	    <div id="tab-discount">
		  <table id="discount" class="list">
		    <thead>
			  <tr>
			    <td class="left"><?php echo $entry_customer_group; ?></td>
			    <td class="right"><?php echo $entry_quantity; ?></td>
			    <td class="right"><?php echo $entry_priority; ?></td>
			    <td class="right"><?php echo $entry_price; ?></td>
			    <td class="left"><?php echo $entry_date_start; ?></td>
			    <td class="left"><?php echo $entry_date_end; ?></td>
			    <td></td>
			  </tr>
		    </thead>
		    <?php $discount_row = 0; ?>
		    <?php foreach ($product_discounts as $product_discount) { ?>
		    <tbody id="discount-row<?php echo $discount_row; ?>">
			  <tr>
			    <td class="left"><select name="product_discount[<?php echo $discount_row; ?>][customer_group_id]">
				    <?php foreach ($customer_groups as $customer_group) { ?>
				    <?php if ($customer_group['customer_group_id'] == $product_discount['customer_group_id']) { ?>
				    <option value="<?php echo $customer_group['customer_group_id']; ?>" selected="selected"><?php echo $customer_group['name']; ?></option>
				    <?php } else { ?>
				    <option value="<?php echo $customer_group['customer_group_id']; ?>"><?php echo $customer_group['name']; ?></option>
				    <?php } ?>
				    <?php } ?>
				  </select></td>
			    <td class="right"><input type="text" name="product_discount[<?php echo $discount_row; ?>][quantity]" value="<?php echo $product_discount['quantity']; ?>" size="2" /></td>
			    <td class="right"><input type="text" name="product_discount[<?php echo $discount_row; ?>][priority]" value="<?php echo $product_discount['priority']; ?>" size="2" /></td>
			    <td class="right"><input type="text" name="product_discount[<?php echo $discount_row; ?>][price]" value="<?php echo $product_discount['price']; ?>" /></td>
			    <td class="left"><input type="text" name="product_discount[<?php echo $discount_row; ?>][date_start]" value="<?php echo $product_discount['date_start']; ?>" class="date" /></td>
			    <td class="left"><input type="text" name="product_discount[<?php echo $discount_row; ?>][date_end]" value="<?php echo $product_discount['date_end']; ?>" class="date" /></td>
			    <td class="left"><a onclick="$('#discount-row<?php echo $discount_row; ?>').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>
			  </tr>
		    </tbody>
		    <?php $discount_row++; ?>
		    <?php } ?>
		    <tfoot>
			  <tr>
			    <td colspan="6"></td>
			    <td class="left"><a onclick="addDiscount();" class="button"><span><?php echo $button_add_discount; ?></span></a></td>
			  </tr>
		    </tfoot>
		  </table>
	    </div>
	    <div id="tab-special">
		  <table id="special" class="list">
		    <thead>
			  <tr>
			    <td class="left"><?php echo $entry_customer_group; ?></td>
			    <td class="right"><?php echo $entry_priority; ?></td>
			    <td class="right"><?php echo $entry_price; ?></td>
			    <td class="left"><?php echo $entry_date_start; ?></td>
			    <td class="left"><?php echo $entry_date_end; ?></td>
			    <td></td>
			  </tr>
		    </thead>
		    <?php $special_row = 0; ?>
		    <?php foreach ($product_specials as $product_special) { ?>
		    <tbody id="special-row<?php echo $special_row; ?>">
			  <tr>
			    <td class="left"><select name="product_special[<?php echo $special_row; ?>][customer_group_id]">
				    <?php foreach ($customer_groups as $customer_group) { ?>
				    <?php if ($customer_group['customer_group_id'] == $product_special['customer_group_id']) { ?>
				    <option value="<?php echo $customer_group['customer_group_id']; ?>" selected="selected"><?php echo $customer_group['name']; ?></option>
				    <?php } else { ?>
				    <option value="<?php echo $customer_group['customer_group_id']; ?>"><?php echo $customer_group['name']; ?></option>
				    <?php } ?>
				    <?php } ?>
				  </select></td>
			    <td class="right"><input type="text" name="product_special[<?php echo $special_row; ?>][priority]" value="<?php echo $product_special['priority']; ?>" size="2" /></td>
			    <td class="right"><input type="text" name="product_special[<?php echo $special_row; ?>][price]" value="<?php echo $product_special['price']; ?>" /></td>
			    <td class="left"><input type="text" name="product_special[<?php echo $special_row; ?>][date_start]" value="<?php echo $product_special['date_start']; ?>" class="date" /></td>
			    <td class="left"><input type="text" name="product_special[<?php echo $special_row; ?>][date_end]" value="<?php echo $product_special['date_end']; ?>" class="date" /></td>
			    <td class="left"><a onclick="$('#special-row<?php echo $special_row; ?>').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>
			  </tr>
		    </tbody>
		    <?php $special_row++; ?>
		    <?php } ?>
		    <tfoot>
			  <tr>
			    <td colspan="5"></td>
			    <td class="left"><a onclick="addSpecial();" class="button"><span><?php echo $button_add_special; ?></span></a></td>
			  </tr>
		    </tfoot>
		  </table>
	    </div>
	    <div id="tab-image">
		  <table id="images" class="list">
		    <thead>
			  <tr>
			    <td class="left"><?php echo $entry_image; ?></td>
			    <td></td>
			  </tr>
		    </thead>
		    <?php $image_row = 0; ?>
		    <?php foreach ($product_images as $product_image) { ?>
		    <tbody id="image-row<?php echo $image_row; ?>">
			  <tr>
			    <td class="left"><img src="<?php echo $product_image['preview']; ?>" alt="" id="preview<?php echo $image_row; ?>" class="image" onclick="image_upload('image<?php echo $image_row; ?>', 'preview<?php echo $image_row; ?>');" />
				  <input type="hidden" name="product_image[<?php echo $image_row; ?>]" value="<?php echo $product_image['image']; ?>" id="image<?php echo $image_row; ?>"  /></td>
			    <td class="left"><a onclick="$('#image-row<?php echo $image_row; ?>').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>
			  </tr>
		    </tbody>
		    <?php $image_row++; ?>
		    <?php } ?>
		    <tfoot>
			  <tr>
			    <td></td>
			    <td class="left"><a onclick="addImage();" class="button"><span><?php echo $button_add_image; ?></span></a></td>
			  </tr>
		    </tfoot>
		  </table>
	    </div>
	 
		 <div id="tab-addition">
		  <table class="form">		   
			  <tr>
			    <td><?php echo $entry_features ?></td>
			    <td><textarea name="product_features" id="product_features">
			    <?php echo $product_additional['features'] ?>
			    </textarea></td>
			  </tr>
			  <tr>
			    <td><?php echo $entry_additional ?></td>
			    <td><textarea name="product_additional" id="product_additional">
				 <?php echo $product_additional['additions'] ?>
			    </textarea></td>
			  </tr>
		    </table>
	 </div>
   
   
	    <div id="tab-reward">
		  <table class="form">
		    <tr>
			  <td><?php echo $entry_points; ?></td>
			  <td><input type="text" name="points" value="<?php echo $points; ?>" /></td>
		    </tr>
		  </table>
		  <table class="list">
		    <thead>
			  <tr>
			    <td class="left"><?php echo $entry_customer_group; ?></td>
			    <td class="right"><?php echo $entry_reward; ?></td>
			  </tr>
		    </thead>
		    <?php foreach ($customer_groups as $customer_group) { ?>
		    <tbody>
			  <tr>
			    <td class="left"><?php echo $customer_group['name']; ?></td>
			    <td class="right"><input type="text" name="product_reward[<?php echo $customer_group['customer_group_id']; ?>][points]" value="<?php echo isset($product_reward[$customer_group['customer_group_id']]) ? $product_reward[$customer_group['customer_group_id']]['points'] : ''; ?>" /></td>
			  </tr>
		    </tbody>
		    <?php } ?>
		  </table>
	    </div>
	    <div id="tab-design">
		  <table class="list">
		    <thead>
			  <tr>
			    <td class="left"><?php echo $entry_store; ?></td>
			    <td class="left"><?php echo $entry_layout; ?></td>
			  </tr>
		    </thead>
		    <tbody>
			  <tr>
			    <td class="left"><?php echo $text_default; ?></td>
			    <td class="left"><select name="product_layout[0][layout_id]">
				    <option value=""></option>
				    <?php foreach ($layouts as $layout) { ?>
				    <?php if (isset($product_layout[0]) && $product_layout[0] == $layout['layout_id']) { ?>
				    <option value="<?php echo $layout['layout_id']; ?>" selected="selected"><?php echo $layout['name']; ?></option>
				    <?php } else { ?>
				    <option value="<?php echo $layout['layout_id']; ?>"><?php echo $layout['name']; ?></option>
				    <?php } ?>
				    <?php } ?>
				  </select></td>
			  </tr>
		    </tbody>
		    <?php foreach ($stores as $store) { ?>
		    <tbody>
			  <tr>
			    <td class="left"><?php echo $store['name']; ?></td>
			    <td class="left"><select name="product_layout[<?php echo $store['store_id']; ?>][layout_id]">
				    <option value=""></option>
				    <?php foreach ($layouts as $layout) { ?>
				    <?php if (isset($product_layout[$store['store_id']]) && $product_layout[$store['store_id']] == $layout['layout_id']) { ?>
				    <option value="<?php echo $layout['layout_id']; ?>" selected="selected"><?php echo $layout['name']; ?></option>
				    <?php } else { ?>
				    <option value="<?php echo $layout['layout_id']; ?>"><?php echo $layout['name']; ?></option>
				    <?php } ?>
				    <?php } ?>
				  </select></td>
			  </tr>
		    </tbody>
		    <?php } ?>
		  </table>
	    </div>
	 
	 
   
	  </form>
    </div>
 
  </div>
</div>
<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript"><!--
<?php foreach ($languages as $language) { ?>
CKEDITOR.replace('description<?php echo $language['language_id']; ?>', {
filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
<?php } ?>
CKEDITOR.replace('product_features', {
filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
CKEDITOR.replace('product_additional', {
filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
//--></script>
<script type="text/javascript"><!--
$('input[name='related']').autocomplete({
delay: 0,
source: function(request, response) {
  $.ajax({
   url: 'index.php?route=catalog/product/autocomplete&token=<?php echo $token; ?>',
   type: 'POST',
   dataType: 'json',
   data: 'filter_name=' +  encodeURIComponent(request.term),
   success: function(data) {
    response($.map(data, function(item) {
	 return {
	  label: item.name,
	  value: item.product_id
	 }
    }));
   }
  });
},
select: function(event, ui) {
  $('#product-related' + ui.item.value).remove();
  $('#product-related').append('<div id="product-related' + ui.item.value + '">' + ui.item.label + '<img src="view/image/delete.png" /><input type="hidden" name="product_related[]" value="' + ui.item.value + '" /></div>');
  $('#product-related div:odd').attr('class', 'odd');
  $('#product-related div:even').attr('class', 'even');
 
  return false;
}
});
$('#product-related div img').live('click', function() {
$(this).parent().remove();
$('#product-related div:odd').attr('class', 'odd');
$('#product-related div:even').attr('class', 'even');
});
//--></script>
<script type="text/javascript"><!--
var attribute_row = <?php echo $attribute_row; ?>;
function addAttribute() {
html  = '<tbody id="attribute-row' + attribute_row + '">';
    html += '  <tr>';
html += '    <td class="left"><input type="text" name="product_attribute[' + attribute_row + '][name]" value="" /><input type="hidden" name="product_attribute[' + attribute_row + '][attribute_id]" value="" /></td>';
html += '    <td class="left">';
<?php foreach ($languages as $language) { ?>
html += '<textarea name="product_attribute[' + attribute_row + '][product_attribute_description][<?php echo $language['language_id']; ?>][text]" cols="40" rows="5"></textarea><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /><br />';
    <?php } ?>
html += '    </td>';
html += '    <td class="left"><a onclick="$('#attribute-row' + attribute_row + '').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>';
    html += '  </tr>';
    html += '</tbody>';
$('#attribute tfoot').before(html);
attributeautocomplete(attribute_row);
attribute_row++;
}
$.widget('custom.catcomplete', $.ui.autocomplete, {
_renderMenu: function(ul, items) {
  var self = this, currentCategory = '';
  $.each(items, function(index, item) {
   if (item.category != currentCategory) {
    ul.append('<li class="ui-autocomplete-category">' + item.category + '</li>');
 
    currentCategory = item.category;
   }
 
   self._renderItem(ul, item);
  });
}
});
function attributeautocomplete(attribute_row) {
$('input[name='product_attribute[' + attribute_row + '][name]']').catcomplete({
  delay: 0,
  source: function(request, response) {
   $.ajax({
    url: 'index.php?route=catalog/attribute/autocomplete&token=<?php echo $token; ?>',
    type: 'POST',
    dataType: 'json',
    data: 'filter_name=' +  encodeURIComponent(request.term),
    success: function(data) {
	 response($.map(data, function(item) {
	  return {
	   category: item.attribute_group,
	   label: item.name,
	   value: item.attribute_id
	  }
	 }));
    }
   });
  },
  select: function(event, ui) {
   $('input[name='product_attribute[' + attribute_row + '][name]']').attr('value', ui.item.label);
   $('input[name='product_attribute[' + attribute_row + '][attribute_id]']').attr('value', ui.item.value);
 
   return false;
  }
});
}
$('#attribute tbody').each(function(index, element) {
attributeautocomplete(index);
});
//--></script>
<script type="text/javascript"><!--
var option_row = <?php echo $option_row; ?>;
$('input[name='option']').catcomplete({
delay: 0,
source: function(request, response) {
  $.ajax({
   url: 'index.php?route=catalog/option/autocomplete&token=<?php echo $token; ?>',
   type: 'POST',
   dataType: 'json',
   data: 'filter_name=' +  encodeURIComponent(request.term),
   success: function(data) {
    response($.map(data, function(item) {
	 return {
	  category: item.category,
	  label: item.name,
	  value: item.option_id,
	  type: item.type
	 }
    }));
   }
  });
},
select: function(event, ui) {
  html  = '<div id="tab-option-' + option_row + '" class="vtabs-content">';
  html += ' <input type="hidden" name="product_option[' + option_row + '][product_option_id]" value="" />';
  html += ' <input type="hidden" name="product_option[' + option_row + '][name]" value="' + ui.item.label + '" />';
  html += ' <input type="hidden" name="product_option[' + option_row + '][option_id]" value="' + ui.item.value + '" />';
  html += ' <input type="hidden" name="product_option[' + option_row + '][type]" value="' + ui.item.type + '" />';
  html += ' <table class="form">';
  html += '   <tr>';
  html += '  <td><?php echo $entry_required; ?></td>';
  html += '	   <td><select name="product_option[' + option_row + '][required]">';
  html += '	   <option value="1"><?php echo $text_yes; ?></option>';
  html += '	   <option value="0"><?php echo $text_no; ?></option>';
  html += '	 </select></td>';
  html += '	 </tr>';
  if (ui.item.type == 'text') {
   html += '	 <tr>';
   html += '	   <td><?php echo $entry_option_value; ?></td>';
   html += '	   <td><input type="text" name="product_option[' + option_row + '][option_value]" value="" /></td>';
   html += '	 </tr>';
  }
  if (ui.item.type == 'textarea') {
   html += '	 <tr>';
   html += '	   <td><?php echo $entry_option_value; ?></td>';
   html += '	   <td><textarea name="product_option[' + option_row + '][option_value]" cols="40" rows="5"></textarea></td>';
   html += '	 </tr>';   
  }
 
  if (ui.item.type == 'file') {
   html += '	 <tr style="display: none;">';
   html += '	   <td><?php echo $entry_option_value; ?></td>';
   html += '	   <td><input type="text" name="product_option[' + option_row + '][option_value]" value="" /></td>';
   html += '	 </tr>'; 
  }
   
  if (ui.item.type == 'date') {
   html += '	 <tr>';
   html += '	   <td><?php echo $entry_option_value; ?></td>';
   html += '	   <td><input type="text" name="product_option[' + option_row + '][option_value]" value="" class="date" /></td>';
   html += '	 </tr>'; 
  }
  if (ui.item.type == 'datetime') {
   html += '	 <tr>';
   html += '	   <td><?php echo $entry_option_value; ?></td>';
   html += '	   <td><input type="text" name="product_option[' + option_row + '][option_value]" value="" class="datetime" /></td>';
   html += '	 </tr>'; 
  }
  if (ui.item.type == 'time') {
   html += '	 <tr>';
   html += '	   <td><?php echo $entry_option_value; ?></td>';
   html += '	   <td><input type="text" name="product_option[' + option_row + '][option_value]" value="" class="time" /></td>';
   html += '	 </tr>'; 
  }
  html += '  </table>';
 
  if (ui.item.type == 'select' || ui.item.type == 'radio' || ui.item.type == 'checkbox') {
   html += '  <table id="option-value' + option_row + '" class="list">';
   html += '    <thead>';
   html += '	  <tr>';
   html += '	    <td class="left"><?php echo $entry_option_value; ?></td>';
   html += '	    <td class="right"><?php echo $entry_quantity; ?></td>';
   html += '	    <td class="left"><?php echo $entry_subtract; ?></td>';
   html += '	    <td class="right"><?php echo $entry_price; ?></td>';
   html += '	    <td class="right"><?php echo $entry_option_points; ?></td>';
   html += '	    <td class="right"><?php echo $entry_weight; ?></td>';
   html += '	    <td></td>';
   html += '	  </tr>';
   html += '    </thead>';
   html += '    <tfoot>';
   html += '	  <tr>';
   html += '	    <td colspan="6"></td>';
   html += '	    <td class="left"><a onclick="addOptionValue(' + option_row + ');" class="button"><span><?php echo $button_add_option_value; ?></span></a></td>';
   html += '	  </tr>';
   html += '    </tfoot>';
   html += '  </table>';
   html += '</div>';
  }
  $('#tab-option').append(html);
  $('#option-add').before('<a href="#tab-option-' + option_row + '" id="option-' + option_row + '">' + ui.item.label + ' <img src="view/image/delete.png" alt="" onclick="$('#vtab-option a:first').trigger('click'); $('#option-' + option_row + '').remove(); $('#tab-option-' + option_row + '').remove(); return false;" /></a>');
  $('#vtab-option a').tabs();
  $('#option-' + option_row).trigger('click');
  $('.date').datepicker({dateFormat: 'yy-mm-dd'});
  $('.datetime').datetimepicker({
   dateFormat: 'yy-mm-dd',
   timeFormat: 'h:m'
  });
 
  $('.time').timepicker({timeFormat: 'h:m'});
 
  option_row++;
  return false;
}
});
//--></script>
<script type="text/javascript"><!--
var option_value_row = <?php echo $option_value_row; ?>;
function addOptionValue(option_row) {
html  = '<tbody id="option-value-row' + option_value_row + '">';
html += '  <tr>';
html += '    <td class="left"><select name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][option_value_id]"></select><input type="hidden" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][product_option_value_id]" value="" /></td>';
html += '    <td class="right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="" size="3" /></td>';
html += '    <td class="left"><select name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][subtract]">';
html += '	  <option value="1"><?php echo $text_yes; ?></option>';
html += '	  <option value="0"><?php echo $text_no; ?></option>';
html += '    </select></td>';
html += '    <td class="right"><select name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][price_prefix]">';
html += '	  <option value="+">+</option>';
html += '	  <option value="-">-</option>';
html += '    </select>';
html += '    <input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][price]" value="" size="5" /></td>';
html += '    <td class="right"><select name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][points_prefix]">';
html += '	  <option value="+">+</option>';
html += '	  <option value="-">-</option>';
html += '    </select>';
html += '    <input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][points]" value="" size="5" /></td>';
html += '    <td class="right"><select name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][weight_prefix]">';
html += '	  <option value="+">+</option>';
html += '	  <option value="-">-</option>';
html += '    </select>';
html += '    <input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][weight]" value="" size="5" /></td>';
html += '    <td class="left"><a onclick="$('#option-value-row' + option_value_row + '').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>';
html += '  </tr>';
html += '</tbody>';
$('#option-value' + option_row + ' tfoot').before(html);
$('select[name='product_option[' + option_row + '][product_option_value][' + option_value_row + '][option_value_id]']').load('index.php?route=catalog/product/option&token=<?php echo $token; ?>&option_id=' + $('input[name='product_option[' + option_row + '][option_id]']').attr('value'));
option_value_row++;
}
//--></script>
<script type="text/javascript"><!--
var discount_row = <?php echo $discount_row; ?>;
function addDiscount() {
html  = '<tbody id="discount-row' + discount_row + '">';
html += '  <tr>';
    html += '    <td class="left"><select name="product_discount[' + discount_row + '][customer_group_id]">';
    <?php foreach ($customer_groups as $customer_group) { ?>
    html += '	  <option value="<?php echo $customer_group['customer_group_id']; ?>"><?php echo $customer_group['name']; ?></option>';
    <?php } ?>
    html += '    </select></td>';
    html += '    <td class="right"><input type="text" name="product_discount[' + discount_row + '][quantity]" value="" size="2" /></td>';
    html += '    <td class="right"><input type="text" name="product_discount[' + discount_row + '][priority]" value="" size="2" /></td>';
html += '    <td class="right"><input type="text" name="product_discount[' + discount_row + '][price]" value="" /></td>';
    html += '    <td class="left"><input type="text" name="product_discount[' + discount_row + '][date_start]" value="" class="date" /></td>';
html += '    <td class="left"><input type="text" name="product_discount[' + discount_row + '][date_end]" value="" class="date" /></td>';
html += '    <td class="left"><a onclick="$('#discount-row' + discount_row + '').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>';
html += '  </tr>';
    html += '</tbody>';
$('#discount tfoot').before(html);
$('#discount-row' + discount_row + ' .date').datepicker({dateFormat: 'yy-mm-dd'});
discount_row++;
}
//--></script>
<script type="text/javascript"><!--
var special_row = <?php echo $special_row; ?>;
function addSpecial() {
html  = '<tbody id="special-row' + special_row + '">';
html += '  <tr>';
    html += '    <td class="left"><select name="product_special[' + special_row + '][customer_group_id]">';
    <?php foreach ($customer_groups as $customer_group) { ?>
    html += '	  <option value="<?php echo $customer_group['customer_group_id']; ?>"><?php echo $customer_group['name']; ?></option>';
    <?php } ?>
    html += '    </select></td>';
    html += '    <td class="right"><input type="text" name="product_special[' + special_row + '][priority]" value="" size="2" /></td>';
html += '    <td class="right"><input type="text" name="product_special[' + special_row + '][price]" value="" /></td>';
    html += '    <td class="left"><input type="text" name="product_special[' + special_row + '][date_start]" value="" class="date" /></td>';
html += '    <td class="left"><input type="text" name="product_special[' + special_row + '][date_end]" value="" class="date" /></td>';
html += '    <td class="left"><a onclick="$('#special-row' + special_row + '').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>';
html += '  </tr>';
    html += '</tbody>';
$('#special tfoot').before(html);
$('#special-row' + special_row + ' .date').datepicker({dateFormat: 'yy-mm-dd'});
special_row++;
}
//--></script>
<script type="text/javascript"><!--
function image_upload(field, preview) {
$('#dialog').remove();
$('#content').prepend('<div id="dialog" style="padding: 3px 0px 0px 0px;"><iframe src="index.php?route=common/filemanager&token=<?php echo $token; ?>&field=' + encodeURIComponent(field) + '" style="padding:0; margin: 0; display: block; width: 100%; height: 100%;" frameborder="no" scrolling="auto"></iframe></div>');
$('#dialog').dialog({
  title: '<?php echo $text_image_manager; ?>',
  close: function (event, ui) {
   if ($('#' + field).attr('value')) {
    $.ajax({
	 url: 'index.php?route=common/filemanager/image&token=<?php echo $token; ?>',
	 type: 'POST',
	 data: 'image=' + encodeURIComponent($('#' + field).attr('value')),
	 dataType: 'text',
	 success: function(data) {
	  $('#' + preview).replaceWith('<img src="' + data + '" alt="" id="' + preview + '" class="image" onclick="image_upload('' + field + '', '' + preview + '');" />');
	 }
    });
   }
  },
  bgiframe: false,
  width: 800,
  height: 400,
  resizable: false,
  modal: false
});
};
//--></script>
<script type="text/javascript"><!--
var image_row = <?php echo $image_row; ?>;
function addImage() {
    html  = '<tbody id="image-row' + image_row + '">';
html += '  <tr>';
html += '    <td class="left"><input type="hidden" name="product_image[' + image_row + ']" value="" id="image' + image_row + '" /><img src="<?php echo $no_image; ?>" alt="" id="preview' + image_row + '" class="image" onclick="image_upload('image' + image_row + '', 'preview' + image_row + '');" /></td>';
html += '    <td class="left"><a onclick="$('#image-row' + image_row  + '').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>';
html += '  </tr>';
html += '</tbody>';
$('#images tfoot').before(html);
image_row++;
}
//--></script>
<script type="text/javascript" src="view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript"><!--
$('.date').datepicker({dateFormat: 'yy-mm-dd'});
$('.datetime').datetimepicker({
dateFormat: 'yy-mm-dd',
timeFormat: 'h:m'
});
$('.time').timepicker({timeFormat: 'h:m'});
//--></script>
<script type="text/javascript"><!--
$('#tabs a').tabs();
$('#languages a').tabs();
$('#vtab-option a').tabs();
//--></script>
<?php echo $footer; ?>
Надіслати
Поділитися на інших сайтах


у тебя еще судя по всему что то не так в product_form так как не активные судя по твоему скриншоту поля для ввода имени таба ну и кнопки добавить таб нету хотя может она и съехала в право

там кстати модуль вчера обновился может посмотри что там ....

Надіслати
Поділитися на інших сайтах

сравнил код. вроде все верно

чего-то пропущеного не заметил

единственное, там еще какой-то комментарий в ридми есть

add this code in product model (catalogmodelcatalogproduct.php)
in line 8
//
public function getProductAdditional($product_id){
  $sql = "SELECT * from  " . DB_PREFIX . "product_addition WHERE product_id = '" . (int)$product_id . "' ";
  $query = $this->db->query($sql);
  return $query->row;
}
Какая версия скрипта у Вас?

и еще, посмотрите, есть ли у Вас в admin/controller/catalog/product.php

после

$this->data['tab_design'] = $this->language->get('tab_design');
код

$this->data['tab_additional'] = $this->language->get('tab_additional');
  • +1 1
Надіслати
Поділитися на інших сайтах


сравнил код. вроде все верно

чего-то пропущеного не заметил

единственное, там еще какой-то комментарий в ридми есть

add this code in product model (catalogmodelcatalogproduct.php)
in line 8
//
public function getProductAdditional($product_id){
  $sql = "SELECT * from  " . DB_PREFIX . "product_addition WHERE product_id = '" . (int)$product_id . "' ";
  $query = $this->db->query($sql);
  return $query->row;
}
Какая версия скрипта у Вас?

и еще, посмотрите, есть ли у Вас в admin/controller/catalog/product.php

после

$this->data['tab_design'] = $this->language->get('tab_design');
код

$this->data['tab_additional'] = $this->language->get('tab_additional');

у меня Версия 1.5.1.3

На данный момент к сожелению просмотреть не смогу есть ли это или нет! потому что тестировал на локалке...!! буду дома обезательно проверю... а так же ещё раз тчательно перепроверю все файлы что я мог пропустить!!!

Надіслати
Поділитися на інших сайтах


и еще, посмотрите, есть ли у Вас в admin/controller/catalog/product.php

после

$this->data['tab_design'] = $this->language->get('tab_design');
код

$this->data['tab_additional'] = $this->language->get('tab_additional');
Всё получилось, большое спасибо!!! теперь буду его доробатьвать, хотелось бы теперь сделать что когда текст в Tab отсутствует что бы оно было скрыто
Надіслати
Поділитися на інших сайтах


судя по тому что написано на опенкарт-ком оно и должно быть скрыто

может у Вас какая то старая версия ? как я писал выше

Может быть, у меня не написано в файле какая версия :(

помогите даделась этот скрипты что бы тоже было скрыто!!

я его выложу тут бесплатно с 2 инструкциями, с заменой и ручной установкой!!!!

Надіслати
Поділитися на інших сайтах


  • 2 months later...

А так же нужно сделать запрос к БД

CREATE TABLE `product_addition` (
  `product_id` int(5) NOT NULL,
  `features` text NOT NULL,
  `additions` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

А префикс базы данных?

Ну и перевод))) хотя его думаю каждый под себя настроит...

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку
×
×
  • Створити...

Important Information

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