<modification>
	<id>DRESSCODE</id>
	<version>1.5.x</version>
	<vqmver>2.X</vqmver>
	<author>www.ethemeuk.com</author>
    <file name="admin/controller/setting/setting.php">
        <operation>
            <search position="after"><![CDATA[
                $this->model_setting_setting->editSetting('config', $this->request->post);
                ]]></search>
            <add><![CDATA[
                /*function*/
            function loo_parse_queries($file) {
                $sql_file = $file;
                $contents = file_get_contents($sql_file);
                $comment_patterns = array('/\/\*.*(\n)*.*(\*\/)?/', // comments
                    '/\s*--.*\n/', //inline comments start with --
                    '/\s*#.*\n/', //inline comments start with #
                );
                $contents = preg_replace($comment_patterns, "\n", $contents);
                $contents = preg_replace('/(?<=t);(?=\n)/', "{{semicolon_in_text}}", $contents);
                $statements = explode(";\n", $contents);
                $queries = array();
                foreach ($statements as $query) {
                    if (trim($query) != '') {
                        $query = str_replace("{{semicolon_in_text}}", ";", $query);
                        //apply db prefix parametr
                        preg_match("/\?:\w*/i", $query, $matches);
                        $table_name = str_replace('?:', DB_PREFIX, $matches[0]);
                        if ( !empty($table_name) ) {
                            $query = str_replace(array($matches[0], 'key = '), array($table_name, '`key` = '), $query);
                        }
                        $queries[] = $query;
                    }
                }
                return $queries;
            }
            /*function*/
            if(file_exists(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql')) {
				$tmpl_dir = dirname(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql');

				if((bool)stristr($tmpl_dir, $this->config->get('config_template')) == false) {
					// Parse and Run sql
					$sql = loo_parse_queries(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql');
					foreach ($sql as $query) {
						$this->db->query($query);
					}
				}
			}
            // LOO (end)
                ]]></add>
        </operation>
    </file>
    <file name="admin/controller/setting/store.php">
        <operation>
            <search position="after"><![CDATA[
                $this->model_setting_setting->editSetting('config', $this->request->post, $store_id);
                ]]></search>
            <add><![CDATA[
                 /*function*/
            function loo_parse_queries($file) {
                $sql_file = $file;
                $contents = file_get_contents($sql_file);
                $comment_patterns = array('/\/\*.*(\n)*.*(\*\/)?/', // comments
                    '/\s*--.*\n/', //inline comments start with --
                    '/\s*#.*\n/', //inline comments start with #
                );
                $contents = preg_replace($comment_patterns, "\n", $contents);
                $contents = preg_replace('/(?<=t);(?=\n)/', "{{semicolon_in_text}}", $contents);
                $statements = explode(";\n", $contents);
                $queries = array();
                foreach ($statements as $query) {
                    if (trim($query) != '') {
                        $query = str_replace("{{semicolon_in_text}}", ";", $query);
                        //apply db prefix parametr
                        preg_match("/\?:\w*/i", $query, $matches);
                        $table_name = str_replace('?:', DB_PREFIX, $matches[0]);
                        if ( !empty($table_name) ) {
                            $query = str_replace(array($matches[0], 'key = '), array($table_name, '`key` = '), $query);
                        }
                        $queries[] = $query;
                    }
                }
                return $queries;
            }
			// LOO
			if(file_exists(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql')) {
				$tmpl_dir = dirname(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql');
				if((bool)stristr($tmpl_dir, $this->config->get('config_template')) == false) {
					// Parse and Run sql
					$sql = loo_parse_queries(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql');
					foreach ($sql as $query) {
						$this->db->query($query);
					}
				}
			}
            // LOO (end)
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                $this->model_setting_setting->editSetting('config', $this->request->post, $this->request->get['store_id']);
                ]]></search>
            <add><![CDATA[
                 // LOO
			if(file_exists(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql')) {
				$tmpl_dir = dirname(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql');
				if((bool)stristr($tmpl_dir, $this->config->get('config_template')) == false) {
					// Parse and Run sql
					$sql = loo_parse_queries(DIR_CATALOG . 'view/theme/' . $this->request->post['config_template'] . '/install.sql');
					foreach ($sql as $query) {
						$this->db->query($query);
					}
				}
			}
			// LOO (end)
                ]]></add>
        </operation>
    </file>
    <file name="admin/controller/catalog/product.php">
		<operation>
			<search position="after"><![CDATA[
            private $error = array();
            ]]></search>
			<add><![CDATA[
            protected function dbCheck(){
                $query = $this->db->query("SHOW COLUMNS FROM `".DB_PREFIX."product` LIKE 'youtube'");
                if(!$query->num_rows){
                    $this->db->query("ALTER TABLE `".DB_PREFIX."product` ADD `youtube` TEXT NOT NULL");
                }
            }
            ]]></add>
		</operation>
        <operation>
            <search position="after"><![CDATA[
            public function index() {
            ]]></search>
            <add><![CDATA[
            $this->dbCheck();
            ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
            $this->data['token'] = $this->session->data['token'];
            ]]></search>
            <add><![CDATA[
            $this->data['tab_youtube'] = $this->language->get('tab_youtube');
            ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
            $this->data['text_no'] = $this->language->get('text_no');
            ]]></search>
            <add><![CDATA[
            $this->data['text_select_all'] = $this->language->get('text_select_all');
		    $this->data['text_unselect_all'] = $this->language->get('text_unselect_all');
            ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
            $this->data['tab_marketplace_links'] = $this->language->get('tab_marketplace_links');
            ]]></search>
            <add><![CDATA[
            $this->data['tab_youtube'] = $this->language->get('tab_youtube');
            ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
            $this->data['layouts'] = $this->model_design_layout->getLayouts();
            ]]></search>
            <add><![CDATA[
            if (isset($this->request->post['youtube'])) {
               $this->data['youtube'] = $this->request->post['youtube'];
            } elseif (!empty($product_info)) {
                $this->data['youtube'] = $product_info['youtube'];
            } else {
                $this->data['youtube'] = '';
            }
            ]]></add>
        </operation>
    </file>
    <file name="admin/controller/common/header.php">
        <operation>
            <search position="after"><![CDATA[
                $this->data['heading_title'] = $this->language->get('heading_title');
                ]]></search>
            <add><![CDATA[
                //Newsletter Subscribers
                $this->data['text_newssubscribe'] = $this->language->get('text_newssubscribe');
                //Newsletter Subscribers
                ]]></add>
        </operation>
        <operation>
            <search position="before"><![CDATA[
                $this->data['stores'] = array();
                ]]></search>
            <add><![CDATA[
                //Newsletter Subscribers
                $this->data['newssubscribe'] = $this->url->link('sale/newssubscribers', 'token=' . $this->session->data['token'], 'SSL');
                //Newsletter Subscribers
                ]]></add>
        </operation>
    </file>
    <file name="admin/controller/sale/contact.php">
        <operation>
            <search position="after"><![CDATA[
                $results = $this->model_sale_customer->getCustomers($customer_data);
                ]]></search>
            <add><![CDATA[
                // Newsletter subscribers
				$results = $this->model_sale_customer->getNewsletterSubscribers();
				foreach ($results as $result) {
					$emails["s".$result['id']] = $result['email_id'];
				}
 				// Newsletter subscribers only
                ]]></add>
        </operation>
    </file>
    <file name="admin/language/english/catalog/product.php">
        <operation>
            <search position="before"><![CDATA[
                ?>
                ]]></search>
            <add><![CDATA[
                $_['tab_youtube'] = 'Youtube';
                ]]></add>
        </operation>
    </file>
    <file name="admin/language/english/common/header.php">
        <operation>
            <search position="before"><![CDATA[
                ?>
                ]]></search>
            <add><![CDATA[
                $_['text_newssubscribe']     = 'Newsletter Subscribers';
                ]]></add>
        </operation>
    </file>
    <file name="admin/model/catalog/product.php">
        <operation>
            <search position="after"><![CDATA[
                $product_id = $this->db->getLastId();
                ]]></search>
            <add><![CDATA[
                if (isset($data['youtube'])) {
                    $this->db->query("UPDATE " . DB_PREFIX . "product SET youtube = '" . $this->db->escape($data['youtube']) . "' WHERE product_id = '" . (int)$product_id . "'");
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                $this->db->query("DELETE FROM " . DB_PREFIX . "product_description WHERE product_id = '" . (int)$product_id . "'");
                ]]></search>
            <add><![CDATA[
                if (isset($data['youtube'])) {
                    $this->db->query("UPDATE " . DB_PREFIX . "product SET youtube = '" . $this->db->escape($data['youtube']) . "' WHERE product_id = '" . (int)$product_id . "'");
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
		        $this->db->query("DELETE FROM `" . DB_PREFIX . "product_profile` WHERE product_id = " . (int) $product_id);		if (isset($data['product_profiles'])) {			foreach ($data['product_profiles'] as $profile) {				$this->db->query("INSERT INTO `" . DB_PREFIX . "product_profile` SET `product_id` = " . (int) $product_id . ", customer_group_id = " . (int) $profile['customer_group_id'] . ", `profile_id` = " . (int) $profile['profile_id']);			}		}		$this->cache->delete('product');
                ]]></search>
            <add><![CDATA[
                $this->cache->delete('product');
                ]]></add>
        </operation>
    </file>
    <file name="admin/model/design/banner.php">
        <operation>
            <search position="replace"><![CDATA[
                $banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner_id . "'");
                ]]></search>
            <add><![CDATA[
                $banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner_id . "' ORDER BY banner_image_id");
                ]]></add>
        </operation>
    </file>
    <file name="admin/model/sale/customer.php">
        <operation>
            <search position="before"><![CDATA[
                public function getTotalRewards($customer_id) {
                ]]></search>
            <add><![CDATA[
                public function getNewsletterSubscribers() {
                    $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "subscribe");
                    return $query->rows;
                }
                ]]></add>
        </operation>
    </file>
    <file name="admin/view/template/catalog/product_form.tpl">
        <operation error="skip">
            <search position="replace"><![CDATA[
            <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-profile"><?php echo $tab_profile; ?></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></div>
            ]]></search>
            <add trim="true"><![CDATA[
            <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-profile"><?php echo $tab_profile; ?></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-youtube"><?php echo $tab_youtube; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a></div>
            ]]></add>
        </operation>
        <operation error="skip">
            <search position="before"><![CDATA[
            </form>
            ]]></search>
            <add trim="true"><![CDATA[
            <div id="tab-youtube">Youtube Url(s):E.g.http://www.youtube.com/watch?v=xRx3m0cP0Hg,...,...<br /><textarea name="youtube" cols="80" rows="10"><?php echo $youtube; ?></textarea></div>
            ]]></add>
        </operation>
    </file>
    <file name="admin/view/template/common/header.tpl">
        <operation>
            <search position="before"><![CDATA[
                <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
                ]]></search>
            <add><![CDATA[
                <li><a href="<?php echo $newssubscribe; ?>"><?php echo $text_newssubscribe; ?></a></li>
                ]]></add>
        </operation>
    </file>
    <file name="admin/view/template/design/banner_form.tpl">
        <operation>
            <search position="replace"><![CDATA[
                html  = '<tbody id="image-row' + image_row + '">';
                ]]></search>
            <add><![CDATA[
                html  = '<tbody class="MoveableRow" id="image-row' + image_row + '">';
                ]]></add>
        </operation>
        <operation>
            <search position="replace"><![CDATA[
                html += '<td class="left"><a onclick="$(\'#image-row' + image_row  + '\').remove();" class="button"><?php echo $button_remove; ?></a></td>';
                ]]></search>
            <add><![CDATA[
                html += '<td class="left"><a onclick="$(\'#image-row' + image_row  + '\').remove();" class="button"><?php echo $button_remove; ?></a><a class="down_button button">down</a><a class="up_button button">up</a></td>';
                ]]></add>
        </operation>
        <operation>
            <search position="before"><![CDATA[
                <?php echo $footer; ?>
                ]]></search>
            <add><![CDATA[
                <script type="text/javascript"><!--
                $(document).ready(function() {
                    $('.down_button').live('click', function () {
                        var rowToMove = $(this).parents('tbody.MoveableRow:first');
                        var next = rowToMove.next('tbody.MoveableRow')
                        if (next.length == 1) { next.after(rowToMove); }
                    });

                    $('.up_button').live('click', function () {
                        var rowToMove = $(this).parents('tbody.MoveableRow:first');
                        var prev = rowToMove.prev('tbody.MoveableRow')
                        if (prev.length == 1) { prev.before(rowToMove); }
                    });
                });
                //--></script>
                ]]></add>
        </operation>
    </file>
    <file name="admin/view/template/module/carousel.tpl">
        <operation>
            <search position="before"><![CDATA[
                <?php if ($module['position'] == 'content_top') { ?>
                ]]></search>
            <add><![CDATA[
                  <?php if ($module['position'] == 'content_blog') { ?>
                  <option value="content_blog" selected="selected">Blog</option>
                  <?php } else { ?>
                  <option value="content_blog">Blog</option>
                  <?php } ?>
                ]]></add>
        </operation>
        <operation>
            <search position="before"><![CDATA[
                html += '      <option value="content_top"><?php echo $text_content_top; ?></option>';
                ]]></search>
            <add><![CDATA[
                  html += '      <option value="content_blog">Blog</option>';
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/common/column_left.php">
        <operation>
            <search position="after"><![CDATA[
                $this->load->model('catalog/information');
                ]]></search>
            <add><![CDATA[
                $this->data['flash_title'] = $this->language->get('flash_title');
                $this->data['link_1'] = $this->url->link('information/information&information_id=7');
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/common/footer.php">
        <operation>
            <search position="after"><![CDATA[
                $this->data['contact'] = $this->url->link('information/contact');
                ]]></search>
            <add><![CDATA[
                $this->data['text_shopping_cart'] = $this->language->get('text_shopping_cart');
                $this->data['shopping_cart'] = $this->url->link('checkout/cart');
                $this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
                $this->data['logged'] = $this->customer->isLogged();
                $this->data['account'] = $this->url->link('account/account', '', 'SSL');
                $this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'));
                $this->data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/logout', '', 'SSL'));
                $this->data['text_twitter_feeds'] = $this->language->get('text_twitter_feeds');
                $this->data['text_facebook'] = $this->language->get('text_facebook');
                $this->config->get('bs_general');
                $this->data['buyshop_general_settings'] = $this->config->get('bs_general');
                $this->data['themecolor'] = $this->data['buyshop_general_settings']['themecolor'];
                $this->data['contact_info'] = $this->language->get('contact_info');
                $this->data['contact_phone'] = $this->language->get('contact_phone');
                $this->data['phone_numbers'] = $this->language->get('phone_numbers');
                $this->data['cell_phone'] = $this->language->get('cell_phone');
                $this->data['mail_addresses'] = $this->language->get('mail_addresses');
                $this->data['mail_sails'] = $this->language->get('mail_sails');
                $this->data['mail_info'] = $this->language->get('mail_info');
                $this->data['skype_title'] = $this->language->get('skype_title');
                $this->data['skype_accounts'] = $this->language->get('skype_accounts');
                $this->data['socials_title_1'] = $this->language->get('socials_title_1');
                $this->data['socials_title_2'] = $this->language->get('socials_title_2');
                $this->data['socials_title_3'] = $this->language->get('socials_title_3');
                $this->data['socials_title_4'] = $this->language->get('socials_title_4');
                $this->data['socials_title_5'] = $this->language->get('socials_title_5');
                $this->data['socials_title_6'] = $this->language->get('socials_title_6');
                $this->data['socials_link_1'] = $this->language->get('socials_link_1');
                $this->data['socials_link_2'] = $this->language->get('socials_link_2');
                $this->data['socials_link_3'] = $this->language->get('socials_link_3');
                $this->data['socials_link_4'] = $this->language->get('socials_link_4');
                $this->data['socials_link_5'] = $this->language->get('socials_link_5');
                $this->data['socials_link_6'] = $this->language->get('socials_link_6');
                $this->data['buyshop_social_settings'] = $this->config->get('bs_social');
                if (!empty($this->data['buyshop_social_settings']['twitter'])) {
                    $this->data['twitter_account_name'] = $this->data['buyshop_social_settings']['twitter'];
                } else {
                    $this->data['twitter_account_name'] = $this->language->get('account_twitter');
                }
                if (!empty($this->data['buyshop_social_settings']['facebook'])) {
                        $this->data['facebook'] = $this->data['buyshop_social_settings']['facebook'];
                } else {
                    $this->data['facebook'] = $this->language->get('account_facebook');
                }
                $this->data['powered_dresscode'] = sprintf($this->language->get('powered_dresscode'), date('Y', time()));
                ]]></add>
        </operation>
        <operation>
            <search position="before"><![CDATA[
                $this->render();
                ]]></search>
            <add><![CDATA[
                $this->children = array(
                    'common/content_slider',
                    'common/content_footer'
                );
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/common/header.php">
        <operation>
            <search position="after"><![CDATA[
                $this->data['home'] = $this->url->link('common/home');
                ]]></search>
            <add><![CDATA[
                 $this->data['text_search_dresscode'] = $this->language->get('text_search_dresscode');
                $this->data['text_phone_number'] = $this->language->get('text_phone_number');
                $this->data['text_service_tools'] = $this->language->get('text_service_tools');
                $this->data['text_choose'] = $this->language->get('text_choose');
                $this->data['text_option_1'] = $this->language->get('text_option_1');
                $this->data['text_option_2'] = $this->language->get('text_option_2');

                $this->data['blog_item_topmenu'] = $this->language->get('blog_item_topmenu');
				$this->data['blog_url'] = $this->url->link('blog/post', '', 'SSL');

                $this->data['text_choose_category'] = $this->language->get('text_choose_category');
                $this->data['link_welcome_dresscode'] = $this->url->link('account/login', '', 'SSL');
                $this->data['link_logged_dresscode'] = $this->url->link('account/logout', '', 'SSL');
                $this->data['text_welcome_dresscode'] = $this->language->get('text_welcome_dresscode');
                $this->data['text_logged_dresscode'] = $this->language->get('text_logged_dresscode');
                $this->config->get('bs_general');
                $this->data['buyshop_general_settings'] = $this->config->get('bs_general');
                $this->data['font'] = $this->data['buyshop_general_settings']['font'];
                $this->data['bgpattern'] = $this->data['buyshop_general_settings']['bgpattern'];
                $this->data['themecolor'] = $this->data['buyshop_general_settings']['themecolor'];
                $this->data['contentbgcolor'] = $this->data['buyshop_general_settings']['contentbgcolor'];
                $this->data['fontcolor'] = $this->data['buyshop_general_settings']['fontcolor'];
                if (isset($this->data['buyshop_general_settings']['tagstack'])) {
                    $this->data['tagstack'] = $this->data['buyshop_general_settings']['tagstack'];
                }   else {
                    $this->data['tagstack'] = '';
                }
                if (isset($this->data['buyshop_general_settings']['productrollover'])) {
                    $this->data['productrollover'] = $this->data['buyshop_general_settings']['productrollover'];
                }   else {
                    $this->data['productrollover'] = '';
                }
                if (isset($this->data['buyshop_general_settings']['ajaxcart'])) {
                    $this->data['ajaxcart'] = $this->data['buyshop_general_settings']['ajaxcart'];
                }   else {
                     $this->data['ajaxcart'] = '';
                }
                if (isset($this->data['buyshop_general_settings']['response'])) {
                    $this->data['response'] = $this->data['buyshop_general_settings']['response'];
                }   else {
                    $this->data['response'] = '';
                }
                if (isset($this->data['buyshop_general_settings']['blog_link'])) {
                    $this->data['blog_link'] = $this->data['buyshop_general_settings']['blog_link'];
                }   else {
                    $this->data['blog_link'] = '';
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                $this->data['categories'][] = array(
                ]]></search>
            <add><![CDATA[
                'description' => html_entity_decode($category['description'], ENT_QUOTES, 'UTF-8'),
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                $this->children = array(
                ]]></search>
            <add><![CDATA[
                'common/custom_menu',
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/common/home.php">
        <operation>
            <search position="before"><![CDATA[
                $this->children = array(
                ]]></search>
            <add><![CDATA[
                $this->data['text_original_products'] = $this->language->get('text_original_products');
                $this->data['text_free_shipping'] = $this->language->get('text_free_shipping');
                $this->data['text_cash_delivery'] = $this->language->get('text_cash_delivery');
                $this->data['text_day_returns'] = $this->language->get('text_day_returns');
                $this->data['original_products'] = $this->url->link('information/information&amp;information_id=7');
                $this->data['free_shipping'] = $this->url->link('information/information&amp;information_id=8');
                $this->data['cash_delivery'] = $this->url->link('information/information&amp;information_id=9');
                $this->data['day_returns'] = $this->url->link('information/information&amp;information_id=10');
                $this->data['flash_title'] = $this->language->get('flash_title');
                $this->data['text_new_products'] = $this->language->get('text_new_products');
                $this->data['text_sale'] = $this->language->get('text_sale');
                $this->data['text_bestsellers'] = $this->language->get('text_bestsellers');
                ]]></add>
        </operation>

        <operation>
            <search position="after"><![CDATA[
                'common/footer',
                ]]></search>
            <add><![CDATA[
                'common/content_blog',
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/product/category.php">
        <operation>
            <search position="before"><![CDATA[
                if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                ]]></search>
            <add><![CDATA[
                $results_images = $this->model_catalog_product->getProductImages($result['product_id']);
                if ($results_images) {
                    $first = true;
                    foreach ($results_images as $results_image) {
                        if ( $first ) {
                            $popup = $this->model_tool_image->resize($results_image['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                            $first = false;
                        }
                    }
                } else {
                    $popup = false;
                }
                $this->data['youtubes'] = array();
                $query = $this->db->query("SELECT youtube as video FROM ".DB_PREFIX."product WHERE product_id='".(int)$result['product_id']."'");
                $youtubes = explode(',',$query->row['video']);
                $this->data['youtubes'] = $youtubes;
                $this->config->get('bs_general');
                $this->data['buyshop_general_settings'] = $this->config->get('bs_general');
                if (isset($this->data['buyshop_general_settings']['ajaxcart'])) {
                    $this->data['ajaxcart'] = $this->data['buyshop_general_settings']['ajaxcart'];
                } else {
                    $this->data['ajaxcart'] = '';
                }
                $this->data['buyshop_productlabels_settings'] = $this->config->get('bs_productlabels');
                if (isset($this->data['buyshop_productlabels_settings']['sale'])) {
                    $this->data['sale'] = $this->data['buyshop_productlabels_settings']['sale'];
                } else {
                    $this->data['sale'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['video'])) {
                    $this->data['video'] = $this->data['buyshop_productlabels_settings']['video'];
                } else {
                    $this->data['video'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['saleposition'])) {
                    $this->data['saleposition'] = $this->data['buyshop_productlabels_settings']['saleposition'];
                } else {
                    $this->data['saleposition'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['videoposition'])) {
                    $this->data['videoposition'] = $this->data['buyshop_productlabels_settings']['videoposition'];
                } else {
                    $this->data['videoposition'] = '';
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                'product_id'  => $result['product_id'],
                ]]></search>
            <add><![CDATA[
                    'popup'   	 => $popup,
                    'youtube_video' => $youtubes,
                    'name-main'        => strlen($result['name']) > 43 ? utf8_substr(strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), 0, 43) . '..' : $result['name'],
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/product/manufacturer.php">
        <operation>
            <search position="before"><![CDATA[
                if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                ]]></search>
            <add><![CDATA[
                $results_images = $this->model_catalog_product->getProductImages($result['product_id']);
                if ($results_images) {
                    $first = true;
                    foreach ($results_images as $results_image) {
                        if ( $first ) {
                            $popup = $this->model_tool_image->resize($results_image['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                            $first = false;
                        }
                    }
                } else {
                    $popup = false;
                }
                $this->data['youtubes'] = array();
                $query = $this->db->query("SELECT youtube as video FROM ".DB_PREFIX."product WHERE product_id='".(int)$result['product_id']."'");
                $youtubes = explode(',',$query->row['video']);
                $this->data['youtubes'] = $youtubes;
                $this->config->get('bs_general');
                $this->data['buyshop_general_settings'] = $this->config->get('bs_general');
                if (isset($this->data['buyshop_general_settings']['ajaxcart'])) {
                    $this->data['ajaxcart'] = $this->data['buyshop_general_settings']['ajaxcart'];
                } else {
                    $this->data['ajaxcart'] = '';
                }
                $this->data['buyshop_productlabels_settings'] = $this->config->get('bs_productlabels');
                if (isset($this->data['buyshop_productlabels_settings']['sale'])) {
                    $this->data['sale'] = $this->data['buyshop_productlabels_settings']['sale'];
                } else {
                    $this->data['sale'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['video'])) {
                    $this->data['video'] = $this->data['buyshop_productlabels_settings']['video'];
                } else {
                    $this->data['video'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['saleposition'])) {
                    $this->data['saleposition'] = $this->data['buyshop_productlabels_settings']['saleposition'];
                } else {
                    $this->data['saleposition'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['videoposition'])) {
                    $this->data['videoposition'] = $this->data['buyshop_productlabels_settings']['videoposition'];
                } else {
                    $this->data['videoposition'] = '';
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                'product_id'  => $result['product_id'],
                ]]></search>
            <add><![CDATA[
                    'popup'   	 => $popup,
                    'youtube_video' => $youtubes,
                    'name-main'        => strlen($result['name']) > 43 ? utf8_substr(strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), 0, 43) . '..' : $result['name'],
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/product/search.php">
        <operation>
            <search position="before"><![CDATA[
                if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                ]]></search>
            <add><![CDATA[
                $results_images = $this->model_catalog_product->getProductImages($result['product_id']);
                if ($results_images) {
                    $first = true;
                    foreach ($results_images as $results_image) {
                        if ( $first ) {
                            $popup = $this->model_tool_image->resize($results_image['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                            $first = false;
                        }
                    }
                } else {
                    $popup = false;
                }
                $this->data['youtubes'] = array();
                $query = $this->db->query("SELECT youtube as video FROM ".DB_PREFIX."product WHERE product_id='".(int)$result['product_id']."'");
                $youtubes = explode(',',$query->row['video']);
                $this->data['youtubes'] = $youtubes;
                $this->config->get('bs_general');
                $this->data['buyshop_general_settings'] = $this->config->get('bs_general');
                if (isset($this->data['buyshop_general_settings']['ajaxcart'])) {
                    $this->data['ajaxcart'] = $this->data['buyshop_general_settings']['ajaxcart'];
                } else {
                    $this->data['ajaxcart'] = '';
                }
                $this->data['buyshop_productlabels_settings'] = $this->config->get('bs_productlabels');
                if (isset($this->data['buyshop_productlabels_settings']['sale'])) {
                    $this->data['sale'] = $this->data['buyshop_productlabels_settings']['sale'];
                } else {
                    $this->data['sale'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['video'])) {
                    $this->data['video'] = $this->data['buyshop_productlabels_settings']['video'];
                } else {
                    $this->data['video'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['saleposition'])) {
                    $this->data['saleposition'] = $this->data['buyshop_productlabels_settings']['saleposition'];
                } else {
                    $this->data['saleposition'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['videoposition'])) {
                    $this->data['videoposition'] = $this->data['buyshop_productlabels_settings']['videoposition'];
                } else {
                    $this->data['videoposition'] = '';
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                'product_id'  => $result['product_id'],
                ]]></search>
            <add><![CDATA[
                    'popup'   	 => $popup,
                    'youtube_video' => $youtubes,
                    'name-main'        => strlen($result['name']) > 43 ? utf8_substr(strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), 0, 43) . '..' : $result['name'],
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/product/special.php">
        <operation>
            <search position="before"><![CDATA[
                if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                ]]></search>
            <add><![CDATA[
                $results_images = $this->model_catalog_product->getProductImages($result['product_id']);
                if ($results_images) {
                    $first = true;
                    foreach ($results_images as $results_image) {
                        if ( $first ) {
                            $popup = $this->model_tool_image->resize($results_image['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                            $first = false;
                        }
                    }
                } else {
                    $popup = false;
                }
                $this->data['youtubes'] = array();
                $query = $this->db->query("SELECT youtube as video FROM ".DB_PREFIX."product WHERE product_id='".(int)$result['product_id']."'");
                $youtubes = explode(',',$query->row['video']);
                $this->data['youtubes'] = $youtubes;
                $this->config->get('bs_general');
                $this->data['buyshop_general_settings'] = $this->config->get('bs_general');
                if (isset($this->data['buyshop_general_settings']['ajaxcart'])) {
                    $this->data['ajaxcart'] = $this->data['buyshop_general_settings']['ajaxcart'];
                } else {
                    $this->data['ajaxcart'] = '';
                }
                $this->data['buyshop_productlabels_settings'] = $this->config->get('bs_productlabels');
                if (isset($this->data['buyshop_productlabels_settings']['sale'])) {
                    $this->data['sale'] = $this->data['buyshop_productlabels_settings']['sale'];
                } else {
                    $this->data['sale'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['video'])) {
                    $this->data['video'] = $this->data['buyshop_productlabels_settings']['video'];
                } else {
                    $this->data['video'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['saleposition'])) {
                    $this->data['saleposition'] = $this->data['buyshop_productlabels_settings']['saleposition'];
                } else {
                    $this->data['saleposition'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['videoposition'])) {
                    $this->data['videoposition'] = $this->data['buyshop_productlabels_settings']['videoposition'];
                } else {
                    $this->data['videoposition'] = '';
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                'product_id'  => $result['product_id'],
                ]]></search>
            <add><![CDATA[
                    'popup'   	 => $popup,
                    'youtube_video' => $youtubes,
                    'name-main'        => strlen($result['name']) > 43 ? utf8_substr(strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), 0, 43) . '..' : $result['name'],
                ]]></add>
        </operation>
    </file>
    <file name="catalog/controller/product/product.php">
        <operation>
            <search position="after"><![CDATA[
                $this->data['product_id'] = $this->request->get['product_id'];
                ]]></search>
            <add><![CDATA[
                $this->data['rollover_text'] = $this->language->get('rollover_text');
                $this->data['no_rating'] = $this->language->get('no_rating');
                $this->data['tab_youtube'] = $this->language->get('tab_youtube');
                $this->data['youtube_empty'] = $this->language->get('youtube_empty');
                $this->data['youtubes'] = array();
                $query = $this->db->query("SELECT youtube as video FROM ".DB_PREFIX."product WHERE product_id='".(int)$product_id."'");
                $youtubes = explode(',',$query->row['video']);
                $this->data['youtubes'] = $youtubes;
                ]]></add>
        </operation>
        <operation>
            <search position="before" index="2"><![CDATA[
                if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                ]]></search>
            <add><![CDATA[
                $results_images = $this->model_catalog_product->getProductImages($result['product_id']);
                if ($results_images) {
                    $first = true;
                    foreach ($results_images as $results_image) {
                        if ( $first ) {
                            $popup = $this->model_tool_image->resize($results_image['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                            $first = false;
                        }
                    }
                } else {
                    $popup = false;
                }
                $this->data['youtubes_rel'] = array();
                $query_rel = $this->db->query("SELECT youtube as video FROM ".DB_PREFIX."product WHERE product_id='".(int)$result['product_id']."'");
                $this->config->get('bs_general');
                $this->data['buyshop_general_settings'] = $this->config->get('bs_general');
                if (isset($this->data['buyshop_general_settings']['ajaxcart'])) {
                    $this->data['ajaxcart'] = $this->data['buyshop_general_settings']['ajaxcart'];
                }
                $this->data['buyshop_productlabels_settings'] = $this->config->get('bs_productlabels');
                if (isset($this->data['buyshop_productlabels_settings']['sale'])) {
                    $this->data['sale'] = $this->data['buyshop_productlabels_settings']['sale'];
                } else {
                    $this->data['sale'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['video'])) {
                    $this->data['video'] = $this->data['buyshop_productlabels_settings']['video'];
                } else {
                    $this->data['video'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['saleposition'])) {
                    $this->data['saleposition'] = $this->data['buyshop_productlabels_settings']['saleposition'];
                } else {
                    $this->data['saleposition'] = '';
                }
                if (isset($this->data['buyshop_productlabels_settings']['videoposition'])) {
                    $this->data['videoposition'] = $this->data['buyshop_productlabels_settings']['videoposition'];
                } else {
                    $this->data['videoposition'] = '';
                }
                ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
                'product_id' => $result['product_id'],
                ]]></search>
            <add><![CDATA[
                    'popup'   	 => $popup,
                    'youtube_video_rel' => $query_rel->row['video'],
                    'name-main'        => strlen($result['name']) > 43 ? utf8_substr(strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), 0, 43) . '..' : $result['name'],
                ]]></add>
        </operation>
    </file>

    <file name="catalog/controller/module/carousel.php">
        <operation>
            <search position="after"><![CDATA[
                static $module = 0;
                ]]></search>
            <add><![CDATA[
                $this->data['title_brands'] = $this->language->get('title_brands');
                ]]></add>
        </operation>
        <operation>
            <search position="replace"><![CDATA[
                $this->document->addScript('catalog/view/javascript/jquery/jquery.jcarousel.min.js');
                ]]></search>
            <add><![CDATA[
                $this->document->addScript('catalog/view/theme/'. $this->config->get('config_template') .'/js/jquery.carouFredSel-6.2.1-packed.js');
                ]]></add>
        </operation>

    </file>

</modification>