当前位置: 首页>>代码示例>>PHP>>正文


PHP cw_addons_set_controllers函数代码示例

本文整理汇总了PHP中cw_addons_set_controllers函数的典型用法代码示例。如果您正苦于以下问题:PHP cw_addons_set_controllers函数的具体用法?PHP cw_addons_set_controllers怎么用?PHP cw_addons_set_controllers使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cw_addons_set_controllers函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cw_include

<?php

const addon_name = 'product_shipping_options';
$tables['product_shipping_options_values'] = 'cw_product_shipping_options_values';
$cw_allowed_tunnels[] = 'cw_product_shipping_get_options';
// Include functions
cw_include('addons/product_shipping_options/include/func.php');
cw_addons_set_template(array('post', 'main/attributes/object_modify.tpl', 'addons/product_shipping_options/main/attributes/shipping-selector.tpl'));
cw_addons_set_controllers(array('pre', 'include/products/modify.php', 'addons/product_shipping_options/include/products/modify-shipping-options.php'));
cw_addons_set_template(array('post', 'customer/cart/product-shipping-options.tpl', 'addons/product_shipping_options/customer/cart/product-shipping-options.tpl'));
cw_addons_set_hooks(array('post', 'cw_shipping_get_rates', 'cw_product_shipping_option_shipping_get_rates'));
cw_set_hook('cw_doc_prepare_doc_item_extra_data', 'cw_product_shipping_option_extra_data', EVENT_POST);
if (APP_AREA == 'customer') {
    cw_set_hook('cw_web_get_product_layout_elements', 'cw_product_shipping_option_get_product_layout_elements');
    cw_set_hook('cw_doc_get', 'cw_product_shipping_option_doc_get');
    cw_set_hook('cw_web_get_layout_by_id', 'cw_product_shipping_option_get_layout');
    cw_set_hook('cw_web_get_layout', 'cw_product_shipping_option_get_layout');
}
cw_event_listen('on_product_from_scratch', 'cw_product_shipping_option_default');
cw_event_listen('on_cart_productindexes_update', 'cw_product_shipping_option_update_cart');
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:20,代码来源:init.php

示例2: cw_addons_set_controllers

<?php

cw_addons_set_controllers(array('post', 'customer/auth.php', 'addons/salesman/include/salesman_info.php'), array('post', 'payment/auth.php', 'addons/salesman/include/salesman_info.php'), array('post', 'customer/auth.php', 'addons/salesman/include/adv_info.php'), array('post', 'payment/auth.php', 'addons/salesman/include/adv_info.php'));
$tables['salesman_orders'] = 'cw_salesman_orders';
$tables['salesman_adv_campaigns'] = 'cw_salesman_adv_campaigns';
$tables['salesman_adv_clicks'] = 'cw_salesman_adv_clicks';
$tables['salesman_adv_orders'] = 'cw_salesman_adv_orders';
$tables['salesman_banners'] = 'cw_salesman_banners';
$tables['salesman_banners_elements'] = 'cw_salesman_banners_elements';
$tables['salesman_clicks'] = 'cw_salesman_clicks';
$tables['salesman_commissions'] = 'cw_salesman_commissions';
$tables['salesman_payment'] = 'cw_salesman_payment';
$tables['salesman_plans'] = 'cw_salesman_plans';
$tables['salesman_plans_commissions'] = 'cw_salesman_plans_commissions';
$tables['salesman_product_commissions'] = 'cw_salesman_product_commissions';
$tables['salesman_commissions'] = 'cw_salesman_commissions';
$tables['salesman_tier_commissions'] = 'cw_salesman_tier_commissions';
$tables['salesman_views'] = 'cw_salesman_views';
$tables['salesman_premiums'] = 'cw_salesman_premiums';
$tables['salesman_premiums_lng'] = 'cw_salesman_premiums_lng';
$tables['salesman_target'] = 'cw_salesman_target';
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:21,代码来源:init.php

示例3: define

<?php

