本文整理汇总了PHP中zen_count_customer_address_book_entries函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_count_customer_address_book_entries函数的具体用法?PHP zen_count_customer_address_book_entries怎么用?PHP zen_count_customer_address_book_entries使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_count_customer_address_book_entries函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: zen_redirect
* @version $Id: header_php.php 4793 2006-10-20 05:25:20Z ajeh $
*/
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_CHECKOUT_PAYMENT_ADDRESS');
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($_SESSION['cart']->count_contents() <= 0) {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
}
// if the customer is not logged on, redirect them to the login page
if (!$_SESSION['customer_id']) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
} else {
// validate customer
if (zen_get_customer_validate_session($_SESSION['customer_id']) == false) {
$_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_SHIPPING));
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
$addressType = "billto";
require DIR_WS_MODULES . zen_get_module_directory('checkout_new_address');
// if no billing destination address was selected, use their own address as default
if (!$_SESSION['billto']) {
$_SESSION['billto'] = $_SESSION['customer_default_address_id'];
}
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);
$addresses_count = zen_count_customer_address_book_entries();
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_CHECKOUT_PAYMENT_ADDRESS');
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:header_php.php
示例2: isset
$entry_query = "SELECT entry_country_id\r\n FROM " . TABLE_ADDRESS_BOOK . " a, " . TABLE_CUSTOMERS . " c\r\n WHERE a.customers_id = :customersID\r\n AND a.customers_id = c.customers_id\r\n AND a.address_book_id = c.customers_default_address_id";
$entry_query = $db->bindVars($entry_query, ':customersID', $_SESSION['customer_id'], 'integer');
$entry = $db->Execute($entry_query);
}
/*
* Set flags for template use:
*/
$selected_country = isset($_POST['zone_country_id']) && $_POST['zone_country_id'] != '' ? $country : SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;
if ($process == true) {
$entry->fields['entry_country_id'] = $selected_country;
}
$flag_show_pulldown_states = ($process == true || $entry_state_has_zones == true) && $zone_name == '' || ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true' || $error_state_input ? true : false;
$state = $flag_show_pulldown_states ? $state : $zone_name;
$state_field_label = $flag_show_pulldown_states ? '' : ENTRY_STATE;
if (!isset($_GET['delete']) && !isset($_GET['edit'])) {
if (zen_count_customer_address_book_entries() >= MAX_ADDRESS_BOOK_ENTRIES) {
$messageStack->add_session('addressbook', ERROR_ADDRESS_BOOK_FULL);
zen_redirect(zen_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'));
}
}
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, zen_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'));
if (isset($_GET['edit']) && is_numeric($_GET['edit'])) {
$breadcrumb->add(NAVBAR_TITLE_MODIFY_ENTRY);
} elseif (isset($_GET['delete']) && is_numeric($_GET['delete'])) {
$breadcrumb->add(NAVBAR_TITLE_DELETE_ENTRY);
} else {
$breadcrumb->add(NAVBAR_TITLE_ADD_ENTRY);
}
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_ADDRESS_BOOK_PROCESS');
开发者ID:dalinhuang,项目名称:kakayaga,代码行数:31,代码来源:header_php.php
注:本文中的zen_count_customer_address_book_entries函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论