Page 1 of 1

Shop made Simple: Search Terms

Posted: Tue Sep 28, 2010 1:19 pm
by zappodrom
Hi guys,

I want to add some additional search terms to each product within Shop-made-Simple. Most likely they should not appear in the Productdescription. I tried with the Image-Description and with Attributes, but no success. Did'nt these fields indexed by the search module? Is there a way to get an extra field for search terms for example?

Hope someone could help.

Regards...

Re: Shop made Simple: Search Terms

Posted: Tue Sep 28, 2010 3:49 pm
by Duketown
zappodrom,

I used 'AddWords' as search criterium on this forum. I found at least the following:
http://forum.cmsmadesimple.org/index.php?topic=33025.0.

I think that if you push the following code in an UDT (copied and changed from mentioned topic):

Code: Select all

$modulename = 'ShopMadeSimple';
$module =& $this->GetModuleInstance('Search');
if ($module != FALSE)
  {	
	$text = 'search argument to a product';
	$module->AddWords($modulename, $product['product_id'], 'product', $text, NULL); // the last one is the expiry date
}
Duketown

Re: Shop made Simple: Search Terms

Posted: Wed Sep 29, 2010 6:10 am
by zappodrom
Thanks, Duke.

If I understand the code, I have to add something like this in every Productdescription?

Code: Select all

{ProductSearch text='FooBar, Blah, Boing'}
Am I right?
Maybe it's possible to get an additional contentfield within the Articeldetail-Tab (just for usabillity of course ;) )?

Regards...

Re: Shop made Simple: Search Terms

Posted: Wed Sep 29, 2010 3:52 pm
by Duketown
zappodrom,

That will (I've not tested it) add search words each time a visitor checks the details of a product on the front end. Not exactly what you want I would say.
You will have to do something more manually:
- Prepare the UDT with a variable for product id and text to search for;
- Use the UDT on a hidden page on the front end;
- Request the page each time you added a product or want to add new search criteria.

Hardly a nice solution. Best way to get this solved is indeed something like a text field in which one could fill in additional search criteria per product. Either you have to extend the module your selve (if you need the function now or put in a feature request so I know that at least you want something like this as a function in the module.

Duketown

Re: Shop made Simple: Search Terms

Posted: Thu Sep 30, 2010 11:10 am
by zappodrom
Duketown,

maybe it's easier to make the Search-module crawl the Picture-Description Field or something else?