define('DOD_OBJ_TYPE_PRODS', 1);
define('DOD_OBJ_TYPE_CATS', 2);
define('DOD_OBJ_TYPE_MANS', 3);
define('DOD_OBJ_TYPE_ATTR', 9);
define('DOD_OBJ_TYPE_SHIPPING', 10);
define('DOD_APPLY_PRODS', 3);
define('DOD_DISCOUNT', 'D');
define('DOD_FREE_PRODS', 'F');
define('DOD_FREE_SHIP', 'S');
define('DOD_COUPON', 'C');
define('DOD_ATTR_ITEM_TYPE', 'DD');
$bonus_names = array(DOD_COUPON => 'lbl_dod_bonus_coupon', DOD_DISCOUNT => 'lbl_dod_bonus_discount', DOD_FREE_PRODS => 'lbl_dod_bonus_forfree', DOD_FREE_SHIP => 'lbl_dod_bonus_freeship');
/* dod tables */
$_addon_tables = array('dod_generators', 'dod_bonuses', 'dod_bonus_details');
foreach ($_addon_tables as $_table) {
    $tables[$_table] = 'cw_' . $_table;
}
cw_include('addons/deal_of_day/include/func.php');
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('replace', 'admin/deal_of_day.php', 'addons/deal_of_day/admin/deal_of_day.php'), array('post', 'include/auth.php', 'addons/deal_of_day/include/auth.php'));
    cw_addons_set_template(array('replace', 'admin/main/deal_of_day.tpl', 'addons/deal_of_day/admin/main.tpl'));
    cw_addons_add_css('addons/deal_of_day/admin/deal_of_day.css');
}
if (APP_AREA == 'customer') {
    cw_addons_set_controllers(array('replace', 'customer/deal_of_day_generate.php', 'addons/deal_of_day/customer/deal_of_day_generate.php'), array('post', 'customer/index.php', 'addons/deal_of_day/customer/index.php'));
    cw_addons_set_template(array('post', 'customer/main/welcome.tpl@home_offers', 'addons/deal_of_day/customer/home.tpl'));
}
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:29,代码来源:init.php

示例4: cw_set_hook

cw_set_hook('cw_products_in_cart', 'cw_ps_products_in_cart_pre', EVENT_PRE);
//cw_set_hook('cw_products_in_cart',            'cw_ps_products_in_cart_post',		EVENT_POST);
cw_event_listen('on_product_from_scratch', 'cw_apply_special_offer_free');
/* Hooks for discount bonus */
// Function adds offer discounts applied to whole cart
cw_event_listen('on_collect_discounts', 'cw_ps_on_collect_discounts');
// Function adds offer discounts applied to a product in cart
cw_event_listen('on_product_from_scratch', 'cw_apply_special_offer_discount');
/* Hooks for coupon bonus */
cw_event_listen('on_place_order_extra', 'cw_ps_on_place_order_extra');
// CMS
cw_event_listen('on_cms_check_restrictions', 'cw_ps_on_cms_check_restrictions_PS');
// cw_delete_from_cart
// $product_id = cw_delete_from_cart($cart, $productindex);
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('replace', 'admin/promosuite.php', 'addons/promotion_suite/admin/promosuite.php'), array('replace', 'admin/discount_bundles.php', 'addons/promotion_suite/admin/discount_bundles.php'), array('post', 'include/auth.php', 'addons/promotion_suite/include/auth.php'));
    cw_set_controller('include/products/modify.php', 'addons/promotion_suite/admin/product_modify.php', EVENT_PRE);
    cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw_ps_tabs_js_abstract'));
    cw_addons_set_template(array('replace', 'admin/main/promosuite.tpl', 'addons/promotion_suite/admin/main.tpl'), array('replace', 'admin/main/discount_bundles.tpl', 'addons/promotion_suite/admin/discount_bundles.tpl'));
    if ($target == 'cms') {
        cw_addons_set_template(array('pre', 'main/attributes/object_modify.tpl', 'addons/promotion_suite/addons/cms/cms_details.tpl'));
        cw_event_listen('on_cms_update', 'cw_ps_on_cms_update');
        cw_set_controller('addons/cms/cs_banner.php', 'addons/promotion_suite/addons/cms/cs_banner.php', EVENT_POST);
        cw_set_controller('addons/cms/cs_banners.php', 'addons/promotion_suite/addons/cms/cs_banner.php', EVENT_POST);
    }
    cw_addons_add_css('addons/promotion_suite/admin/promosuite.css');
}
if (APP_AREA == 'customer') {
    cw_addons_add_css('addons/promotion_suite/customer/promosuite.css');
    cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw_ps_tabs_js_abstract'));
}
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:31,代码来源:init.php

示例5: cw_addons_add_css

<?php

cw_addons_add_css('addons/cookies_warning/customer/cookie_warn.css');
cw_addons_set_template(array('pre', 'customer/head.tpl', 'addons/cookies_warning/customer/top_panel.tpl'));
cw_addons_set_controllers(array('post', 'customer/auth.php', 'addons/cookies_warning/customer/auth.php'));
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:5,代码来源:init.php

示例6: option

<?php

