Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Change CSS based on input box value

  1. #1
    donttryathome is offline Senior Member
    Join Date
    Apr 2009
    Posts
    171

    Default Change CSS based on input box value

    I would like to set our product page up so that if someone types "3" into the quantity box it highlights the associated price in the column to the right. They type in 3 and it highlights the quantity discount level for 3. They type in 5 it highlights the quantity discount level for 5. And so on.

    I would presume it involves wrapping the quantity discount prices in special divs/classes, but I am not certain what the best method would be to pull the number from inside the quantity box.

    Has anyone done anything similar?
    Running: AspDotNetStorefront ML 8.0.1.2/8.0.1.2

  2. #2
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

  3. #3
    donttryathome is offline Senior Member
    Join Date
    Apr 2009
    Posts
    171

    Default

    Thank you BFG, I figured jQuery might do exactly what I needed but I am not very familiar with it. Time to start reading. Thanks for the tip!
    Running: AspDotNetStorefront ML 8.0.1.2/8.0.1.2

  4. #4
    donttryathome is offline Senior Member
    Join Date
    Apr 2009
    Posts
    171

    Default

    Hello Again,

    A few quick questions if you don't mind. I've got a pretty good grasp on how to get this going but I'm unsure of a few things.

    I don't understand how to associate each variant's quantity input box with other elements in that row. Is any sort of value passed from the shopping cart declaring what the variant number is? Am I going to have to rig up a system to assign each unique variant ID to a variant row number?

    I am also wondering if this should be implemented from within the XML package, or should I wire it up in the skin product template?

    Hope these questions make sense.

    Thanks!

    Edit: Something I may not have made clear in my original post -- My product pages have multiple variants laid out in a table format
    Last edited by donttryathome; 03-09-2012 at 12:38 PM.
    Running: AspDotNetStorefront ML 8.0.1.2/8.0.1.2