Zen Cart Logo
Forums / All Other Contributions/Addons / Hello Anyone has a search tagcloud mod?

Hello Anyone has a search tagcloud mod?

Locked

Views: 3,679

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
21 Nov 2007, 4:21 AM
#1
adam9110 avatar

adam9110

New Zenner

Join Date:
Jan 2006
Posts:
92
Plugin Contributions:
0

Hello Anyone has a search tagcloud mod?

I have seen this mod in oscommerce cart.
But can not find it in zencart.

Many cool website has these features..

Maybe someone can change the code from Oscommerce to zencart .

check the link of search tagcloud in OS.

addons.oscommerce.com/info/5498

Kind Regards,
Adam

21 Nov 2007, 5:24 PM
#2
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Hello Anyone has a search tagcloud mod?

A zen beta version has been released. Go to http://www.madteckhead.com/blog/zentagcloud to download it.

Matt

22 Nov 2007, 2:37 PM
#3
adam9110 avatar

adam9110

New Zenner

Join Date:
Jan 2006
Posts:
92
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Hello Lankeeyankee,
Thanks for your kind reply.

I have tried this mod days ago.
It works,
But it can not limit the numbers of the tags to be shown.

THe problem is Your webpage will be mass!

I have been contact the author. It seems he dont follow this project currently.

So hope , anyone can get it work.
Thanks

23 Nov 2007, 12:39 AM
#4
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Should be an easy fix, you just need to use LIMIT in the sql query, if you know what I mean. Check the file includes/functions/extra_functions/zentagcloud_func.php, I suspect that you need to change

function zen_get_metatags_keywords1($product_id, $language_id) {
    global $db;
    $product = $db->Execute("select metatags_keywords
                             from " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . "
                             where products_id = '" . (int)$product_id . "'
                             and language_id = '" . (int)$language_id . "'");

    return $product->fields['metatags_keywords'];
  }

to:

function zen_get_metatags_keywords1($product_id, $language_id) {
    global $db;
    $product = $db->Execute("select metatags_keywords
                             from " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . "
                             where products_id = '" . (int)$product_id . "'
                             and language_id = '" . (int)$language_id . "' LIMIT 50");

    return $product->fields['metatags_keywords'];
  }

See the limit i put there? Change it to any number you want.
Again, I dont use this mod, so I'm not 100% sure that it's the query to get the tags (I just think it's the one because of the function's name), but it's the way you do it: find the query that gets the tags, and put a limit there.
yellow1912

24 Nov 2007, 8:43 AM
#5
adam9110 avatar

adam9110

New Zenner

Join Date:
Jan 2006
Posts:
92
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Hello Yellow1912,

you are right. I got it work.

Thanks for your help

Regards,

2 Dec 2007, 2:18 PM
#6
adam9110 avatar

adam9110

New Zenner

Join Date:
Jan 2006
Posts:
92
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Hello yellow1912 ,

It is so weird, i test you method as you indicated above.

I can only limit the category's number and the max is 4. If you Limit 5 above , the all category will be shown.

And I have no method to limit numbers of the Meta keywords.
Please check it back.
Thanks very much

2 Dec 2007, 4:15 PM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,708
Plugin Contributions:
56

Re: Hello Anyone has a search tagcloud mod?

Adam, if you give this feedback to the original author, perhaps he can build these things in.

2 Dec 2007, 5:27 PM
#8
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

adam9110:

Hello yellow1912 ,

It is so weird, i test you method as you indicated above.

I can only limit the category's number and the max is 4. If you Limit 5 above , the all category will be shown.

And I have no method to limit numbers of the Meta keywords.
Please check it back.
Thanks very much
Are you sure you modify the correct query? The one I show you to modify should not have anything to do with the number of categories.

2 Dec 2007, 5:31 PM
#9
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Try to change:

$products_new_query_raw = "SELECT products_id 
                             FROM " . TABLE_PRODUCTS . " p 
                             WHERE products_status = 1 

to

$products_new_query_raw = "SELECT products_id FROM zen_products p WHERE products_status = 1 ORDER BY RAND() LIMIT 50 

You can remove the part ORDER BY RAND() if you want, that part helps you to get random products_ids each time it does a query

Note: this will make the keywords' weight incorrect since it will consider only a limited number of products each time. You will need to dig deeper into the code to find a better way to fix this, I don't have time to do that now

6 Dec 2007, 6:28 PM
#10
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Any url with a working example of this mod?

7 Dec 2007, 12:06 PM
#11
adam9110 avatar

adam9110

New Zenner

Join Date:
Jan 2006
Posts:
92
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Thanks yellow1912,
i did modification according your indications. thought it is not perfect , but it is now enough to me.

But still hope that someone can modify the search Tag cloud from Oscommerce to zenner. It is different from this Tagcloud.
THanks

10 Dec 2007, 7:59 AM
#12
adam9110 avatar

adam9110

New Zenner

Join Date:
Jan 2006
Posts:
92
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Hello , Master yellow1912,

I have tried to modify the search cloudtag from oscommerce version.

But How do i change the db connection code to the zencart readable one ,

As there is code in oscommerce version:

$products_query_raw= "select search, freq from customers_searches where language_id = " .$languages_id." order by search DESC";

$products_query1 = tep_db_query($products_query_raw);

I have tried to change it to like:
$products_query1 = $db->Execute("select search, freq from
" . CUSTOMERS_SEARCHES . "
where language_id =' " .(int)$languages_id ." '
order by search desc");

But i got error:
1064 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 'Object' at line 1
in:
[Object id #35]

Please look it for me !
Thanks very much.

10 Dec 2007, 4:05 PM
#13
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Can you point me to the place where that particular mod is available? I'll take a look when I have time (the end of this week)

11 Dec 2007, 4:40 AM
#14
adam9110 avatar

adam9110

New Zenner

Join Date:
Jan 2006
Posts:
92
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Hi Master Yellow1912,

Thanks very much for your time!

Here is the link;

addons.oscommerce.com/info/5498

You can download the mod there.

Best Regards,

10 Nov 2008, 5:51 PM
#15
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Location:
Roseville, Michigan
Posts:
188
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

Did you ever get this to work?

28 May 2009, 7:43 AM
#16
jansuh_nl avatar

jansuh_nl

New Zenner

Join Date:
Aug 2008
Posts:
30
Plugin Contributions:
0

Re: Hello Anyone has a search tagcloud mod?

I think this might be what i am looking for.

Anybody still working on this?