Пример #1
0
function wpsc_the_checkout_item_error_class($as_attribute = true)
{
    global $wpsc_checkout;
    if ($_SESSION['wpsc_checkout_error_messages'][$wpsc_checkout->checkout_item->id] != '') {
        $class_name = 'validation-error';
    }
    if ($as_attribute == true) {
        $output = "class='" . $class_name . wpsc_shipping_details() . "'";
    } else {
        $output = $class_name;
    }
    return $output;
}
Пример #2
0
function wpsc_the_checkout_item_error_class($as_attribute = true)
{
    global $wpsc_checkout, $wpsc_checkout_error_messages;
    $class_name = '';
    if (!empty($wpsc_checkout_error_messages) && isset($wpsc_checkout_error_messages[$wpsc_checkout->checkout_item->id]) && $wpsc_checkout_error_messages[$wpsc_checkout->checkout_item->id] != '') {
        $class_name = 'validation-error';
    }
    if ($as_attribute == true) {
        $output = "class='" . $class_name . wpsc_shipping_details() . "'";
    } else {
        $output = $class_name . wpsc_shipping_details();
    }
    return $output;
}