Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Linking directly to a search result

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-02-2007, 05:41 AM
 
annasoaps annasoaps is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 39
 

Default Linking directly to a search result

On the main page I would like to be able to link to a temporary category of products, let's say for instance that the scent of the week would be blueberries. If I search for Blueberry I get all the products that have a blueberry scent, so would it be possible to post a link with that search "built in"? (hope I'm making sense...)

Or do I have to make a hidden subcategory and put the products in there manually?

Any ideas greatly appreciated!!
/Anna
__________________
X-cart Version 4.1.7
Reply With Quote
  #2  
Old 08-03-2007, 02:40 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

X-Adept
  
Join Date: Mar 2004
Location: The Universe is my home
Posts: 420
 

Default Re: Linking directly to a search result

Try the following code:
Code:
<a href="{$http_location}/search.php?mode=search&substring=blueberries&including=phrase&by_title=on&by_shortdescr=on&by_full descr=on&category_main=on&category_extra=on">blueberries</a>
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote
  #3  
Old 08-03-2007, 03:12 AM
 
annasoaps annasoaps is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 39
 

Default Re: Linking directly to a search result

Thanks so much! It works perfectly!

Many thanks!

/Anna
__________________
X-cart Version 4.1.7
Reply With Quote
  #4  
Old 08-03-2007, 04:47 AM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: Linking directly to a search result

Each search result page has 'This page URL' link at the bottom. You can use this URL to create 'dynamic categories'.
Attached Thumbnails
Click image for larger version

Name:	scrshot.png
Views:	170
Size:	3.0 KB
ID:	499  
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
  #5  
Old 08-07-2007, 08:50 AM
 
Dawn Howard Dawn Howard is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 229
 

Default Re: Linking directly to a search result

I'm trying this as well

Code:
http://www.duffystric.com/search.php?mode=search&substring=palm+island&including=phrase&by_title=on&by_shortdescr=on&by_full descr=on&category_main=on&category_extra=on

the URL by its self works fine, but I'm using it as part of a java script in the header:

Code:
{literal} <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var mfBanners = [ ['http://www.duffystric.com/search.php?mode=search&substring=palm+island&including=phrase&by_title=on&by_shortdescr=on&by_full descr=on&category_main=on&category_extra=on', 'http://www.duffystric.com/1palm.jpg'], ['http://www.duffystric.com/home.php?cat=85', 'http://www.duffystric.com/1new.jpg'] ]; var mfIe = false; if( document.all) { mfIe = true; } var mfBannerIndex = 0; function mfBannerChange() { var htmlString = '<a href="'+mfBanners[mfBannerIndex][0]+'"> <img border="0" src="'+mfBanners[mfBannerIndex][1]+'"></a>'; if( mfIe) { document.all.banner.innerHTML = htmlString; } else { document.layers["banner"].document.open(); document.layers["banner"].document.write( htmlString); document.layers["banner"].document.close(); } if(mfBannerIndex < mfBanners.length - 1) mfBannerIndex++; else mfBannerIndex = 0; } setInterval("mfBannerChange()", 5000); // End --> </script> {/literal}


as part of the java script, the search pulls up all kinda of stuff with out the words: palm island.

help?
__________________
Dawn
X-Cart Business 5.3.6.3
Mods:
Qty input - Custom Mod
Part numbers near title - Custom Mod
Membership approval before ordering - Custom Mod
Order Forms - Custom Mod
Freight on Board - Custom Mod
Catalog Order Form
Call For Price
Template: Crisp White skin
Running on Windows
Reply With Quote
  #6  
Old 10-03-2007, 03:14 AM
 
Polvo Polvo is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 35
 

Default Re: Linking directly to a search result

Quote:
Originally Posted by Zaja
Try the following code:
<a href="{$http_location}/search.php?mode=search&substring=blueberries&including=phrase&by_title=on&by_shortdescr=on&by_ full descr=on&category_main=on&category_extra=on">blueberries</a>

Any idea why adding the following doesn't work?
Code:
posted_data_by_sku=on

The URL created at the bottom of the search results doesn't work either, its:
Code:
http://www.mysite.co.uk/shop/search.php?mode=search&substring=sku123&including=all&by_title=on

Paul
__________________
X-Cart Gold 4.1.12
X-Special Offers
Desktop: XP Pro/Notepad++/FileZilla
Server: Linux
Reply With Quote
  #7  
Old 10-08-2007, 09:10 AM
 
Polvo Polvo is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 35
 

Default Re: Linking directly to a search result

I reported my last post as a bug and X-Cart support now have a fix which they installed for me. I can now search for a SKU via a URL.

Paul
__________________
X-Cart Gold 4.1.12
X-Special Offers
Desktop: XP Pro/Notepad++/FileZilla
Server: Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:29 AM.

   

 
X-Cart forums © 2001-2020