SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2008
    0 Post(s)
    0 Thread(s)

    Interactive Product Selector

    I am wanting to do something similar to this:

    My question involves the concept rather than any specific code on how to execute this.

    For example, we are selling violins and we want the user to input info about their playing style, and give them the three best violins based on their entry.m This is the data I've been given:

    Level: Beginner Intermediate Advanced
    Soil, Kreisler, Gibson Soil, Kreisler, Ysaye, Cremonese, Gibson Cannon, Soil, Ysaye, K.Joseph, Keifetz
    Bowing Style: Soft Medium Hard
    Soil, Medici, Kreisler Soil, Medici, K.Joseph, Ysaye Cannon, Kreisler, Soil, Heifetz
    Musical Style: Classical Fiddle Rock
    Ysaye, Soil, Provigny Medici, Ysaye, K.Joseph Kreisler, Diable, Vieuxtemps
    Desired Tone: Bright Balanced Dark
    Soil, Medici, Provigny Kreisler, Soil, Ysaye Cannon, Diable, Plowden

    So if the user inputs Expert, Hard, Rock, and Dark I will data sets of violins consisting of: Cannon, Soil, Ysaye, K.Joseph, Heifetz // Cannon, Kreisler, Soil, Heifetz // Kreisler, Diable, Vieuxtemps // Cannon, Diable, Plowden

    Out of those I need to output the user the three best choices for them. Cannon is listed in 3 out of the 4, so that has to be #1. Now there are three more violins that match two of the criteria. The Soil, Kriesler and Diable. In order to drill that down to two choices, I would think the questions would have to be ranked according to importance. For instance Tone is most important, followed by bowing style, musical genre, and skill level. Based on that ranking, the program should choose the Diable and Kreisler.

    I am not entirely sure how to approach this. Since this data will not change frequently, should this even get the database involved? Should the info just be stored in a multi-dimensional array? Once the data is in an array, whether from the DB or not, how should I go about programming the logic to examine the arrays in order of importance and grab the violins that are most relevant?

    Any help is much appreciated! I figured this was going to be easy, until I actually started thinking about it!

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2012
    1 Post(s)
    0 Thread(s)
    I would think your best option would be jQuery or JS. JMO


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts