Dynamic Pricing Meter ?

Posted on 2014-08-25
Last Modified: 2014-09-08
This is a pricing meter that is suppposed to reflect options that a user chooses (it will be in a form below).

Example, user is selecting a laptop, making adjustments to CPU, memory, screen size, etc.

As they make choices and recalculate the price meter should animate to reflect the new price.

This will be done in Drupal. Are there existing modules? Or if not Drupal, exisiting JavaScript frameworks that can get me here?

screen capture
Question by:sandshakimi
    LVL 30

    Accepted Solution

    I don't know about Drupal specific modules but I guess it doesn't matter anyway.
    Your data should come either from client-side calculations or AJAX requests feeding the javascript based gauge chart with the data.

    Here are some good resources:

    All of the above have comprehensive demos and examples.
    LVL 107

    Assisted Solution

    by:Ray Paseur
    There are so many moving parts to an application like this, that I think you'll get better results if you break it down into component parts.  Here is my guess at the outline.

    1. A simple form script to configure the laptop.  As you start, you can make the request via GET, but when you implement the application you will want to change to POST.  The advantage of GET is that you can make the requests via the browser URL while you are testing.  This script will eventually become the server-side of the AJAX application.  It will be easier to debug this separately, decoupled from the client-side JavaScript.

    2. A database abstraction layer.  The server-side script will need to send the laptop configuration to the data base layer and get back validated data, including cost components.  Since laptop prices change rapidly and frequently this should be a separate module.

    3. A client-side layer that (at first) just displays the cost components.  As your other layers of the application come together, this layer can begin to build attractive visual elements like charts or sliders, based on the data from the AJAX server-side script.

    It's an interesting project.  Good luck with it!

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now