Results 1 to 9 of 9

Thread: Looking for....

  1. #1
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Looking for....

    I really need help here. Going to pull out my hair soon because I simply can't grasp what you guys can. I have someone who wants me to do a collectors site.

    They want the end user to be able to check off what they already have and have it calculate the value.

    Let's say it's hockey cards.

    *picture of hockey card 1* 20.00$ radial button (this one checked off)
    *picture of hockey card 2* 10.00$ radial button
    *picture of hockey card 3* 5.00$ radial button (this one checked off)
    *picture of hockey card 4* 30.00$ radial button

    Total owned= 25.00 Total unowned 40.00

    This is a good example of something that is close to what I am looking for...
    http://www.pugetsystems.com/certified_sys.php?sys_id=51


    Is there any pre written script that would do this? It would aslo have to be linked to a database because of the large amount of collectibles...I think I am in over my head here.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    You can easily (more or less) do it in Flash, which means you can do it in javascript.

    PHP is a possibility as well, although I feel JS handles math a little better.

    What are the stipulations, how many "items" are we talking about etc?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Simple with js:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Calculator</title>
    <script type="text/javascript">
    var value = 0;
    function calc() {
    	value = 0;
    	var el=document.getElementById("contents"),
    		c=el.getElementsByTagName("input");
    	for (var i=0;i<c.length;i++) {
    		if (c[i].checked==true&&c[i].type=="checkbox")
    			value = Number(value)+Number(c[i].getAttribute("rel"));
    		}
    	var t=document.getElementById("total"),
    		el=document.createElement("span");
    	while (t.firstChild) t.removeChild(t.firstChild);
    	el.appendChild(document.createTextNode(value));
    	t.appendChild(el);
    	}
    </script>
    </head>
    <body>
    <div id="contents">
    
    	Hockey Card #1:
    	<br><input type="checkbox" rel="20.00"> $20.00
    
    	<br>Hockey Card #2:
    	<br><input type="checkbox" rel="14.25"> $14.25
    
    	<br>Hockey Card #3:
    	<br><input type="checkbox" rel="15.00"> $15.00
    
    	<br>Hockey Card #4:
    	<br><input type="checkbox" rel="10.05"> $10.05
    
    	<br><input type="button" value="Calculate" onclick="calc()">
    	<br><b>Total:</b>
    	<div id="total"></div>
    </div>
    </body>
    </html>
    Hopefully you understand how to add cards/values.
    Code:
    <input type="checkbox" rel="15.02">
    Once that check box is checked, it will add $15.02 to your total. Simple.
    - Mike

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    See? Told ya JS could do it easy enough
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow..ok I am going to try this right now...I was starting to panic.

    The guy I am doing this for is a Star Wars geek, one of those guys that just sits around all day and think up ways to make money.

    So it will involve every Star Wars toy made.

    He came by yesterday and added more to it I hope some can help modify.

    *picture of hockey card 1* 20.00$ radial button (this one checked off) *Collectors Value guide Price (35.00)*, *profit/loss (15.00)*
    *picture of hockey card 2* 20.00$ radial button (this one not checked off) *Collectors Value guide Price (20.00)*, *profit/loss (0.00)*
    *picture of hockey card 3* 5.00$ radial button (this one NOTchecked off) *(20.00)*, *profit/loss (0.00)*


    40.00 Total unowned 40.00

    Basically the end user would have to be able to enter the amount he paid for the item, then it would subtract it from the actual Collectors Value guide Price

    If this is possible is it possible to have it tied into an excel database, so that when prices fluctuate, he can make changes and upload the file to the site, and this would reflect all the new prices?

    I got a flush feeling while typing this. I will kill him if he decides to make anymore change!!
    Last edited by Frog Brew; 03-13-2007 at 06:42 PM.

  6. #6
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    BTW thanks guys you are saving my sorry @$$...

  7. #7
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    What do you want different? I don't understand the problem.
    - Mike

  8. #8
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok I built a non functioning example so it is more clear. I was even getting frustrated trying to explain.

    http://www.lightthelamp.com/example.jpg

    CVGP=Collectors Value Guide Price
    The end user types in the quantity he has, the price he paid for them,

    So it would be (quantity X CVGP) - (quantity X Cost) = Profit Loss

    Now there would be about 5 lto 10 toys per page, and he wants the total of the items checked off to display at the bottom. So I actually might need a box that displays QTY X Cost in this example it would be 30.00.

    I apologize if I am not clear...

    I know I am in way over... uhg

  9. #9
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is super easy to do in Excel...so I assume it can be done, I just don't know how.

    I could send you an example in Excel that would show what he wants.
    Last edited by Frog Brew; 03-14-2007 at 12:44 AM.

Bookmarks

Posting Permissions

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