Ejemplo n.º 1
0
 function get_colmap()
 {
     $colmap = parent::get_colmap();
     if (isset($colmap['cm_ship_class_id']) and !count($colmap['cm_ship_class_id'][2])) {
         $colmap['cm_ship_class_id'][2] = cmShipping::fetch_ship_class_opts($this->db);
     }
     return $colmap;
 }
Ejemplo n.º 2
0
 function get_colmap()
 {
     if (empty($this->_colmap_filled)) {
         // remember if we did this already
         $this->colmap['parent_cat_id'][2] = $this->get_categories_for_select();
         $this->colmap['ship_class_id'][2] = cmShipping::fetch_ship_class_opts($this->db);
     }
     if (!defined('CSHOP_USE_BUNDLES') or !CSHOP_USE_BUNDLES) {
         unset($this->colmap['is_used_in_bundle']);
     }
     return $this->colmap;
 }
Ejemplo n.º 3
0
                }
            }
        }
    }
    $pdb->rollback();
    $pdb->autoCommit(true);
    $ACTION = OP_GET_SHIP_ADDR;
} elseif (isset($_POST['f_ship_method']) and $ACTION == OP_PICK_SHIP) {
    if (empty($_POST['f_ship_method'])) {
        $errs[] = "Please choose one of the shipping methods provided";
    } else {
        // we saved our last set of quotes in the session to check for tampering
        $sess::register('shipquotes');
        if (!in_array($_POST['f_ship_method'], array_keys($shipquotes))) {
            trigger_error("Selected shipmethod was not a valid selection", E_USER_ERROR);
        } elseif (!($res = cmShipping::parse_shipmethod($_POST['f_ship_method']))) {
            trigger_error("could not parse the requested ship method", E_USER_ERROR);
        }
        list($ship_method, $ship_total) = $res;
        $SUCCESS = $cart->store(array('ship_total' => $ship_total, 'ship_method' => $ship_method));
        if ($SUCCESS) {
            $sess::unregister('shipquotes');
            // forget those old quotes, for safety
            header("Location: {$_SERVER['PHP_SELF']}?billing\n");
            exit;
        }
    }
} elseif ($ACTION == OP_ADD_BILL) {
    // save the comments on billing/shipping eitheway, its shared
    if (!empty($_POST['f_user_comments'])) {
        $cart->set_user_comment($_POST['f_user_comments']);