$smarty->assign('discount_amt', $cart->get_discount($subtotal)); $smarty->assign('discount_descrip', $cart->get_discount_descrip()); if (isset($payment_error_type)) { $smarty->assign('payment_error_msg', $payment_error); $smarty->assign('payment_error', $payment_error_type); } if ($pay) { if (!($billing = $user->fetchBillingAddr())) { trigger_error("did not get billing address for uid {$uid}", E_USER_ERROR); } else { $smarty->assign('billing', $billing); $billing['country'] = formex_field::_get_countries(true, $billing['country']); } } if (!$cart->requires_shipping()) { $shipping = array('name' => 'n/a'); } else { if (!($shipping = $user->fetchShippingAddr())) { trigger_error("did not get shipping address for uid {$uid}", E_USER_ERROR); } $shipping['country'] = formex_field::_get_countries(true, $shipping['country']); } if (defined('CSHOP_ACCEPT_GIFTCARDS') && CSHOP_ACCEPT_GIFTCARDS) { $gc_total = $cart->get_giftcard_total(); $smarty->assign('giftcards', $cart->get_giftcards()); $smarty->assign('gc_total', $gc_total); } $smarty->assign('user', $user->fetch()); $smarty->assign('user_email', $user->get_email()); $smarty->assign('shipping', $shipping); $smarty->display('float:checkout_confirm.tpl');
function get_country_opts($iso = false, $code = null) { return formex_field::_get_countries($iso, $code); }