1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

A+b+c=x

Discussion in 'Web Design & Development' started by theatreus, Oct 29, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    Ok so I have products to sell...
    I never thought it would be this difficult... but after my crash courses in JAVASCRIPT and PHP im left really confused... so if anyone knows really really good tutorials to teach those languages and other languages too that would be awesome but not w3schools that's where i got confused anyway that's not what im asking about but on a side note if anyone can help on that then thank you..
    NOW THE REASON IM HERE
    lets say i have 10 item groups and 5 items per group
    SO IN MORE VISUAL DETAIL
    GROUP1
    ITEM1 $1
    ITEM2 $2
    ITEM3 $3
    ITEM4 $4
    ITEM5 $5
    GROUP2
    ITEM1 $1
    ITEM2 $2
    ITE..... and so on
    only ONE item can be selected per group and at the end of it all have a total price generated... and if possible that price be shown on the page and have it work with paypal
    i need to know what language to use and if anyone has a code already that can do this...
    and also how would i go about have each group on a different page and at the last page remembers all the selection choices and adds them up
     
  2. leroys1000

    leroys1000 Banned

    Joined:
    Aug 15, 2007
    Messages:
    6,319
    Might look into joomla and virtue mart.
    You can customize items in the cart.
    Don't know if it is exactly what you want,
    but there are a lot of different extensions
    to do different things.
    Virtuemart also has different payment methods
    including paypal.
    http://www.joomla.org/
    http://virtuemart.net/
    You can also custumize the look with templates.
     
  3. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    thank you very much... and im still interested in doing my own coding if anyone knows anywhere....
    where i get hung up on java script is like parts of coding are like i++ and i-- i know those are for increments.... but they are used to show which radio button is chosen... and also document.form.field.value like seriously field[0] named crap... ANYWAY it confuses me and im pretty darn good at html... i thought i was intelligent enough for java but apparently not...
     
  4. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    one thing im going to ask while its installing is... does it work with sites that are hosted online... cuz im not hosting from my computer... my hosting site does support PHP and sql so will i get any use out of this?
     
  5. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    well i think i answered my question... it is asking for my physical address for the site UGH that sucks
     
  6. leroys1000

    leroys1000 Banned

    Joined:
    Aug 15, 2007
    Messages:
    6,319
    Some online hosting already has joomla available in their
    package installer.
    You can use your domain name for the setup.
    You need to setup a database name and password
    first to use with joomla.
    You can run it on a local server,but you will still need to
    have a domain setup and properly routed to your computer
    to have it accessable online.
    Might check the joomla documentation for more information.
     
  7. Grob needs help

    Grob needs help

    Joined:
    Mar 3, 2009
    Messages:
    320
    you could do this by creating a form with raido buttons for each group. then having the valuses add together. if you want me to send you the code for this just ask and i will post it.
     
  8. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    i would love that actually.... and i was also thinking about useing selection lists instead and everytime the selection changed a picture of there selection popped up but if i can get a picture option with radio buttons too.. where each selection swaps out the picture that would be great
     
  9. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    here is an example of what i want the problem im haveing now is altering it to add totals of another selection box within the same form

    <html>
    <head>
    <script>
    var _next=0
    var good=(_next++);
    var bad=(_next++);
    var ugly=(_next++);
    var yourmom=(_next++);
    var prices = new Array();
    prices[good]="1.50";
    prices[bad]="3.25";
    prices[ugly]="0.50";
    prices[yourmom]="1.20";
    </script>

    </head>
    <body>
    <form name=exf1>
    <select name=s1 onchange='updatePrice()'>
    <option value='good'>good</option>
    <option value='bad'>bad</option>
    <option value='ugly'>ugly</option>
    <option value='yourmom'>your mom</option>
    </select>
    <input type=text name=t1 value='?'>
    </form>
    <script>
    // set up the data to be consistent to start with.
    document.exf1.s1.selectedIndex=0;
    document.exf1.t1.value=prices[0];

    function updatePrice() {
    var _v = document.exf1.s1.selectedIndex;
    var _x = document.exf1.s1[_v].value;
    var _y = eval(_x);
    document.exf1.t1.value=prices[_y];
    }
    </script>
    </body>
    </html>
     
  10. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    any takers?
     
  11. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    if anyone can help that would be great... i need a code like the one above... but instead of just one drop down selection menu i need more than one and have the prices added together and presented in one box
     
  12. theatreus

    theatreus Thread Starter

    Joined:
    Oct 25, 2010
    Messages:
    35
    Anybody know any way of doing this? I know its possible... but i really would love to figure out if you have to be a genuis to write javascript or what?
     
  13. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/959240