Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

    Default Dependent variables (javascript?)

    Can anyone give me an idea of how I can offer a variable that is dependent on the variable entered in a previous box? An example would explain it better:

    Say I have a shed that comes as 8 feet, 10 feet, or 12 feet in length. A variable allows the customer to choose from those three options, with different prices set for each. Once he's selected one of those, now I want him to select from a second variable, this one to choose either one or two internal partitions for his shed. The trouble is, the COST of those variables alter dependent on what size shed he's chosen! For an 8 foot shed, he can have one partition for £50, or two for £100. But if he's chosen a 10 feet shed, one partition costs £75 and two partitions £150!

    At least in theory, I could offer the variable to say:
    8 foot shed, one partition £50
    10 foot shed, one partiion £75, etc etc, but that allows customer to confuse the issue by selecting one size but a different size partition. What I'd really like is for the prices in variable box two to be dependent on the results in variable box one. The only thing I've thought of so far is some form of javascript page refresh, but I know even less about javascript than I do about zencart!!

    Any bright ideas?

  2. #2
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Dependent variables (javascript?)

    Not yet possible in ZC. We are looking forward to this feature being available in version 1.4 .

  3. #3
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

    Default Re: Dependent variables (javascript?)

    Done a little Googling and came up with this http://www.zen-cart.com/forum/showthread.php?t=93823. I think this might do the job, but not sure yet!

 

 

Similar Threads

  1. v138a Connect to database and variables in a javascript
    By carol in forum General Questions
    Replies: 9
    Last Post: 12 Jun 2013, 10:50 AM
  2. Switch from one shipping module to another dependent on product variables
    By litepockets in forum Built-in Shipping and Payment Modules
    Replies: 19
    Last Post: 27 Sep 2010, 01:30 PM
  3. Variables needed for Javascript - order tracking
    By smartmomma in forum Basic Configuration
    Replies: 0
    Last Post: 10 Sep 2006, 07:08 PM

Posting Permissions

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