<?xml version="1.0" encoding="utf-8"?>
<modification>
	<name>TMD Custom Tab Pro</name>
	<id>TMD Custom Tab Pro</id>
	<version>1.1</version>
	<code>#TCTP</code>
	<author>TMD(opencartextensions.in)</author>
	<link>http://opencartextensions.in/</link>

	<file path="admin/controller/common/column_left.php">
		<operation error="skip">
			<search><![CDATA[if ($this->user->hasPermission('access', 'catalog/product')) {]]></search>
			<add position="before"><![CDATA[
			if ($this->user->hasPermission('access', 'extension/tmdtab')) {
				$catalog[] = array(
					'name'	   => $this->language->get('text_tmdtab'),
					'href'     => $this->url->link('extension/tmdtab', 'user_token=' . $this->session->data['user_token'], true),
					'children' => array()
				);
			}]]></add>
		</operation>
	</file>

	<file path="admin/language/*/common/column_left.php">
		<operation error="skip">
			<search><![CDATA[// Text]]></search>
			<add position="after"><![CDATA[$_['text_tmdtab']                    = 'Custom Tab'; ]]></add>
		</operation>
	</file>

	<file path="catalog/view/theme/*/template/product/product.twig">
		<operation error="log">
			<search><![CDATA[<li><a href="#tab-review" data-toggle="tab">{{ tab_review }}</a></li>]]></search>
			<add position="after" offset="1"><![CDATA[
			<!--xml-->
			{% if customtabs %}
            {% for key, customtab in customtabs %}
				<li><a href="#tabcustom{{ key }}" data-toggle="tab" class="{{ customtab.class }}">{{ customtab.title }}</a></li>
            {% endfor %}
            {% endif %}
			<!--xml-->
			]]></add>
		</operation>
		<operation error="log">
			<search><![CDATA[<div class="tab-content">]]></search>
			<add position="after" ><![CDATA[
			<!--xml-->
			{% if customtabs %}
            {% for key, customtab in customtabs %}
				<div class="tab-pane {{ customtab.class }}" id="tabcustom{{ key }}">
					{{ customtab.description }}
				</div>
			{% endfor %}
            {% endif %}
			<!--xml-->
			]]></add>
		</operation>
    </file>

	<file path="catalog/view/theme/journal2/template/product/product.twig">
        <operation error="log">
			<search><![CDATA[<li {% if is_active %} class="active" {% set is_active = false %} {% endif %}><a href="#tab-specification" data-toggle="tab">{{ tab_attribute }}</a></li>]]></search>
			<add position="after" offset="1"><![CDATA[
			<!--xml-->
			{% if customtabs %}
            {% for key, customtab in customtabs %}
				<li><a href="#tabcustom{{ key }}" data-toggle="tab" class="{{ customtab.class }}">{{ customtab.title }}</a></li>
            {% endfor %}
            {% endif %}
			<!--xml-->
			]]></add>
		</operation>
		<operation error="log">
			<search><![CDATA[<div id="additional-product-tab-{{ loop.index }}" class="tab-pane tab-content journal-custom-tab {% if is_active %} active {% set is_active = false %}{% endif %}">{{ tab.content }}</div>]]></search>
			<add position="after" offset="1"><![CDATA[
			<!--xml-->
			{% if customtabs %}
            {% for key, customtab in customtabs %}
				<div class="tab-pane tab-content {{ customtab.class }}" id="tabcustom{{ key }}">
					{{ customtab.description }}
				</div>
			{% endfor %}
            {% endif %}
			<!--xml-->
			]]></add>
		</operation>
	</file>
	 <file path="catalog/controller/journal3/product_tabs.php">
		<operation error="skip">
		<search><![CDATA[return $this->renderView('journal3/module/product_tabs', $data);]]></search>
		<add position="before"><![CDATA[
		if (isset($this->request->get['product_id'])) {
		$product_id=$this->request->get['product_id'];

		$results = $this->model_catalog_product->getProducttabs($product_id);

		foreach ($results as $result) {

		if(!isset($result['product_customtab_id']))
		{
		$result['product_customtab_id']=$result['tmdtab_description_id'];
		}
		$data['items'][]=array(
		'title'=>$result['title'],
		'sort'=>$result['sort_order'],
		'content'=>html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'),
		'displayTablet'=>'',
		'displayPhone'=>'accordion',
		'display'=>'tab',
		'expandButton'=>'',
		'footer'=>'',
		'header'=>'',
		'position'=>'',
		'contentType'=>'',
		'panel_classes' => array(
				'panel-collapse',
				'collapse',
			),
		'id'=>'product_extra_tmd'.$result['product_customtab_id'],
							   'tab_classes'=>array('panel'),
							   'classes'=>array('product_extra_tmd'.$result['product_customtab_id'],'tab-pane')
		);

		}
		$sort_order = array();

		foreach ($data['items'] as $key => $value) {
			$sort_order[$key] = $value['sort'];
		}
	array_multisort($sort_order, SORT_ASC, $data['items']);
		}

		]]></add>
		</operation>
		</file>

    <file path="catalog/controller/extension/blocks.php">
		<operation error="log">
			<search><![CDATA[if ($this->settings['display'] === 'tabs') {]]></search>
			<add position="after"><![CDATA[if (isset($this->request->get['product_id'])) {
				$product_id=$this->request->get['product_id'];

				$results = $this->model_catalog_product->getProducttabs($product_id);

				foreach ($results as $result) {

					$this->settings['items'][]=array(
						'title'=>$result['title'],
						'content'=>html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'),
						'display'=>'tab',
						'expandButton'=>'',
						'footer'=>'',
						'header'=>'',
						'position'=>'',
						'contentType'=>'',
                        'tab_classes'=>array('tab-pane'),
                        'classes'=>array('tab-pane')
					);

				}


				}]]></add>
		</operation>
        <operation error="log">
			<search><![CDATA[if ($this->settings['display'] === 'accordion') {]]></search>
			<add position="after"><![CDATA[
                   if (isset($this->request->get['product_id'])) {
				$product_id=$this->request->get['product_id'];

				$results = $this->model_catalog_product->getProducttabs($product_id);

				foreach ($results as $result) {

					$this->settings['items'][]=array(
						'title'=>$result['title'],
						'content'=>html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'),
						'display'=>'accordion',
						'expandButton'=>'',
						'footer'=>'',
						'header'=>'',
						'position'=>'',
						'contentType'=>'',
                        'classes'=>array('in'),
                        'panel_classes'=>array('panel-collapse collapse'),
					);

				}
              }
                ]]></add>
		</operation>
	</file>

	<file path="catalog/controller/product/product.php">
		<operation error="log">
			<search><![CDATA[$data['images'] = array();]]></search>
			<add position="before"><![CDATA[
				///xml///
					$data['customtabs'] = array();

					$results = $this->model_catalog_product->getProducttabs($this->request->get['product_id']);
					$i=0;
					foreach ($results as $result) {
						$class="";

						if(isset($result['device'])){
						$device = unserialize($result['device']);
							if(empty($device))
	                      {
	                       $device=array();
	                       }
							if(in_array('1',$device)){
								$class .=" hidden-xs";
							}

							if(in_array('2',$device)){
								$class .=" hidden-sm";
							}
							if(in_array('3',$device)){
								$class .="hidden-lg";
							}
						}
						$data['customtabs'][$i] = array(
							'title' => $result['title'],
							'class' => $class,
							'description' => html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'),
						);
						$i++;
					}
				///xml///

			]]></add>
		</operation>
	</file>
	<file path="catalog/model/catalog/product.php">
		<operation error="log">
			<search><![CDATA[public function getProductImages($product_id) {]]></search>
			<add position="before"><![CDATA[
			///xml///

				public function getProducttabs($product_id) {
					$tabs=array();
					$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_customtab pc LEFT JOIN " . DB_PREFIX . "product_customtab_description pcd ON (pc.product_customtab_id  = pcd.product_customtab_id) WHERE pc.product_id = '" . (int)$product_id . "'  AND pcd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND status > 0 ORDER BY sort_order ASC");
					if(!empty($query->rows))
					{
						foreach($query->rows as $row)
						{
						$tabs[$row['product_customtab_id'].'p']=$row;
						}

					}
						$tmdtab_id=array();
						$query1 = $this->db->query("SELECT tmdtab_id FROM " . DB_PREFIX . "tmd_custom_tab_product WHERE product_id = '" . (int)$product_id . "'");
						if(!empty($query1->rows))
						{
						foreach($query1->rows as $row)
							{
								$tmdtab_id[]=$row['tmdtab_id'];
							}
						}

						$query2 = $this->db->query("SELECT category_id from ". DB_PREFIX ."product_to_category where product_id= '".$product_id."'");
								if(!empty($query2->rows))
								{
									foreach($query2->rows as $rowc)
									{
									$category_id=$rowc['category_id'];
									$query3 = $this->db->query("SELECT tmdtab_id FROM " . DB_PREFIX . "tmd_custom_tab_category WHERE category_id = '" . (int)$category_id . "'");

									if(!empty($query3->rows))
									{
										foreach($query3->rows as $row)
										{
											$tmdtab_id[]=$row['tmdtab_id'];
										}
									}
									}
								}

									$query4 = $this->db->query("SELECT manufacturer_id from ". DB_PREFIX ."product where product_id= '".$product_id."' limit 0,1");
										if(!empty($query4->row['manufacturer_id']))
										{
											$manufacturer_id=$query4->row['manufacturer_id'];
											$query4 = $this->db->query("SELECT tmdtab_id FROM " . DB_PREFIX . "tmd_custom_tab_manufacturer WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
											if(!empty($query4->rows))
											{
												foreach($query4->rows as $row)
												{
													$tmdtab_id[]=$row['tmdtab_id'];
												}
											}
										}







						$tmdtab_id=array_unique($tmdtab_id);
						$custumtab=array();
						if(!empty($tmdtab_id))
						{

							$sql="SELECT * FROM " . DB_PREFIX . "tmd_custom_tab pc LEFT JOIN " . DB_PREFIX . "tmd_custom_tab_description pcd ON (pc.tmdtab_id  = pcd.tmdtab_id)";

							$sql .= " LEFT JOIN " . DB_PREFIX . "tmd_custom_tab_customer_group tc ON (tc.tmdtab_id = pc.tmdtab_id)";

							$sql .= " LEFT JOIN " . DB_PREFIX . "tmd_custom_tab_store ts ON (ts.tmdtab_id = pc.tmdtab_id)";


							foreach ($tmdtab_id as $tmdtabd) {
								$implode[] = "pc.tmdtab_id = '" . (int)$tmdtabd . "'";
							}

							if ($implode) {
								$sql .= " WHERE (" . implode(" OR ", $implode) . ")";
							}

							$sql .=" and pcd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND status > 0 ORDER BY sort_order ASC";

							$query8 = $this->db->query($sql);
							if(!empty($query8->rows)){
									foreach($query8->rows as $row){
										if(($row['customer'] == 2 && $this->customer->isLogged()) || ($row['customer'] == 3 && !$this->customer->isLogged()) || $row['customer'] == 1){
										/* code update 27 12 2019 */
											$tabs[$row['tmdtab_id']]=$row;
										/* code update 27 12 2019 */
										}
									}
								}

						}


					return $tabs;
				}

			///xml///

			]]></add>
		</operation>
	</file>

	<file path="admin/controller/catalog/product.php">
		<operation error="log">
			<search><![CDATA[if (isset($this->request->post['image'])) {]]></search>
			<add position="before"><![CDATA[
			///xml//
				// Custom Tabs

				$data['tab_customtab']=$this->language->get('tab_customtab');
				$data['entry_title']=$this->language->get('entry_title');
				$data['entry_description']=$this->language->get('entry_description');
				$data['button_customtab_add']=$this->language->get('button_customtab_add');

				if (isset($this->request->post['product_customtab'])) {
					$data['product_customtabs'] = $this->request->post['product_customtab'];
				} elseif (isset($this->request->get['product_id'])) {
					$data['product_customtabs'] = $this->model_catalog_product->getProductcustomtabs($this->request->get['product_id']);

				} else {
					$data['product_customtabs'] = array();
				}
			///xml//

			]]></add>
		</operation>
	</file>
	<file path="admin/language/*/catalog/product.php">
		<operation error="log">
			<search><![CDATA[// text]]></search>
			<add position="after"><![CDATA[
			$_['entry_title']='Tab Title';
			$_['button_customtab_add']='Add tab';
			$_['tab_customtab']='Custom Tab';
			]]></add>
		</operation>
	</file>
	<file path="admin/model/catalog/product.php">
		<operation error="log">
			<search><![CDATA[$product_id = $this->db->getLastId();]]></search>
			<add position="after"><![CDATA[
			///xml///
				if (isset($data['product_customtab'])) {
					foreach ($data['product_customtab'] as $product_customtab) {
						$this->db->query("INSERT INTO " . DB_PREFIX . "product_customtab SET product_id = '" . (int)$product_id . "',  sort_order = '" . (int)$product_customtab['sort_order'] . "', status = '" . (int)$product_customtab['status'] . "'");

						$product_customtab_id = $this->db->getLastId();

						foreach ($product_customtab['product_customtab_description'] as $language_id => $product_customtab_description) {
							$this->db->query("INSERT INTO " . DB_PREFIX . "product_customtab_description SET product_customtab_id = '" . (int)$product_customtab_id . "', language_id = '" . (int)$language_id . "', product_id = '" . (int)$product_id . "', title = '" .  $this->db->escape($product_customtab_description['title']) . "', description = '" .  $this->db->escape($product_customtab_description['description']) . "'");
						}
					}
				}
			///xml///

			]]></add>
		</operation>
		<operation error="log">
			<search><![CDATA[date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");]]></search>
			<add position="after"><![CDATA[
			///xml///
				$this->db->query("DELETE FROM " . DB_PREFIX . "product_customtab WHERE product_id = '" . (int)$product_id . "'");
				$this->db->query("DELETE FROM " . DB_PREFIX . "product_customtab_description WHERE product_id = '" . (int)$product_id . "'");
				if (isset($data['product_customtab'])) {
					foreach ($data['product_customtab'] as $product_customtab) {
						$this->db->query("INSERT INTO " . DB_PREFIX . "product_customtab SET product_id = '" . (int)$product_id . "',  sort_order = '" . (int)$product_customtab['sort_order'] . "', status = '" . (int)$product_customtab['status'] . "'");

						$product_customtab_id = $this->db->getLastId();

						foreach ($product_customtab['product_customtab_description'] as $language_id => $product_customtab_description) {
							$this->db->query("INSERT INTO " . DB_PREFIX . "product_customtab_description SET product_customtab_id = '" . (int)$product_customtab_id . "', language_id = '" . (int)$language_id . "', product_id = '" . (int)$product_id . "', title = '" .  $this->db->escape($product_customtab_description['title']) . "', description = '" .  $this->db->escape($product_customtab_description['description']) . "'");
						}
					}
				}
			///xml///

			]]></add>
		</operation>

		<operation error="log">
			<search><![CDATA[public function getProductImages($product_id) {]]></search>
			<add position="before"><![CDATA[
			//xml///
	public function getProductcustomtabs($product_id) {

		$product_customtab_data = array();

		$product_customtab_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_customtab WHERE product_id = '" . (int)$product_id . "' ORDER BY sort_order ASC");

		foreach ($product_customtab_query->rows as $product_customtab) {

			$product_customtab_description_data = array();

			$product_customtab_description_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_customtab_description WHERE product_customtab_id = '" . (int)$product_customtab['product_customtab_id'] . "' AND product_id = '" . (int)$product_id . "'");

			foreach ($product_customtab_description_query->rows as $product_customtab_description) {
				$product_customtab_description_data[$product_customtab_description['language_id']] = array(
				'title' => $product_customtab_description['title'],
				'description' => $product_customtab_description['description'],
				);
			}

			$product_customtab_data[] = array(
				'product_customtab_description' => $product_customtab_description_data,
				'status'                     => $product_customtab['status'],
				'sort_order'                    => $product_customtab['sort_order']
			);
		}

		return $product_customtab_data;
	}
	//xml///
			]]></add>
		</operation>

		<operation error="log">
			<search><![CDATA[$data['product_recurrings'] = $this->getRecurrings($product_id);]]></search>
			<add position="before"><![CDATA[
			//xml new code 17 sep 2019///
				$data['product_customtab'] = $this->getProductcustomtabs($product_id);
			//xml new code 17 sep 2019///
			]]></add>
		</operation>
	</file>


	<file path="admin/view/template/catalog/product_form.twig">
		<operation error="log">
			<search><![CDATA[<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>]]></search>
			<add position="after"><![CDATA[
			<!--xml-->
			<li><a href="#tab-customtabmain" data-toggle="tab">{{ tab_customtab }}</a></li>
			<!--xml-->
			]]></add>
		</operation>

		<operation error="log">
			<search><![CDATA[<div class="tab-pane" id="tab-design">]]></search>
			<add position="before"><![CDATA[
			<!--xml-->
			<div class="tab-pane" id="tab-customtabmain">
				 <div class="col-sm-2">
				  <ul class="nav nav-pills nav-stacked" id="customtab">
					{% set customtab_row = 0 %}
					{% for product_customtab in product_customtabs %}
					<li><a href="#tab-customtab{{ customtab_row }}" data-toggle="tab"><i class="fa fa-minus-circle" onclick="$('a[href=\'#tab-customtab{{ customtab_row }}\']').parent().remove(); $('#tab-customtab{{ customtab_row }}').remove(); $('#customtab a:first').tab('show');"></i> {{ tab_customtab }} {{ customtab_row }}</a></li>
					{% set customtab_row = customtab_row + 1 %}
					{% endfor %}
					<li id="customtab-add"><a onclick="addCustomtab();"><i class="fa fa-plus-circle"></i> {{ button_customtab_add }}</a></li>
				  </ul>
				</div>
			<div class="col-sm-10">
              <div class="tab-content tab-content2">
                {% set customtab_row = 0 %}
				{% for product_customtab in product_customtabs %}
                <div class="tab-pane" id="tab-customtab{{ customtab_row }}">
                  <ul class="nav nav-tabs" id="clanguage{{ customtab_row }}">
                    {% for language in languages %}
                    <li><a href="#tab-customtab{{ customtab_row }}-language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" />  {{ language.name }}</a></li>
                    {% endfor %}
                  </ul>
                  <div class="tab-content">
                    {% for language in languages %}
                    <div class="tab-pane" id="tab-customtab{{ customtab_row }}-language{{ language.language_id }}">
                      <div class="form-group">
                        <label class="col-sm-2 control-label" for="input-heading{{ customtab_row }}-language{{ language.language_id }}">{{ entry_title }}</label>
                        <div class="col-sm-10">
                          <input type="text" name="product_customtab[{{ customtab_row }}][product_customtab_description][{{ language.language_id }}][title]" value="{{ product_customtab.product_customtab_description[language.language_id] ? product_customtab.product_customtab_description[language.language_id].title }}" class="form-control"/>
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="col-sm-2 control-label" for="input-description{{ customtab_row }}-language{{ language.language_id }}">{{ entry_description }}</label>
                        <div class="col-sm-10">
                          <textarea name="product_customtab[{{ customtab_row }}][product_customtab_description][{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ customtab_row }}-language{{ language.language_id }}"    data-toggle="summernote" data-lang="{{ summernote }}" class="form-control" >{{ product_customtab.product_customtab_description[language.language_id] ? product_customtab.product_customtab_description[language.language_id].description }}</textarea>
                        </div>
                      </div>
                    </div>
                    {% endfor %}
                  </div>
					<div class="form-group">
                        <label class="col-sm-2 control-label" for="input-sort_order{{ customtab_row }}">{{ entry_sort_order }}</label>
                        <div class="col-sm-10">
                         <input type="text" name="product_customtab[{{ customtab_row }}][sort_order]" value="{{ product_customtab.sort_order }}" placeholder="{{ entry_sort_order }}" class="form-control" />
                        </div>
					</div>
					<div class="form-group">
                        <label class="col-sm-2 control-label" for="input-status{{ customtab_row }}">{{ entry_sort_order }}</label>
                        <div class="col-sm-10">
                        <select name="product_customtab[{{ customtab_row }}][status]" id="input-status" class="form-control">
						{% if product_customtab.status %}
						<option value="1" selected="selected">{{ text_enabled }}</option>
						<option value="0">{{ text_disabled }}</option>
						{% else %}
						<option value="1">{{ text_enabled }}</option>
						<option value="0" selected="selected">{{ text_disabled }}</option>
						{% endif %}
					  </select>
                        </div>
					</div>



                </div>
				{% set customtab_row = customtab_row + 1 %}
                {% endfor %}
              </div>
            </div>
			</div>
			<!--xml-->
			]]></add>
		</operation>

		<operation error="log">
			<search><![CDATA[{{ footer }}]]></search>
			<add position="before"><![CDATA[
			<script type="text/javascript" src="view/javascript/summernote/tmdcustom.js"></script>
		<script type="text/javascript"><!--
		var customtab_row = {{ customtab_row }};

			function addCustomtab() {
			html  = '<div id="tab-customtab' + customtab_row + '" class="tab-pane">';
			html += '  <ul class="nav nav-tabs" id="clanguage' + customtab_row + '">';
			{% for language in languages %}
			 html += '    <li><a href="#tab-customtab' + customtab_row + '-language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>';
			{% endfor %}
			html += '  </ul>';

			html += '  <div class="tab-content">';
			{% for language in languages %}
			html += '    <div class="tab-pane" id="tab-customtab' + customtab_row + '-language{{ language.language_id }}">';
			html += '      <div class="form-group">';
			html += '        <label class="col-sm-2 control-label" for="input-title' + customtab_row + '-language{{ language.language_id }}">{{ entry_title }}</label>';
			html += '        <div class="col-sm-10"><input type="text" name="product_customtab[' + customtab_row + '][product_customtab_description][{{ language.language_id }}][title]" placeholder="{{ entry_title }}" id="input-title' + customtab_row + '-language{{ language.language_id }}" value="" class="form-control"/></div>';
			html += '      </div>';
			html += '      <div class="form-group">';
			html += '        <label class="col-sm-2 control-label" for="input-description' + customtab_row + '-language{{ language.language_id }}">{{ entry_description }}</label>';
			html += '        <div class="col-sm-10"><textarea name="product_customtab[' + customtab_row + '][product_customtab_description][{{ language.language_id }}][description]" id="input-description' + customtab_row + '-language{{ language.language_id }}"  data-toggle="summernote"  class="form-control" ></textarea></div>';
			html += '      </div>';
			html += '    </div>';
			{% endfor %}
			html += '  </div>';
			html += '      <div class="form-group">';
			html += '        <label class="col-sm-2 control-label" for="input-status' + customtab_row +'">{{ entry_status }}</label>';
			html += '        <div class="col-sm-10"><select name="product_customtab[' + customtab_row + '][status]" class="form-control"><option value="1">{{ text_enabled }}</option><option value="0">{{ text_disabled }}</option></select></div>';
			html += '      </div>';
			html += '  <div class="form-group">';
			html += '<label class="col-sm-2 control-label" for="input-sort_order' + customtab_row +'">{{ entry_sort_order }}</label>';
			html += ' <div class="col-sm-10"><input type="text" name="product_customtab[' + customtab_row + '][sort_order]" value="" class="form-control" /></div>';
			html += '</div>';
			html += '</div>';

			$('#tab-customtabmain .tab-content2').append(html);


			$('#customtab a[href=\'#tab-customtab' + customtab_row + '\']').tab('show');

			$('#clanguage' + customtab_row + ' li:first-child a').tab('show');

			$('#customtab-add').before('<li><a href="#tab-customtab' + customtab_row + '" data-toggle="tab"><i class="fa fa-minus-circle" onclick="$(\'a[href=\\\'#tab-customtab' + customtab_row + '\\\']\').parent().remove(); $(\'#tab-customtab' + customtab_row + '\').remove(); $(\'#customtab li a:first\').tab(\'show\');"></i> {{ tab_customtab }} ' + customtab_row + '</a></li>');


			$('#customtab-' + customtab_row).trigger('click');
			tmdcustompro();
			customtab_row++;
			}
			//--></script>

			<script type="text/javascript"><!--
			$('#customtab li:first-child a').tab('show');
			{% set customtab_row = 0 %}
			{% for product_customtab in product_customtabs %}
			$('#clanguage{{ customtab_row }} li:first-child a').tab('show');
			{% set customtab_row = customtab_row + 1 %}
			{% endfor %}
			//--></script>
			<!--xml-->]]></add>
		</operation>
	</file>
	<file path="catalog/view/theme/journal3/template/common/footer.twig">
		<operation error="log">
			<search><![CDATA[</footer>]]></search>
			<add position="after"><![CDATA[
			<style>
			.product_tabs .nav-tabs{  flex-wrap: wrap;}
			</style>
			]]></add>
		</operation>
		</file>
</modification>
