Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi pascalost currently that is not available with the current version.

    Regards

    Thread Starter pascalost

    (@pascalost)

    ok thanks

    Plugin Contributor mbrsolution

    (@mbrsolution)

    You are welcome. Can you mark this support thread as resolved.

    Thank you

    Thread Starter pascalost

    (@pascalost)

    done

    Thread Starter pascalost

    (@pascalost)

    By the way. I made some changes to the wp_shopping_cart.php and I now have the possibility to have radio buttons instead of the dropdown.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, that is great to know, perhaps you might like to share your code just in case someone might like ti implement your idea.

    Regards

    Thread Starter pascalost

    (@pascalost)

    I use the var1 for my radio buttons other variations stay the same. I modified the scrip on line 380 to this

    function ReadForm (obj1, tst)
    {
    // Read the user form
    var i,j,pos;
    val_total=””;val_combo=””;

    for (i=0; i<obj1.length; i++)
    {
    // run entire form
    obj = obj1.elements[i]; // a form element

    if (obj.type == “select-one”)
    { // just selects
    if (obj.name == “quantity” ||
    obj.name == “amount”) continue;
    pos = obj.selectedIndex; // which option selected
    val = obj.options[pos].value; // selected value
    val_combo = val_combo + ” (” + val + “)”;
    }

    if (obj.type == “radio”)
    { // just selects
    if (obj.name == “quantity” ||
    obj.name == “amount”) continue;
    if (obj.checked == true){
    val = obj.value;
    val_combo = val_combo + ” (” + val + “)”;
    }
    }
    }

    // Now summarize everything we have processed above
    val_total = obj1.product_tmp.value + val_combo;
    obj1.product.value = val_total;
    }

    from line 414 to 423 (Variation 1) is now this

    if (!empty($var1)) {
    $var1_pieces = explode(‘|’, $var1);
    $variation1_name = $var1_pieces[0];
    $var_output .= ‘<span class=”wp_cart_variation_name”>’ . $variation1_name . ‘ : </span>
    ‘;
    for ($i = 1; $i < sizeof($var1_pieces); $i++) {
    $var_output .= ‘<input type=”radio” name=”variation1″ value=”‘ . $var1_pieces[$i] . ‘” /> ‘ . $var1_pieces[$i] . ‘
    ‘;
    }
    $var_output .= ‘
    ‘;

    }

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Variations’ is closed to new replies.