Announcement

Collapse
No announcement yet.

Search Script To Include One Specific Value Of A User Defined Variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Search Script To Include One Specific Value Of A User Defined Variable

    I want to take a copy of the "Search Page Bulk Area" layout and amend it so that I can restrict the search to one value of a user defined variable and I want that to be hidden. This will give me a search facility that is restricted to, in this case, one specific brand.

    I've replaced the SearchablePropertyList layout with

    HTML Code:
    <div style="display:none;">
        <select size="1" name="<Actinic:Variable Name="SearchPropControlName"/>">
             <option value="<Actinic:Variable Name="SearchPropValue"/>" selected>
                  <actinic:variable name="Brand" />
              </option>
        </select>
    </div>
    You won't be suprised to hear that it doesn't work.... otherwise I wouldn't be here! I'm missing something and I can't figure it out. Or am i barking up the wrong tree again? Any clues from those wiser than me will be appreciated.

    thanks

    Goz
    Elysium:Online - Official Accredited SellerDeck Partner
    SellerDeck Design, Build, Hosting & Promotion
    Based in rural Northants

    #2
    Do an online search of the custom variable and copy and paste the results in the URL box - this will then always take you to the results page for that variable.

    You can take this further by replacing the search value in the returned string with the UDV itself so can then search on any other uDV's in the future.

    I do this on the Duck Decanter page for example where the "search tags" are set as UDV's and populate the search string to locate other products with the same tags (UDV)


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Thanks Johnt. Looks good but I missed a bit out on my OP - the ability for the user to also enter a search term. So I'm looking for a facility that allows the user to search for items within a specific Brand (which is a UDV). Unless I've misunderstood your post?
      Elysium:Online - Official Accredited SellerDeck Partner
      SellerDeck Design, Build, Hosting & Promotion
      Based in rural Northants

      Comment


        #4
        Oh OK - against the UDV just set the option to be searchable and then add under Setting > Search Settings .> Serachable Properties... populate the fields with the UDV.

        See http://www.barrelsandbottles.co.uk/acatalog/search.html with the drop downs being UDV fields


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment


          #5
          ... or to put it another way, I want to use Quick Search but restrict the results to items where the Brand UDV is something that I have hard-coded.
          Elysium:Online - Official Accredited SellerDeck Partner
          SellerDeck Design, Build, Hosting & Promotion
          Based in rural Northants

          Comment


            #6
            Can you not set up a brand variable, make it usable on settings > search settings, then upload, go to the advanced search page (search.html), select the brand in question plus a search term and note how the URL is formed, then hard code the brand part of the URL and leave the other to be flexible. That'd be my first effort anyway, must be some mileage in it as people use hard coded search URLs to create dummy navigation.

            Comment


              #7
              I was with you until you talked about hard coding the Brand part and leaving the other to be flexible. I need to think about how to allow the user to enter a search term and then add it to a URL before calling it. Sounds like some Javascript coming up - which has never been my strong point!!
              Elysium:Online - Official Accredited SellerDeck Partner
              SellerDeck Design, Build, Hosting & Promotion
              Based in rural Northants

              Comment


                #8
                Originally posted by leehack View Post
                Can you not set up a brand variable, make it usable on settings > search settings, then upload, go to the advanced search page (search.html), select the brand in question plus a search term and note how the URL is formed, then hard code the brand part of the URL and leave the other to be flexible.
                Which is how I did the links on the Barrels & Bottles site.

                You will not be able to use the quick search entry field and restrict to a UDV ... but you can filter on the UDV on the advanced search page.

                Maybe you could look at using a block if to test the UDV wrapped around the search results list???? But it is how you would populate the block if condition with your UDV dynamically which would pose the fun - you could grab it via some PHP possibly


                Bikster
                SellerDeck Designs and Responsive Themes

                Comment


                  #9
                  Check out page 126 of the v9 AUG - this may be what you are after


                  Bikster
                  SellerDeck Designs and Responsive Themes

                  Comment

                  Working...
                  X