Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / How could I make single words in products-description linked?

How could I make single words in products-description linked?

Locked

Views: 2,352

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
23 Sep 2006, 10:21 PM
#1
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

How could I make single words in products-description linked?

Hi,

I am selling stock-photography on my site, and, as the description consits of keywords instead of long phrases, I have to extend the search-ability as much as possible.
Example: There is a picture that shows an appletree, with red apples, standing alone on a wide meadow on a rainy day. So my keywords would be "Apple", "Tree", "Meadow", Rain", Weather", "Alone", Red". Up to now these keywords appear in one line on the Product_info_display in the row, where "officialy" the description woul be. That's fine for me, but i would like to have each of these Words linked as a searchterms, so that if I am clicking i.e. on the keyword "Apple" all pictures with this keyword will be shown in the search_result page.

This is a very common technique with the big stock-agencies and, for the professional users (photo-editors etc) a very helpful an inspiring tool.

So my question in one line:Can anyone give me an idea, on how to code this, "showing single words as (search-) links?

Thanks in advance, I'd appreciate any hint!!!!
jens

23 Sep 2006, 11:30 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How could I make single words in products-description linked?

The search function by default looks at the product description and "single" terms when it searches. Try it out with a few test products and see if this is not what your are seeking

24 Sep 2006, 10:25 AM
#3
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

Re: How could I make single words in products-description linked?

Hi kobra,

thanx for the fast reply.
Yes, I know about this, but what I am trying to do is to use the search-funktionality not over a searchbox but directly by clicking one keyword within the description in order to make it easier to customers to use the search (as I dont't want them to retype the searchterm in a searchbox).

To me it should be a little piece of code, wich is probably integratet in the product_info_displa.php und should be something like "read each word in description and turn each word as into a single link, use this link as searchterm for search_php" ...

unfortunately I am not that fit in php-coding to be able to translate the phrase above into php-code or making a function out of it. Cn you help me????

Maybe it is helpfukl to see the testsite here: https://www.picts-online.de/index.php

Tanks everybody,
jens

24 Sep 2006, 11:27 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How could I make single words in products-description linked?

Better explanation allowed me to see what you are after...

I am sure that this can be done but I am not accomplished enough at php to assist.

Hopefully, another might provide some insight but this might be more involved than one might think on first look.

24 Sep 2006, 11:35 AM
#5
swguy avatar

swguy

Administrator

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

Re: How could I make single words in products-description linked?

jens - remember that the contents of the description can be HTML links. So you could say

These little red shoes are a perfect match for <a href=some link>this little black dress</a>

Hope this helps!
Scott

24 Sep 2006, 8:20 PM
#6
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

Re: How could I make single words in products-description linked?

Thanks kobra and swguy,

@swguy:
Yes, that's true, and this is what it is supposed to do - but, as I explained before, I am importing the descriptions via EP (I have to, according t the big amounts of pictures ("products"), so these links should be generated dynamically while importing them from the db (as far as I think???), because handcoding would take too much time...

Can you still please help me out of the fog????

Thank you Guys,

jens

PS.: forgot one essential info: in the description there are no sentences, but just words, comma-separated.
So Unfortunately no
"little red shoes for the pretty black dress" (what a picture in my mind ;->)
It's more unromantic like
"red,shoes,pretty,black,dress"

24 Sep 2006, 9:02 PM
#7
swguy avatar

swguy

Administrator

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

Re: How could I make single words in products-description linked?

If "red" always points to the same link, and "shoes" likewise, perhaps you could use my "adding boilerplate to text description" tip:

http://www.thatsoftwareguy.com/zencart_php_in_description.html

In your case, the stringlist would be links.

Good luck,
Scott

25 Sep 2006, 8:08 AM
#8
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

Re: How could I make single words in products-description linked?

Hi Scott,

thanks for this link, I am going to test it right tonight. Just one question: what do you mean with "boilerplate"???

Ciao,
jens

25 Sep 2006, 9:57 AM
#9
swguy avatar

swguy

Administrator

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

Re: How could I make single words in products-description linked?

Standardized language you want to repeat again and again. For instance, if you want
your descriptions for certain types of products to include the phrase,

"All our products include a 30 day satisfaction guarantee"

then my tip is a shortcut for adding this "boilerplate."

Good luck,
Scott

25 Sep 2006, 7:28 PM
#10
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

Re: How could I make single words in products-description linked?

Thank you, Scott. I'll never stop learning another language ;->

Starting your suggestion tonight - I think, that might work, I keep you informed

So far and ciao,
jens

25 Sep 2006, 10:08 PM
#11
swguy avatar

swguy

Administrator

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

Re: How could I make single words in products-description linked?

The page has been updated with some examples of using links instead of text.

http://www.thatsoftwareguy.com/zencart_php_in_description.html

Good luck,
Scott

15 Oct 2006, 9:17 PM
#12
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

Re: How could I make single words in products-description linked?

Hi Scott,

sorry that I am so late - there was a lot of work to do... Thanks for the updated Version, and I think, this might work. Yesterday I was trying the approach of your previous version, and, no, this wasn't working for me. Just a question: so I have to use one line of the defines, i.e. define('BLUE_LINK', ....? and then replace 'something else' with my searchwords?

I'll see it by testing it out ;->

ciao, jens