X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Show search keywords in description of product (https://forum.x-cart.com/showthread.php?t=26481)

Warwick 11-09-2006 06:01 AM

Show search keywords in description of product
 
I'm trying to figure out how to get the 'Search keywords' showing on the product page somewhere in the description.

Can somebody help me with this? Thanks in advance!

balinor 11-09-2006 06:03 AM

Re: Show search keywords in description of product
 
Search keywords?

Warwick 11-09-2006 06:16 AM

Re: Show search keywords in description of product
 
1 Attachment(s)
Yep, the ones in the admin part of your product (see attachment).

Warwick 11-09-2006 06:23 AM

Re: Show search keywords in description of product
 
1 Attachment(s)
To get an idea like this attachment:
(unfortunately I only manage in Photoshop :) )

balinor 11-09-2006 06:24 AM

Re: Show search keywords in description of product
 
Ah sorry, forgot those appeared in 4.1....not familiar enough with them to help, sorry :(

Warwick 11-10-2006 03:33 AM

Re: Show search keywords in description of product
 
Anybody? Please ... :)

geckoday 11-10-2006 06:26 AM

Re: Show search keywords in description of product
 
Try adding {$product.keywords} into your product.tpl

Warwick 11-12-2006 03:48 AM

Re: Show search keywords in description of product
 
Thanks! That works :)

Warwick 01-17-2007 08:21 AM

Re: Show search keywords in description of product
 
But how to get the displayed search keywords clickable ?

Imagine something looking like this:

Related search terms: blue, medium, cotton

When you click on let's say 'blue' the search engine is used displaying all products found with 'blue' as search keyword. I hope this makes sense?

clik 11-12-2008 08:32 AM

Re: Show search keywords in description of product
 
I'm looking for exactly the same stuff.
Warwick, have you found the solution with keywords and linking them?

Warwick 11-12-2008 10:51 AM

Re: Show search keywords in description of product
 
Well I did but it only works when you have the smart search mod from alteredcart installed ... if you do I can quote the code needed.

p.s. the mod isn't needed to get this working but I haven't got the old code (anymore) ...

TheWrongGrape 05-11-2010 05:09 PM

Re: Show search keywords in description of product
 
Got this working on 4.3.1. I'm using my Search Keywords as "Tags" to encourage customers to browse more.

After searching for clickable search keywords, I got a lot of help from this thread by wjbrewer.

Please read that over first.

Firstly, I didn't need to mod my search so you can ignore the part about that.

In product.php, where wjbrewer indicated, I pasted in:

Code:

$keywords = split(",", $product_info['keywords']);
$smarty->assign('keywords', $keywords);


The above is different from what wjbrewer originally posted in that it recognizes that my keywords are comma-separated and will break them up as such, including keyword phrases that consist of more than one word with spaces in between.

Then in my template where I want the keywords to show up (/customer/main/products_details.tpl in my case), I put in the following which will return my keywords on one line, followed by a pipe symbol (except for the last value) and each will be turned into a link:

Code:

{if $product.keywords ne ""}
Tags: {foreach from=$keywords item=keyword name=kw}
<a href="../search.php?mode=search&by_title=Y&by_descr=Y&by_sku=Y&search_in_subcategories=Y&including=all&substring={$keyword}">{$keyword}</a> {if !$smarty.foreach.kw.last}| {/if} {/foreach}{/if}


The end result looks like this:

Tags: Feminine | Floral | Sweet and Sassy

Hope this helps someone!

nickff 10-19-2010 04:49 AM

Re: Show search keywords in description of product
 
Hello,

I am looking to do something similar, but instead of the keywords appearing on the product pages themselves, I am wanting to create a page with all of the keywords entered across the site. Other than that, the same fuctionality (clickable tags that take you to a results page with the products associated with that tag).

Any ideas on how to implement this on it's own page? Let me know, thanks!


All times are GMT -8. The time now is 09:58 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.