Page 1 of 1

Help with Very simple AJAX live search on Cleaner by Default

Posted: Mon Jan 03, 2011 11:03 am
by moreno13
I need some help with Very simple AJAX live search on Cleaner by Default theme
simple AJAX live search is working on the default one but when I change to the Cleaner by Default theme
is not longer working even know I follow the path like
If you have a different template then the standard one, copy the CSS File in the folder

/catalog/view/theme/default/stylesheet/

to your theme path like

/catalog/view/theme/Cleaner by Default/stylesheet/

Open:
catalog/view/theme/Cleaner by Default/template/common/footer.tpl

Find:
</body>

Add before:
<script type="text/javascript" src="catalog/view/javascript/livesearch.js"></script>

Open:
catalog/view/theme/Cleaner by Default/template/common/header.tpl

<link rel="stylesheet" type="text/css" href="catalog/view/theme/Cleaner by Default/stylesheet/livesearch.css" />

and change all the links is not working
it works just fine on the default one
can any one help me to check what I am not doing right?

can any one help me

Thanks to all the experts who take the time to read this post
God Bless you all.
nice work Opencart team

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Mon Jan 03, 2011 6:27 pm
by Chones
That's my template. I've not used the AJAX live search but it could be because I changed the <div> ids.

In the header.tpl file try changing <div id="cmsearch"> to <div id="search">

and in the stylesheet change #cmsearch to #search

That might work

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 2:19 am
by marc_cole
Craig,

I tried the above fix on your cleaner-2-col-left template and it fixed the problem of not being able to use the Enter key after typing in a search. Unfortunately, it moved the search box to the left of the header and lost the colored box formatting.

I'd like to get the use on the Enter key back when doing searches. Any ideas?

Marc

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 2:34 am
by SapporoGuy
in template/common/header.tpl

you need to change this too.

Code: Select all

<script type="text/javascript"><!--
$('#search input').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 2:36 am
by Chones
Hi Marc,

You need to change all the references to #cmsearch in the stylesheet - there's 5 or 6.

That will put the search box back and add the colour.

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 2:37 am
by Chones
Hi Sapporo, he doesn't if he changes everything back to #search.

I realise now I should have left that alone. You live and learn!

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 2:59 am
by marc_cole
Chones wrote:You need to change all the references to #cmsearch in the stylesheet - there's 5 or 6.
I see what I did wrong. I did a search and replace using Komodo and it also renamed the cmsearchbutton, which shouldn't have been done. I got my enter button back!!!

Thanks,
Marc

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 3:49 am
by Qphoria
Chones wrote:That's my template.
And I love it! I hope you received my donation for it.

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 4:43 am
by Chones
I did Q cheers. It was very much appreciated, especially as you didn't have to. I posted in the template comments to say thanks, and that it meant a lot to me that you were using it as I haven't seen you use anything except the default template before.

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 5:05 am
by Qphoria
Yea. your template really caught my eye and I had to have it.. originally only saw the 3 col version and was going to try to make a 2 col.. and then i found it already done on your site and just had to donate.

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 5:21 am
by Chones
I'm pleased. Your posts have helped me a lot as I know a bit of PHP and MySQL but have never dealt with an MVC application before. Adding a few free templates was my way of giving back, and I do try to help out when I can.

Just one thing - I added a print banner to make printouts look a bit better. I just noticed you haven't changed it. In the template image file just replace print-banner.jpg with your own banner.

Re: Help with Very simple AJAX live search on Cleaner by Def

Posted: Thu Jan 06, 2011 6:28 am
by Qphoria
Ah i see what you mean.. in print preview ..ok thanks