Post by czLEONcz » Thu Apr 23, 2009 3:41 am

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.

New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by fido-x » Thu Apr 23, 2009 8:44 am

Instructions on how to move the "search" module to the column can be found here http://forum.opencart.com/viewtopic.php ... 770#p18124

Image
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!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by phpuk » Thu Apr 23, 2009 9:12 am

Hi,

Here is how to move the search to a column in version 1.2.6.

You need to convert search in to a module

Code: Select all

INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES
(16, 'module', 'search');
Then add settings for the new search module

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');
Then in admin add 1 to the sort order for categories to make it (2) same with brands (3) same with information (4)

Script: catalog/view/theme/default/template/common/header.tpl
Line: 3

Code: Select all

  <!--<div class="div3"><?php //echo $language; ?><?php //echo $search; ?></div>-->
Script: catalog/controller/common/header.php
Lines: 27 - 28

Code: Select all

			//'common/language', 
			//'common/search' 
copy the script: catalog/controller/common/search.php
to
catalog/controller/module/search.php
then change line 2 to this:

Code: Select all

class ControllerModuleSearch extends Controller {
then change line 4 to this:

Code: Select all

$this->load->language('module/search');
then change line 20 to this:

Code: Select all

$this->template = $this->config->get('config_template') . 'module/search.tpl';
Then copy the script catalog/view/theme/default/template/common/search.tpl
to
catalog/view/theme/default/template/module/search.tpl

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.

Let me know if you have any problems.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Thu Apr 23, 2009 5:02 pm

Hi,

Where do I insert this code ???

Thank you.


Hi,

Here is how to move the search to a column in version 1.2.6.

You need to convert search in to a module


INSERT INTO `extension` (`extension_id`, `type`, `key`) VALUES
(16, 'module', 'search');


Then add settings for the new search module


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');

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by phpuk » Thu Apr 23, 2009 5:15 pm

Hi,

This is not code they are sql statements so you have to go in to phpMyAdmin and select your database that contains opencart and click on the sql tab.

Then copy and paste these sql statements one at a time in to there and press go between each one.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by phpuk » Fri Apr 24, 2009 1:32 am

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.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Sat Apr 25, 2009 7:41 am

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.
Hi,
succeeded to :)
how to put in the box and the center ???
thank you very much - "Phil - phpuk"

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by phpuk » Sat Apr 25, 2009 9:47 am

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.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Mon May 04, 2009 11:47 pm

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.
Hi,

Everything is ok.
I can not seem to add to div.
Please help

Thank you...

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by phpuk » Fri May 08, 2009 9:15 am

Sorry I not been around much as I have been busy.

Have you managed to sort this out yet?

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Fri May 08, 2009 9:29 am

Hi,
this is cool.
I did not do this.

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by phpuk » Fri May 08, 2009 9:31 am

Are you happy with the way that it is or do you want to wrap it in a div?

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Fri May 08, 2009 9:37 am

To wrap it in a div.

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by czLEONcz » Fri May 08, 2009 5:16 pm

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.
Hi,
I want to insert into the code before installing.
How do I do ???
The code I add to opencart.sql ???
Please for the exact procedure... :-[
Thank you for the advice...

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by phpuk » Fri May 08, 2009 10:37 pm

Creating the search side module in version 1.2.6 (FRESH INSTALL!):

Script: catalog/view/theme/default/template/common/header.tpl
Line: 3

Code: Select all

  <!--<div class="div3"><?php //echo $language; ?><?php //echo $search; ?></div>-->
Script: catalog/controller/common/header.php
Lines: 27 - 28

Code: Select all

			//'common/language',      // Changed
			//'common/search'         // Changed
copy the script: catalog/controller/common/search.php
to
catalog/controller/module/search.php
then change line 2 to this:

Code: Select all

class ControllerModuleSearch extends Controller {
then change line 4 to this:

Code: Select all

$this->load->language('module/search');
then change line 20 to this:

Code: Select all

$this->template = $this->config->get('config_template') . 'module/search.tpl';
Then copy the script catalog/view/theme/default/template/common/search.tpl
to
catalog/view/theme/default/template/module/search.tpl

Then copy the catalog/language/english/common/search.php
to
catalog/language/english/module/search.php

Adding search to a side module div...

Script: catalog/view/theme/default/template/module/search.tpl

Replace with this:

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>
Copy the attached search icon to catalog/view/theme/default/image/

open the sql file opencart.sql.

Go to line 596:
replace it with this:

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');
Then go to what will be line 1357 and replace with this:

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');
I think thats it.
Phil.

Attachments

icon_search.png

The search icon - icon_search.png (613 Bytes) Viewed 8458 times


Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Fri May 08, 2009 11:28 pm

Hi,
Thank you very much for being willing to.

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by phpuk » Fri May 08, 2009 11:38 pm

You are welcome

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Sat May 09, 2009 2:57 am

Hi,
shows me this error...

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


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm

Post by phpuk » Sat May 09, 2009 4:44 am

Sorry missed a comma at the end of the line

Code: Select all

(6293, 'config', 'config_store', 'Your Store'),
Note the ( , ) comma at the end of the line.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by czLEONcz » Sat May 09, 2009 5:06 am

Thanks Phil.

czLEONcz


New member

Posts

Joined
Fri Mar 20, 2009 5:35 pm
Who is online

Users browsing this forum: No registered users and 3 guests