1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Plugin for WP where visitors can click their way through my site

Discussion in 'Web Design' started by iliketurtles, Jun 21, 2011.

  1. iliketurtles

    iliketurtles Regular Member

    Joined:
    Dec 10, 2008
    Messages:
    283
    Likes Received:
    10
    Home Page:
    I need a plugin for WP where the visitor can click his or her way through my site to get answer to their question.

    Let me explain.

    I`m going to set up a new service (not telling you exactly what I'm doing) where the customer have problems with their computer. I wanna help them, and I get paid doing so. Now, I want to set up a website where people can click their way through to get a price estimate at the end, depending on what their problem is.

    For example, the visitor enters my main page, and there are alternatives they can click depending on which alternative is the most similar to what their problem is. I want the customer to click their way through 5-10 of those questions and then get a price estimate. Got it? :)

    Does it exist a plugin for WP that will do this so that I won't have to create a sh*tload of pages?
     
  2. infTee

    infTee Junior Member

    Joined:
    Mar 2, 2010
    Messages:
    101
    Likes Received:
    97
    Location:
    Ireland
    TDO mini forms should be able to do what you want. You may have to put it all in one post/page though. What you are describing could be done with a bit of php also if you want to keep it all in one page but different each time depending what "stage" of giving you the info they are at. Something like this will get you started(not complete code but you get the picture):
    PHP:
    <?php 
    $userid 
    wp_get_current_user(); 
    if ( 
    !== $userid ) { 
        
    $stage get_user_meta$userid"infoStage"true );  
         
        if (
    $stage==""){ 
            
    $stage "beginning"
            
    add_user_meta$userid"infoStage"$stagetrue ); 
        } 
         
        switch (
    $stage) { 
            case 
    'beginning'
                if (isset(
    $_POST['confirmOS'])) { 
                    echo 
    "<p>You have confirmed ".$_POST['confirmOS']." as your operating system. </p>"
                    
    update_user_meta$userid"infoStage""step2" ); 
                    
    update_user_meta$userid"OS"$_POST['confirmOS'] ); 
                    
    ob_start(); 
                    echo 
    '<meta http-equiv="refresh" content="1;http://LinkToSamePageThisCodeIsIn" />'
                    
    ob_flush(); 
                } else { 
                    
    ?> 
                    <Form Name ="form1" Method ="POST" ACTION = ""> 
                    <label for="confirmOS">Your operating system:</label><input type="text" name="confirmOS" /> 
                    <input type="submit" /> 
                    </form><?php 
                

            case 
    'step2'
                
    // More of the same here except collecting different info... 
            
    default: 
                
    ob_start(); 
                echo 
    '<meta http-equiv="refresh" content="1;http://LinkToSamePageThisCodeIsIn" />'
                
    ob_flush(); 
            } 
        
    } else {
        echo 
    "<p>Please login first!</p>";
    }
    ?>