本文整理汇总了PHP中orders::store_new_order方法的典型用法代码示例。如果您正苦于以下问题:PHP orders::store_new_order方法的具体用法?PHP orders::store_new_order怎么用?PHP orders::store_new_order使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类orders
的用法示例。
在下文中一共展示了orders::store_new_order方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkerrors
$mainframe->redirect("index.php?option=com_caddy&action=checkout");
break;
case "allconfirm":
$errors = checkerrors();
$cfg = new sc_configuration();
if ($errors == 0) {
$cart = new cart2();
$mycart = $cart->readCart();
$ship['enabled'] = $cfg->get('shippingenabled');
if ($ship['enabled']) {
$ship['region'] = JRequest::getVar('shipRegion');
$ship['cost'] = fshipping::calculateShipCost(fshipping::getTotalPointsFromCart($mycart), $ship['region']);
}
// store the order first
$order = new orders();
$orderid = $order->store_new_order($mycart, $ship);
$usePayPal = $cfg->get("usepaypal");
if ($usePayPal == 1) {
$gateway = $cfg->get("pgclassname");
if ($gateway != "") {
// check the gateway filename
if (!class_exists($gateway)) {
$pgpath = dirname($mainframe->getPath('class'));
$pgfile = $pgpath . DS . $gateway . ".class.php";
// filename should look like "scpaypal.class.php"
if (!file_exists($pgfile)) {
echo "The classname you provided in the configuration does not correspond to a known file ({$pgfile})";
break;
}
require_once $pgfile;
}