BV Commerce Forum
»
BV Commerce Support
»
Development
»
Custom Search Box (adding Cat and Manufacturer dropdowns to the standard keyword field)
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Hey Gang,
Has anyone had success adding a custom search box to their pages? Via the Control Panel, we can add a Search Box object that is just a Keyword field.
I'd love to include the Category, and Manufacturer dropdowns as well.
Is there a simple enough process to do that?
Then, If I wanted to get really crazy (of course i do ;>). I'd love a routine that would... Start with a Category dropdown with All categories as the first After choosing a category, then a second dropdown populates with the sub categories for that choice. and the manufacturer populates with all in that category... Then, If I drill down to a specific sub category, then the manufacturer dropdown populates to that filter.
Any advice on just adding the Cat and Manufacturer searches to the keyword search box would be great. A solution to my dynamic drill down would be amazing!
Thanks -Dave
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Hi All,
Just wanted to ping the forum again. I attempted a few things, without success.
If I can just manage to get Category, Manufacturer and the keyword box on the homepage right sidebar, I'd be a happy camper :>
Thanks -Dave
|
|
|
|
Rank: Member
Joined: 4/10/2006(UTC) Posts: 462
|
We can do the modification as a custom modification, however, depending on the exact functionality you require, it can be a fairly extensive customization. |
Netriplex Corporation<br /> |
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Thanks Caplink.
Just to get the store launched, I'm just trying to get some friendly forum help getting the manufacturer and Category dropdowns on the Homepage along with the keyword box. Basically take a couple of the fields that appear in searchcriteria.ascx and put them in search.ascx.
i was hoping it would be a simple as copying over the asp dropdowns , but I think there is something else I'll need to tweak in the .bv file.
Once I get the site live, then there are a few custom modifications we'll need as a phase 2, but I just need to get some basics rolling first.
Any advice on throwing those 2 dropdown lists in there, would be a great help
Thanks -D
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Doing some digging, I see that the Search.ascx.vb file basically uses a response.redirect and passes the entered keyword as a querystring variable Response.Redirect("~/search.aspx?keyword=" & Server.UrlEncode(Me.KeywordField.Text.Trim))
I need help on proper syntax and/or implementation if this theory would work.. I'm a vbscript guy getting acquainted with .net.
I wonder if I can add the asp dropdowns for Category and Manufacturer, then just enhance the response.redirect. Maybe something like:
Response.Redirect( "~/search.aspx?keyword=" & Server.UrlEncode(Me.KeywordField.Text.Trim) & "&category=" & <the right thing to pass the dropdown variable> & "&mannufacturer=" & <the right thing to pass the dropdown variable> )
I tried manually placing search.aspx?category=whatever into the address bar, but that didn't pull up the contents of a category. So I'm either using the wrong name in the name/value pair, or it's just not gonna work that way.
Any advice? am I at least on the right path? Thanks -Dave
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
I don't think you are on the right path. As far as I know, there is no widget in BVC5 that would understand search criteria like that in the querystring. The only thing that is close is Search.aspx.vb (as you found), but it only understands the "keywords=xxx" syntax.
If I were you, I would create a new user control based off of BVModules\Controls\SearchCriteria.ascx that only includes the fields that you want to search, then use that control on the front page instead of Search.ascx. You could even include code to parse the querystring if you want to be able to send people a URL with the search. But honestly, this is going to be tricky for someone that is not already familiar with .NET. If this feature is critical to startup, then you should probably hire CapLink to solve it this time and then look at how they solved it for next time. |
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Thanks Andy,
After some more digging I found where the Keyword name/value in the querystring comes into play. Within Search.aspx.vb is:
If Request.QueryString("keyword") IsNot Nothing Then
Me.SearchCriteria1.Keyword = Request.QueryString("keyword")
Dim criteria As Catalog.ProductSearchCriteria = Me.SearchCriteria1.GetCriteria DoSearch(criteria) End If
I would have to create that same IsNot Nothing scenario for the other dropdowns as I throw them into the querystring.
Def too much customization for the launch, so we'll leave this stock, until the time (and budget) comes.
Thanks Andy and Caplink for the replies. -Dave
|
|
|
|
Rank: Member
Joined: 3/15/2007(UTC) Posts: 126
|
Hi, I have been in the process of creating an search add-in that will be for sale and used for any BV5 site. I am in the final processes now. The search box will have drop downs based upon store cat's and sub cats. If you would like further information please contact [email protected]. Below is an image of the test search box. Thanks, BMFResposio attached the following image(s): SearchTest.jpg (38kb) downloaded 91 time(s).You cannot view/download attachments. Try to login or register. |
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Brendon,
Great Add-on. I'll be in touch -Dave
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.