# kornev, the product options are build on the attributes
# kornev, the product option - it's attribute, which have got the 'product_options' in the addon
# kornev, the option (as a class) is not assigned to a product - the values are assigned to the product
# kornev, the attribute -> product relation
$tables['product_options'] = 'cw_product_options';
$tables['product_options_lng'] = 'cw_product_options_lng';
$tables['product_options_values'] = 'cw_product_options_values';
$tables['product_options_values_lng'] = 'cw_product_options_values_lng';
$tables['product_variants'] = 'cw_product_variants';
$tables['product_variant_items'] = 'cw_product_variant_items';
$tables['products_options_ex'] = 'cw_products_options_ex';
$tables['product_options_js'] = 'cw_product_options_js';
$tables['products_images_var'] = 'cw_products_images_var';
cw_include('addons/product_options/include/func.product_options.php');
cw_include('addons/product_options/include/hooks.php', INCLUDE_NO_GLOBALS);
cw_addons_set_controllers(array('post', 'include/products/modify.php', 'addons/product_options/include/products/modify-options.php'), array('post', 'include/products/modify.php', 'addons/product_options/include/products/modify-variants.php'), array('replace', 'customer/popup_product_options.php', 'addons/product_options/customer/popup_product_options.php'), array('post', 'customer/product.php', 'addons/product_options/customer/product.php'));
cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw_product_options_tabs_js_abstract'), array('pre', 'cw_product_build_flat', 'cw_product_options_product_build_flat'), array('post', 'cw_product_build_flat', 'cw_product_options_product_build_flat_post'), array('pre', 'cw_product_check_avail', 'cw_product_options_product_check_avail'));
cw_addons_set_template(array('pre', 'customer/products/product-amount.tpl', 'addons/product_options/customer/products/product-amount.tpl'), array('replace', 'common/product_image.tpl', 'addons/product_options/customer/products/product_image.tpl'), array('post', 'customer/products/products-info.tpl', 'addons/product_options/customer/products/product-variant-selector.tpl'), array('pre', 'customer/products/products.tpl', 'addons/product_options/customer/products/products-prepare.tpl'));
cw_set_hook('cw_delete_product', 'cw_product_options_delete_product', EVENT_PRE);
cw_set_hook('cw_warehouse_recalculate', 'cw_on_warehouse_recalculate', EVENT_POST);
cw_set_hook('cw_product_clone', 'cw_product_options_clone', EVENT_POST);
cw_event_listen('on_prepare_products_found', 'cw_product_options_prepare_products_found');
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:24,代码来源:init.php

示例7: array

<?php

/*
 * Vendor: CW
 * addon: ebay
 */
namespace CW\ebay;

const addon_name = 'ebay';
const addon_target = 'ebay_export';
const addon_version = '0.1';
const addon_files_location_path = 'files/ebay/';
const addon_conditions_data_file_name = 'ConditionIDs_by_Category.csv';
if (APP_AREA == 'admin' && $target == addon_target && !empty($addons[addon_name])) {
    $ebay_config = array('ebay_action' => 'Add', 'ebay_category' => 1, 'ebay_condition_id' => 1000, 'ebay_duration' => 1, 'ebay_format' => 'Auction (default)', 'ebay_immediate_pay_required' => 0, 'ebay_location' => '', 'ebay_paypal_accepted' => 0, 'ebay_paypal_email_address' => '', 'ebay_dispatch_time_max' => 1, 'ebay_returns_accepted_option' => 'ReturnsAccepted');
    cw_addons_set_controllers(array('replace', 'admin/' . addon_target . '.php', 'addons/' . addon_name . '/' . addon_target . '.php'));
    cw_include('addons/' . addon_name . '/func.php');
    cw_addons_set_template(array('replace', 'admin/main/ebay_export.tpl', 'addons/ebay/ebay_export.tpl'), array('replace', 'admin/import_export/ebay_export.tpl', 'addons/ebay/ebay_export.tpl'));
}
if (APP_AREA == 'admin') {
    cw_set_controller('admin/ajax_ebay_category_select.php', 'addons/ebay/ebay_attributes_modify.php', EVENT_REPLACE);
    cw_addons_set_template(array('post', 'main/attributes/default_types.tpl', 'addons/ebay/types/ebay_category_selector.tpl'));
    cw_addons_add_js('jquery/dynatree-1.2.4/jquery.dynatree.min.js');
    cw_addons_add_css('jquery/dynatree-1.2.4/ui.dynatree.css');
}
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:25,代码来源:init.php

示例8: die

<?php

if (!defined('APP_START')) {
    die('Access denied');
}
if (!defined("RC_COOKIE_HISTORY")) {
    define("RC_COOKIE_HISTORY", "rcid");
}
if (!defined("RC_COOKIE_HISTORY_TEMP")) {
    define("RC_COOKIE_HISTORY_TEMP", "rcidtmp");
}
if (!defined("RC_COOKIE_START")) {
    define("RC_COOKIE_START", "rcstrt");
}
if (!defined("RC_DEBUG")) {
    define("RC_DEBUG", "Y");
}
require $app_main_dir . '/addons/remember_anonymouse_carts/func.php';
if (APP_AREA == 'customer') {
    cw_addons_set_controllers(array('post', 'init/abstract.php', 'addons/remember_anonymouse_carts/abstract.php'), array('replace', 'customer/new_product.php', 'addons/remember_anonymouse_carts/new_product.php'));
    cw_addons_set_template(array('post', 'customer/menu/menu_sections.tpl', 'addons/remember_anonymouse_carts/line_js.tpl'));
}
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:22,代码来源:init.php


注:本文中的cw_addons_set_controllers函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。