I have OpenCart 1.2.6
where I want to change the module search for him on the left top of the category of how to do according to the attached image

Thank you very much for being willing to.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Code: Select all
INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES
(16, 'module', 'search');
Code: Select all
INSERT INTO `setting` (`setting_id`, `group`, `key`, `value`) VALUES
(6353, 'search', 'search_position', 'left'),
(6354, 'search', 'search_status', '1'),
(6355, 'search', 'search_sort_order', '1');
Code: Select all
<!--<div class="div3"><?php //echo $language; ?><?php //echo $search; ?></div>-->
Code: Select all
//'common/language',
//'common/search'
Code: Select all
class ControllerModuleSearch extends Controller {
Code: Select all
$this->load->language('module/search');
Code: Select all
$this->template = $this->config->get('config_template') . 'module/search.tpl';
czLEONcz
Hi,phpuk wrote:Hi,
Oops forgot to include this instruction.
you also need to copy the script catalog/language/english/common/search.php
to
catalog/language/english/module/search.php
Phil.
czLEONcz
Hi,phpuk wrote:Hi,
As mentioned you then need to simply edit the css file and the script catalog/view/theme/default/template/module/search.tpl to the layout you require.
You will need css like text-align: center and you could style the div so it has the grey background like the original etc...
Phil.
czLEONcz
Hi,czLEONcz wrote:Hello all,
I have OpenCart 1.2.6
where I want to change the module search for him on the left top of the category of how to do according to the attached image
Thank you very much for being willing to.
czLEONcz
Code: Select all
<!--<div class="div3"><?php //echo $language; ?><?php //echo $search; ?></div>-->
Code: Select all
//'common/language', // Changed
//'common/search' // Changed
Code: Select all
class ControllerModuleSearch extends Controller {
Code: Select all
$this->load->language('module/search');
Code: Select all
$this->template = $this->config->get('config_template') . 'module/search.tpl';
Code: Select all
<div class="box">
<div class="top" style="background: url('catalog/view/theme/default/image/icon_search.png') 8px 8px no-repeat; padding-left: 30px;"><?php echo $heading_title; ?></div>
<div class="middle">
<?php if ($keyword) { ?>
<input type="text" name="keyword" value="<?php echo $keyword; ?>" id="filter_keyword" />
<?php } else { ?>
<input type="text" name="keyword" value="<?php echo $text_keywords; ?>" id="filter_keyword" onclick="this.value = ''" />
<?php } ?>
<a onclick="location = 'index.php?route=product/search&keyword=' + encodeURIComponent($('#filter_keyword').attr('value'));" class="button"><span><?php echo $button_search; ?></span></a>
</div>
<div class="bottom"></div>
</div>
Code: Select all
INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES
(14, 'total', 'coupon'),
(22, 'total', 'shipping'),
(63, 'total', 'low_order_fee'),
(57, 'total', 'sub_total'),
(58, 'total', 'tax'),
(59, 'total', 'total'),
(76, 'shipping', 'free'),
(107, 'module', 'cart'),
(78, 'module', 'category'),
(79, 'module', 'currency'),
(80, 'module', 'information'),
(81, 'module', 'manufacturer'),
(108, 'module', 'bestseller'),
(83, 'payment', 'bank_transfer'),
(109, 'payment', 'cheque'),
(110, 'module', 'search');
Code: Select all
INSERT INTO `setting` (`setting_id`, `group`, `key`, `value`) VALUES
(5583, 'coupon', 'coupon_sort_order', '4'),
(6135, 'free', 'free_sort_order', '1'),
(6134, 'free', 'free_status', '1'),
(6133, 'free', 'free_geo_zone_id', '0'),
(5585, 'shipping', 'shipping_sort_order', '3'),
(5584, 'shipping', 'shipping_status', '1'),
(5393, 'sub_total', 'sub_total_status', '1'),
(5582, 'coupon', 'coupon_status', '1'),
(5394, 'sub_total', 'sub_total_sort_order', '1'),
(6320, 'config', 'config_forgotten_subject_1', 'Your Store - New Password'),
(6321, 'config', 'config_forgotten_message_1', 'A new password was requested from Your Store.\r\n\r\nYour new password to is:\r\n\r\n{password}'),
(6322, 'config', 'config_order_subject_1', 'Your Store - Order #{order_id}'),
(6323, 'config', 'config_order_message_1', 'Thank you for interest in Your Store products. Your order has been received and will be dealt with as quickly as possible.\r\n \r\nOrder ID: #{order_id}\r\nDate Ordered: {date_added}\r\n\r\nTo view you order click the link below:\r\n{invoice}\r\n\r\nTo view you order click the link below:\r\n{download}\r\n\r\n{shipping}\r\n\r\n{payment}\r\n\r\n{product}\r\n\r\n{total}\r\n\r\nThe comments for your order are:\r\n\r\n{comment}\r\n\r\nPlease reply to this email if you have any questions.'),
(6326, 'config', 'config_cache', '1'),
(6327, 'config', 'config_compression', '4'),
(6132, 'free', 'free_total', ''),
(5512, 'low_order_fee', 'low_order_fee_sort_order', '2'),
(5511, 'low_order_fee', 'low_order_fee_status', '0'),
(5510, 'low_order_fee', 'low_order_fee_fee', '5'),
(5506, 'tax', 'tax_sort_order', '5'),
(5505, 'tax', 'tax_status', '1'),
(5509, 'low_order_fee', 'low_order_fee_total', '100'),
(5587, 'total', 'total_sort_order', '6'),
(5586, 'total', 'total_status', '1'),
(6324, 'config', 'config_update_subject_1', 'Your Store - Order Update #{order_id}'),
(6325, 'config', 'config_update_message_1', 'Order ID: #{order_id}\r\nDate Ordered: {date_added}\r\n\r\nYour order has been updated to the following status: {status}\r\n\r\nThe comments for your order are:\r\n\r\n{comment}\r\n\r\nTo view your order click the link below:\r\n{invoice}\r\n\r\nPlease reply to this email if you have any questions.'),
(6316, 'config', 'config_download', '1'),
(6317, 'config', 'config_download_status', '5'),
(6318, 'config', 'config_account_subject_1', 'Your Store - Thank you for registering'),
(6319, 'config', 'config_account_message_1', 'Welcome and thank you for registering at Your Store!\r\n\r\nYour account has now been created and you can log in by using your email address and password by visiting our website or at the following URL:\r\n{login}\r\n\r\nUpon logging in, you will be able to access other services including reviewing past orders, printing invoices and editing your account information.\r\n\r\nThanks,\r\nYour Store'),
(6315, 'config', 'config_stock_status_id', '5'),
(6314, 'config', 'config_order_status_id', '1'),
(6313, 'config', 'config_stock_subtract', '0'),
(6312, 'config', 'config_stock_checkout', '0'),
(6311, 'config', 'config_stock_check', '1'),
(6310, 'config', 'config_weight_class_id', '1'),
(6309, 'config', 'config_tax', '1'),
(6308, 'config', 'config_currency_auto', '1'),
(6307, 'config', 'config_currency', 'GBP'),
(5975, 'bestseller', 'bestseller_sort_order', '3'),
(5915, 'category', 'category_position', 'left'),
(5916, 'category', 'category_status', '1'),
(5917, 'category', 'category_sort_order', '1'),
(5918, 'currency', 'currency_position', 'right'),
(5919, 'currency', 'currency_status', '1'),
(5920, 'currency', 'currency_sort_order', '2'),
(5921, 'information', 'information_position', 'left'),
(5922, 'information', 'information_status', '1'),
(5923, 'information', 'information_sort_order', '3'),
(5924, 'manufacturer', 'manufacturer_position', 'left'),
(5925, 'manufacturer', 'manufacturer_status', '1'),
(5926, 'manufacturer', 'manufacturer_sort_order', '2'),
(5955, 'cart', 'cart_sort_order', '1'),
(5954, 'cart', 'cart_status', '1'),
(5953, 'cart', 'cart_position', 'right'),
(5974, 'bestseller', 'bestseller_status', '1'),
(5973, 'bestseller', 'bestseller_position', 'right'),
(5972, 'bestseller', 'bestseller_limit', '5'),
(6306, 'config', 'config_language', 'en'),
(6145, 'cheque', 'cheque_sort_order', '1'),
(6144, 'cheque', 'cheque_status', '1'),
(6143, 'cheque', 'cheque_geo_zone_id', '0'),
(6142, 'cheque', 'cheque_order_status_id', '1'),
(6141, 'cheque', 'cheque_payable', 'OpenCart'),
(6305, 'config', 'config_zone_id', '3563'),
(6304, 'config', 'config_country_id', '222'),
(6301, 'config', 'config_ssl', '0'),
(6302, 'config', 'config_parse_time', '0'),
(6303, 'config', 'config_welcome_1', '<p>Welcome to my store!</p>'),
(6300, 'config', 'config_template', 'default/template/'),
(6299, 'config', 'config_fax', ''),
(6298, 'config', 'config_telephone', '123456789'),
(6140, 'bank_transfer', 'bank_transfer_sort_order', '1'),
(6139, 'bank_transfer', 'bank_transfer_status', '1'),
(6138, 'bank_transfer', 'bank_transfer_geo_zone_id', '0'),
(6137, 'bank_transfer', 'bank_transfer_order_status_id', '1'),
(6136, 'bank_transfer', 'bank_transfer_bank_1', 'Account: Name\r\nAccount IBAN: AC00 0000 0000 0000 0000 0000 000\r\nBIC / SWIFT Code: ABCDEFGHIJK\r\nBank: Bank name, city'),
(6294, 'config', 'config_meta_description', 'your store of fun'),
(6297, 'config', 'config_email', 'webmaster@opencart.com'),
(6296, 'config', 'config_address', 'Address 1'),
(6295, 'config', 'config_owner', 'Your Name'),
(6293, 'config', 'config_store', 'Your Store')
(6353, 'search', 'search_position', 'left'),
(6354, 'search', 'search_status', '1'),
(6355, 'search', 'search_sort_order', '1');
The search icon - icon_search.png (613 Bytes) Viewed 8469 times
Code: Select all
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6353, 'search', 'search_position', 'left'), (6354, 'search', 'search_status', ' at line 84
czLEONcz
Code: Select all
(6293, 'config', 'config_store', 'Your Store'),
Users browsing this forum: No registered users and 3 guests