Exemplo n.º 1
0
<?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');
Exemplo n.º 2
0
<?php

/*
 * Vendor: CW
 * addon: Authorize.net - SIM
 */
const authorize_sim_addon_name = 'payment_authorize_sim';
const authorize_sim_addon_target = 'authorize_sim';
cw_include('addons/' . authorize_sim_addon_name . '/include/anet_php_sdk/AuthorizeNet.php');
cw_include('addons/' . authorize_sim_addon_name . '/include/func.php');
cw_addons_set_controllers(array('replace', 'customer/' . authorize_sim_addon_target . '.php', 'addons/' . authorize_sim_addon_name . '/customer/' . authorize_sim_addon_target . '.php'));
cw_addons_set_hooks(array('post', 'cw_payment_get_methods', 'cw_payment_authorize_sim_get_methods'), array('post', 'cw_payment_run_processor', 'cw_payment_authorize_sim_run_processor'));
Exemplo n.º 3
0
<?php

cw_include('addons/paypal_express/include/func.paypal_express.php');
cw_addons_set_template(array('post', 'customer/cart/buttons.tpl', 'addons/paypal_express/customer/buttons.tpl'));
cw_addons_set_controllers(array('replace', 'customer/paypal_express.php', 'addons/paypal_express/customer/paypal_express.php'));
cw_addons_set_hooks(array('post', 'cw_payment_search', 'cw_paypal_express_payment_search'), array('pre', 'cw_payment_get_label', 'cw_paypal_express_payment_get_label'));
Exemplo n.º 4
0
<?php

/*
 * Vendor: CW
 * addon: Facebook auth/login
 */
const fbauth_addon_name = 'fbauth';
const fbauth_addon_target = 'fb_auth';
const fbauth_addon_version = '0.1';
if (!empty($addons[fbauth_addon_name]) && APP_AREA == 'customer') {
    cw_include('addons/' . fbauth_addon_name . '/include/func.fbauth.php');
    cw_event_listen('on_logout', 'cw_fbauth_user_logout');
    cw_addons_set_controllers(array('replace', 'customer/fb_auth.php', 'addons/' . fbauth_addon_name . '/customer/fb_auth.php'), array('replace', 'customer/fb_auth_get_email.php', 'addons/' . fbauth_addon_name . '/customer/fb_auth_get_email.php'));
    cw_addons_set_template(array('post', 'buttons/social_media_panel.tpl', 'addons/' . fbauth_addon_name . '/customer/auth-button.tpl'), array('pre', 'customer/head.tpl', 'addons/' . fbauth_addon_name . '/customer/init.tpl'), array('replace', 'customer/main/fb_auth_get_email.tpl', 'addons/' . fbauth_addon_name . '/customer/email_request.tpl'));
}
Exemplo n.º 5
0
<?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';
Exemplo n.º 6
0
<?php

if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('replace', 'admin/sitemap_xml.php', 'addons/sitemap_xml/admin/sitemap_xml.php'), array('replace', 'admin/cron_sitemap_xml.php', 'addons/sitemap_xml/cron/cron_sitemap_xml.php'));
    cw_addons_set_template(array('replace', 'admin/sitemap_xml/sitemap_xml.tpl', 'addons/sitemap_xml/sitemap_xml.tpl'));
}
if (APP_AREA == 'customer' && $target == 'sitemap') {
    cw_set_controller('customer/sitemap.php', 'addons/sitemap_xml/customer/sitemap.php', EVENT_REPLACE);
}
if (APP_AREA == 'cron') {
    cw_include('addons/sitemap_xml/include/func.php');
    cw_set_controller('init/abstract.php', 'addons/sitemap_xml/include/abstract.php', EVENT_POST);
}
Exemplo n.º 7
0
<?php

$tables['products_reviews_reminder'] = 'cw_products_reviews_reminder';
$tables['products_reviews_ratings'] = 'cw_products_reviews_ratings';
$tables['products_reviews_rating_types'] = 'cw_products_reviews_rating_types';
$cw_allowed_tunnels[] = 'cw_review_get_quick_global_info';
cw_include('addons/estore_products_review/include/func.review.php');
# kornev, TOFIX - move all of the css from general
cw_addons_add_css('addons/estore_products_review/general.css');
cw_addons_add_js('addons/estore_products_review/js/jquery.raty.min.js');
cw_addons_set_controllers(array('post', 'customer/product.php', 'addons/estore_products_review/customer/product.php'), array('replace', 'customer/top_rated.php', 'addons/estore_products_review/customer/top_rated.php'), array('replace', 'customer/estore_testimonials.php', 'addons/estore_products_review/customer/testimonials.php'), array('replace', 'admin/estore_stop_list.php', 'addons/estore_products_review/admin/estore_stop_list.php'), array('replace', APP_AREA . '/estore_reviews_management.php', 'addons/estore_products_review/' . APP_AREA . '/reviews_management.php'), array('replace', APP_AREA . '/estore_review_management.php', 'addons/estore_products_review/' . APP_AREA . '/review_management.php'), array('replace', 'admin/estore_execute_doc_action.php', 'addons/estore_products_review/admin/doc_action.php'), array('replace', 'customer/global_reviews.php', 'addons/estore_products_review/customer/global_reviews.php'));
cw_set_controller('customer/review_vote.php', 'addons/estore_products_review/customer/review_vote.php', EVENT_REPLACE);
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('post', 'include/orders/order.php', 'addons/estore_products_review/admin/order.php'));
}
cw_set_hook('cw_delete_product', 'cw_review_delete_product', EVENT_POST);
# kornev, select rating to show it on the category page
cw_addons_set_hooks(array('post', 'cw_product_search', 'cw_review_product_search'), array('post', 'cw_product_get', 'cw_review_product_get'), array('post', 'cw_product_filter_get_slider_value', 'cw_review_product_filter_get_slider_value'), array('pre', 'cw_cron_get_targets', 'cw_review_prepare_and_send_reminder'), array('post', 'cw_attributes_delete', 'cw_review_delete_product_votes'), array('post', 'cw_attributes_get_types', 'cw_review_attributes_get_types'));
cw_addons_set_template(array('replace', 'main/attributes/show.tpl', 'addons/estore_products_review/main/attributes/show.tpl', 'cw_review_is_rating_attribute'), array('post', 'help/menu-list.tpl', 'addons/estore_products_review/menu-list.tpl'), array('replace', 'customer/help/estore_testimonials.tpl', 'addons/estore_products_review/testimonials.tpl'), array('replace', 'admin/main/estore_stop_list.tpl', 'addons/estore_products_review/admin_stop_list.tpl'), array('replace', 'admin/main/estore_reviews_management.tpl', 'addons/estore_products_review/admin_reviews_management.tpl'), array('replace', APP_AREA . '/main/estore_review_management.tpl', 'addons/estore_products_review/' . APP_AREA . '_review_management.tpl'), array('post', 'main/docs/additional_actions.tpl', 'addons/estore_products_review/additional_doc_action.tpl'), array('post', 'main/docs/additional_search_field.tpl', 'addons/estore_products_review/additional_doc_search_field.tpl'), array('replace', 'customer/main/global_reviews.tpl', 'addons/estore_products_review/global_reviews.tpl'));
cw_event_listen('on_prepare_search_orders', 'cw_review_prepare_search_orders');
cw_set_hook('cw_web_get_product_layout_elements', 'cw_review_get_product_layout_elements');
cw_set_hook('cw_doc_get', 'cw_review_doc_get');
Exemplo n.º 8
0
<?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'));
}
Exemplo n.º 9
0
<?php

$cw_allowed_tunnels[] = 'cw_shipping_search';
$cw_allowed_tunnels[] = 'cw_shipping_doc_trackable';
cw_include('addons/shipping_system/include/func.shipping.php');
cw_addons_add_css('addons/shipping_system/css/main.css');
cw_addons_set_controllers(array('replace', 'admin/shipping_carriers.php', 'addons/shipping_system/admin/shipping_carriers.php'), array('replace', 'admin/cod_types.php', 'addons/shipping_system/admin/cod_types.php'), array('replace', 'admin/shipping_zones.php', 'addons/shipping_system/admin/shipping_zones.php'), array('replace', 'admin/shipping.php', 'addons/shipping_system/admin/shipping.php'), array('replace', 'admin/shipping_rates.php', 'addons/shipping_system/admin/shipping_rates.php'), array('post', 'include/orders/order_edit.php', 'addons/shipping_system/include/orders/order_edit.php'), array('replace', 'customer/popup-shipping.php', 'addons/shipping_system/customer/popup-shipping.php'));
cw_addons_set_hooks(array('post', 'cw_checkout_login_prepare', 'cw_shipping_checkout_login_prepare'), array('pre', 'cw_cart_actions', 'cw_shipping_cart_actions'), array('post', 'cw_cart_get_warehouses_cart', 'cw_shipping_cart_get_warehouses_cart'), array('post', 'cw_cart_calc_single', 'cw_shipping_cart_calc_single'), array('pre', 'cw_cart_summarize', 'cw_shipping_cart_summarize'), array('post', 'cw_product_get', 'cw_shipping_product_get'));
cw_addons_set_template(array('pre', 'customer/cart/totals.tpl', 'addons/shipping_system/customer/cart/totals.tpl'), array('post', 'customer/checkout/shipping_methods.tpl', 'addons/shipping_system/customer/checkout/shipping_methods.tpl'), array('post', 'customer/products/product-fields.tpl', 'addons/shipping_system/customer/products/product-fields.tpl'), array('replace', 'customer/products/estimate-fields.tpl', 'addons/shipping_system/customer/products/product-fields.tpl'), array('post', 'customer/products/products-info.tpl', 'addons/shipping_system/customer/products/shipping_estimator.tpl'), array('post', 'customer/products/our_price.tpl', 'addons/shipping_system/customer/products/free-shipping.tpl'));
if (APP_AREA == 'customer') {
    cw_addons_add_js('addons/shipping_system/js/dialog.js');
    cw_set_controller('customer/shipping_estimator.php', 'addons/shipping_system/customer/shipping_estimator.php', EVENT_REPLACE);
    cw_set_controller('customer/order_tracking.php', 'addons/shipping_system/customer/order_tracking.php', EVENT_REPLACE);
    cw_addons_set_template(array('post', 'customer/products/product.tpl', 'addons/shipping_system/customer/products/estimate.tpl'), array('post', 'customer/products/subcategories.tpl', 'addons/shipping_system/customer/products/estimate.tpl'));
}
Exemplo n.º 10
0
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'));
}
Exemplo n.º 11
0
<?php

cw_include('addons/discount_coupons/include/func.discount_coupons.php');
cw_addons_set_controllers(array('pre', 'customer/cart.php', 'addons/discount_coupons/customer/cart.php'), array('replace', 'admin/coupons.php', 'addons/discount_coupons/admin/coupons.php'));
cw_addons_set_hooks(array('post', 'cw_cart_calc_discounts', 'cw_discount_coupons_cart_calc_discounts'));
Exemplo n.º 12
0
<?php

/*
 * Vendor: CW
 * addon: mobile skin
 */
const mobile_addon_name = 'mobile';
const mobile_addon_skin_prefix = '.mobi';
cw_include('addons/' . mobile_addon_name . '/include/func.mobile.php');
cw_include('addons/' . mobile_addon_name . '/include/Mobile_Detect.php');
if (APP_AREA == 'admin') {
    cw_addons_set_template(array('post', 'main/docs/extras.tpl', 'addons/' . mobile_addon_name . '/extras.tpl'), array('post', 'main/docs/extras_title.tpl', 'addons/' . mobile_addon_name . '/extras.tpl'));
}
if (APP_AREA == 'customer') {
    cw_addons_set_controllers(array('post', 'init/abstract.php', 'addons/' . mobile_addon_name . '/init/mobile.php'), array('pre', 'customer/referer.php', 'addons/' . mobile_addon_name . '/customer/referer.php'));
    cw_addons_set_hooks(array('post', 'cw_code_get_template_dir', 'cw_mobile_code_get_template_dir'), array('post', 'cw_doc_place_order', 'cw_mobile_doc_place_order'));
    cw_set_hook('cw_md_get_domain_data_by_alias', 'cw_mobile_get_domain_data_by_alias');
    cw_addons_set_template(array('post', 'elements/copyright.tpl', 'addons/' . mobile_addon_name . '/bottom_links.tpl'));
}
Exemplo n.º 13
0
<?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'));
Exemplo n.º 14
0
<?php

const seller_addon_name = 'seller';
const seller_area_letter = 'V';
$cw_allowed_tunnels[] = 'cw_seller_get_info';
cw_include('addons/' . seller_addon_name . '/include/func.seller.php');
cw_set_hook('cw_product_update_status', 'cw_seller_product_update_status', EVENT_PRE);
// Replace warehouse_id to seller customer id
cw_addons_set_hooks(array('post', 'cw_cart_summarize', 'cw_seller_cart_summarize'));
if (APP_AREA == 'customer') {
    cw_addons_set_controllers(array('pre', APP_AREA . '/search.php', 'addons/' . seller_addon_name . '/core/search.php'));
    cw_event_listen('on_build_order_hash', 'cw_seller_on_build_order_hash');
    cw_addons_set_hooks(array('post', 'cw_doc_place_order', 'cw_seller_doc_place_order'), array('post', 'cw_product_get', 'cw_seller_product_get'));
    cw_addons_set_template(array('pre', 'customer/products/additional_data.tpl', 'addons/' . seller_addon_name . '/products/seller_owner.tpl'), array('pre', 'customer/products/search.tpl', 'addons/' . seller_addon_name . '/products/seller_section.tpl'));
}
if (APP_AREA == 'admin') {
    cw_set_controller(APP_AREA . '/user_V.php', 'addons/' . seller_addon_name . '/core/user_V.php', EVENT_REPLACE);
    cw_addons_set_hooks(array('post', 'cw_product_get', 'cw_seller_product_get'));
    cw_addons_set_template(array('pre', 'main/products/product/details.tpl', 'addons/' . seller_addon_name . '/products/seller.tpl'));
}
if (APP_AREA == 'seller') {
    /* Map controllers from seller area to their real location under addons/seller/core */
    if (!file_exists($app_main_dir . '/seller')) {
        // There is no symlink /core/seller, map all files explicitly
        if (!($addon_hooks = cw_cache_get('seller', 'addon_hooks')) || defined('DEV_MODE')) {
            $addon_hooks = array();
            $files = cw_files_get_dir($app_main_dir . '/addons/seller/core', 1, false);
            foreach ($files as $file) {
                if (strpos($file, '.php') !== false) {
                    $file = str_replace($app_main_dir . '/addons/seller/core/', '', $file);
                    $addon_hooks[] = $file;
Exemplo n.º 15
0
<?php

define('CHECK_UNIQ_ID', true);
// Check or not the uniqueness of gift certificate ID
$tables['wishlist'] = 'cw_wishlist';
$tables['giftreg_events'] = 'cw_giftreg_events';
$tables['giftreg_maillist'] = 'cw_giftreg_maillist';
$tables['giftreg_guestbooks'] = 'cw_giftreg_guestbooks';
cw_include('addons/estore_gift/include/func.gift.php');
cw_addons_set_controllers(array('replace', 'admin/giftcerts.php', 'addons/estore_gift/admin/giftcerts.php'), array('replace', 'customer/gifts.php', 'addons/estore_gift/customer/gifts.php'), array('pre', 'customer/cart.php', 'addons/estore_gift/customer/cart.php'));
cw_addons_set_template(array('post', 'customer/cart/content.tpl', 'addons/estore_gift/content.tpl'));
cw_addons_set_hooks(array('post', 'cw_payment_get_methods', 'cw_gift_payment_get_methods'), array('post', 'cw_payment_run_processor', 'cw_gift_payment_run_processor'));
cw_set_hook('cw_delete_product', 'cw_gift_delete_product', EVENT_POST);
cw_set_hook('cw_doc_update_item', 'cw_gift_doc_update_item', EVENT_PRE);
cw_set_hook('cw_doc_update', 'cw_gift_doc_update', EVENT_POST);
if (APP_AREA == 'customer') {
    cw_event_listen('on_cart_menu_build', 'cw_gift_get_menu_list');
    cw_event_listen('on_login', 'cw_gift_on_login');
}
if (APP_AREA == 'admin') {
    cw_set_controller('admin/giftcert_user_data.php', 'addons/estore_gift/admin/giftcert_user_data.php', EVENT_REPLACE);
}
Exemplo n.º 16
0
$tables['cms_images'] = 'cw_cms_images';
$tables['cms_restrictions'] = 'cw_cms_restrictions';
$tables['cms_user_counters'] = 'cw_cms_user_counters';
cw_include('addons/cms/func.hooks.php', INCLUDE_NO_GLOBALS);
cw_include('addons/cms/func.php', INCLUDE_NO_GLOBALS);
cw_event_listen('on_product_delete', 'cms\\on_product_delete');
cw_event_listen('on_category_delete', 'cms\\on_category_delete');
cw_event_listen('on_manufacturer_delete', 'cms\\on_manufacturer_delete');
cw_event_listen('on_cms_check_restrictions', 'cms\\on_cms_check_restrictions_C');
cw_event_listen('on_cms_check_restrictions', 'cms\\on_cms_check_restrictions_P');
cw_set_hook('cw_delete_product', 'cms\\cw_delete_product', EVENT_POST);
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('replace', 'admin/cms.php', 'addons/cms/cms.php'), array('pre', 'include/products/modify.php', 'addons/cms/product_modify.php'));
    cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cms\\tabs_js_abstract'));
    cw_addons_set_template(array('replace', 'admin/main/section_title.tpl', 'addons/cms/admin/section_title.tpl'));
    if ($target == 'cms' && $mode == 'search') {
        cw_addons_set_template(array('replace', 'addons/clean_urls/history_link.tpl', 'addons/cms/history_link.tpl'));
    }
}
if (APP_AREA == 'customer') {
    cw_addons_add_css('addons/cms/cms.css');
    cw_addons_add_js('addons/cms/cms.js');
    cw_addons_set_controllers(array('replace', 'customer/ab_count_click.php', 'addons/cms/ab_count_click.php'), array('replace', 'customer/pages.php', 'addons/cms/staticpages.php'), array('post', 'customer/help.php', 'addons/cms/help_pages.php'));
    //   cw_set_controller('customer/auth.php', 'addons/cms/customer/cms.php', EVENT_POST);
    cw_addons_set_hooks(array('pre', 'cw_core_get_meta', 'cw_cms_get_meta'));
    // test content section
    if (AB_TEST_CONTENTSECTION) {
        cw_addons_set_template(array('post', CS_TEST_TEMPLATE, 'addons/cms/test.tpl'));
    }
    cw_addons_set_template(array('post', 'customer/service_js.tpl', 'addons/cms/highlight.js.tpl'), array('replace', 'customer/main/pages.tpl', 'addons/cms/customer/staticpages.tpl'), array('pre', 'common/menu.tpl', 'addons/cms/customer/menu_pre.tpl'), array('post', 'common/menu.tpl', 'addons/cms/customer/menu_post.tpl'), array('post', 'customer/help/help.tpl@help_main_section', 'addons/cms/customer/help_sections.tpl'));
}
Exemplo n.º 17
0
<?php

if (APP_AREA != 'admin') {
    return;
}
if (!in_array($target, array('', 'index', 'dashboard', 'quick_data', 'dashboard_system_messages'), true)) {
    return;
}
define('SEARCH_LIMIT_FOR_AUTOCOMPLETE', 10);
define('NEWS_RSS_URL', 'http://www.cartworks-platform.com/adminfeed.xml');
$tables['dashboard'] = 'cw_dashboard';
// Define abstract dashboard builder
cw_include('addons/dashboard/include/func.dashboard.php');
cw_addons_set_controllers(array('post', 'admin/index.php', 'addons/dashboard/admin/index.php'), array('replace', 'admin/dashboard.php', 'addons/dashboard/admin/configuration.php'), array('replace', 'admin/quick_data.php', 'addons/dashboard/admin/quick_data.php'), array('replace', 'admin/dashboard_system_messages.php', 'addons/dashboard/admin/dashboard_system_messages.php'));
// Define all specific dashboard section builders
//cw_include('addons/dashboard/sections/dashboard_section_example.php');
cw_include('addons/dashboard/sections/dashboard_section_default.php');
// Register hooks
cw_addons_set_hooks(array('post', 'dashboard_build_sections', 'dashboard_section_search'), array('post', 'dashboard_build_sections', 'dashboard_section_graph'), array('post', 'dashboard_build_sections', 'dashboard_last_orders'), array('post', 'dashboard_build_sections', 'dashboard_section_system_messages'), array('post', 'dashboard_build_sections', 'dashboard_section_pending_reviews'), array('post', 'dashboard_build_sections', 'dashboard_section_awaiting'), array('post', 'dashboard_build_sections', 'dashboard_section_system_info'), array('post', 'dashboard_build_sections', 'dashboard_section_news'));
cw_addons_add_css('addons/dashboard/admin/main.css');
cw_addons_set_template(array('post', 'admin/main/main.tpl', 'addons/dashboard/admin/index.tpl'));
/*
 * jqPlot http://www.jqplot.com/
 */
// Excanvas is required only for IE versions below 9
preg_match("/(MSIE|Version)(?:\\/| )([0-9.]+)/", $_SERVER['HTTP_USER_AGENT'], $matches);
if (count($matches) && $matches[1] == 'MSIE' && $matches[2] < 9.0) {
    cw_addons_add_js('addons/dashboard/js/excanvas.min.js');
}
cw_addons_add_js('addons/dashboard/js/jquery.jqplot.min.js');
cw_addons_add_js('addons/dashboard/js/plugins/jqplot.dateaxisrenderer.min.js');
Exemplo n.º 18
0
<?php

cw_include('addons/image_verification/include/cw.image_verification.php');
cw_addons_set_controllers(array('post', 'init/abstract.php', 'addons/image_verification/init/image_verification.php'), array('post', 'customer/acc_manager.php', 'addons/image_verification/antibot_err_display.php'));
cw_event_listen('on_register_validate', 'cw_image_verification_on_register_validate');
Exemplo n.º 19
0
<?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');
Exemplo n.º 20
0
<?php

/*
 * Vendor: CW
 * addon: SagePay Go - Form protocol
 */
const sagepaygo_form_addon_name = 'payment_sagepay_form';
const sagepaygo_form_addon_target = 'sagepaygo_form';
const sagepaygo_form_addon_version = '0.1';
const sagepaygo_form_addon_partner_id = '';
//If you are a Sage Pay Partner and wish to flag the transactions with your unique partner id set it here.
if (!empty($addons[sagepaygo_form_addon_name])) {
    cw_include('addons/' . sagepaygo_form_addon_name . '/include/func.php');
    cw_addons_set_controllers(array('replace', 'customer/' . sagepaygo_form_addon_target . '.php', 'addons/' . sagepaygo_form_addon_name . '/customer/' . sagepaygo_form_addon_target . '.php'));
    cw_addons_set_hooks(array('post', 'cw_payment_get_methods', 'cw_payment_sagepaygo_form_get_methods'), array('post', 'cw_payment_run_processor', 'cw_payment_sagepaygo_form_run_processor'));
}
Exemplo n.º 21
0
<?php

/*
 * Vendor: CW
 * addon: breadcrumbs
 */
const breadcrumbs_addon_name = 'breadcrumbs';
$tables['breadcrumbs'] = 'cw_breadcrumbs';
cw_include('addons/' . breadcrumbs_addon_name . '/include/func.breadcrumbs.php');
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('replace', 'admin/breadcrumbs_management.php', 'addons/' . breadcrumbs_addon_name . '/admin/breadcrumbs_management.php'), array('replace', 'admin/select_breadcrumb.php', 'addons/' . breadcrumbs_addon_name . '/admin/select_breadcrumb.php'), array('post', 'init/abstract.php', 'addons/' . breadcrumbs_addon_name . '/admin/breadcrumb.php'));
    cw_addons_set_template(array('replace', 'admin/main/breadcrumbs_management.tpl', 'addons/' . breadcrumbs_addon_name . '/admin/breadcrumbs_management.tpl'), array('replace', 'admin/main/select_breadcrumb.tpl', 'addons/' . breadcrumbs_addon_name . '/admin/select_breadcrumb.tpl'), array('replace', 'admin/main/title.tpl', 'addons/' . breadcrumbs_addon_name . '/admin/title.tpl'), array('replace', 'admin/main/location.tpl', 'addons/' . breadcrumbs_addon_name . '/admin/location.tpl'));
}
Exemplo n.º 22
0
<?php

cw_include('addons/ppd/include/func.hooks.php');
cw_addons_set_controllers(array('replace', 'admin/filetypes.php', 'addons/ppd/admin/filetypes.php'), array('replace', 'customer/getfile.php', 'addons/ppd/customer/getfile.php'), array('pre', 'include/products/modify.php', 'addons/ppd/admin/main.php'), array('pre', 'customer/product.php', 'addons/ppd/customer/main.php'));
cw_addons_set_template(array('replace', 'admin/main/filetypes.tpl', 'addons/ppd/admin/filetypes.tpl'));
cw_addons_set_hooks(array('post', 'cw_doc_change_status_C', 'cw_ppd_doc_change_status_C'), array('post', 'cw_doc_change_status_P', 'cw_ppd_doc_change_status_C'), array('post', 'cw_doc_change_status_D', 'cw_ppd_doc_change_status_D'), array('post', 'cw_doc_delete', 'cw_ppd_doc_delete'), array('pre', 'cw_user_delete', 'cw_ppd_user_delete'), array('post', 'cw_tabs_js_abstract', 'cw_ppd_tabs_js_abstract'));
cw_set_hook('cw_delete_product', 'cw_ppd_delete_product', EVENT_POST);
cw_set_hook('cw_product_clone', 'cw_ppd_product_clone', EVENT_POST);
if (APP_AREA == 'admin') {
    cw_addons_add_css('addons/ppd/admin/main.css');
}
if (APP_AREA == 'customer') {
    cw_addons_add_css('addons/ppd/customer/main.css');
}
$_addon_tables = array('ppd_files', 'ppd_types', 'ppd_downloads', 'ppd_stats');
foreach ($_addon_tables as $_table) {
    $tables[$_table] = 'cw_' . $_table;
}
Exemplo n.º 23
0
<?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');
}
Exemplo n.º 24
0
<?php

$tables['order_messages_threads'] = 'cw_order_messages_threads';
$tables['order_messages_messages'] = 'cw_order_messages_messages';
$tables['mail_rpool'] = 'cw_mail_rpool';
const order_messages_addon_name = 'order_messages';
cw_include('addons/' . order_messages_addon_name . '/func.php');
if (APP_AREA == 'admin') {
    cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw_order_messages_tabs_js_abstract'), array('post', 'cw_send_mail', 'cw_order_messages_send_mail'));
    cw_addons_set_controllers(array('post', 'include/orders/order.php', 'addons/' . order_messages_addon_name . '/threads_list.php'), array('replace', 'admin/thread_messages.php', 'addons/' . order_messages_addon_name . '/thread_messages.php'), array('replace', 'admin/take_messages.php', 'addons/' . order_messages_addon_name . '/take_messages.php'));
    cw_addons_set_template(array('replace', 'admin/main/thread_messages.tpl', 'addons/' . order_messages_addon_name . '/thread_messages.tpl'));
    cw_addons_set_template(array('post', 'mail/mail_header.tpl', 'addons/' . order_messages_addon_name . '/doc_layout_pre.tpl'));
    cw_addons_set_template(array('pre', 'main/docs/doc_layout.tpl', 'addons/' . order_messages_addon_name . '/doc_layout_post.tpl'));
    cw_addons_set_template(array('post', 'main/docs/additional_search_field.tpl', 'addons/' . order_messages_addon_name . '/additional_doc_search_field.tpl'));
    cw_event_listen('on_prepare_search_orders', 'cw_order_messages_prepare_search_orders');
    if ($target == "thread_messages") {
        cw_addons_set_template(array('replace', 'common/head.tpl', 'addons/' . order_messages_addon_name . '/admin_head_order_messages.tpl'));
    }
} elseif (APP_AREA == 'customer') {
    cw_addons_set_hooks(array('post', 'cw_send_mail', 'cw_order_messages_send_mail'));
}
cw_event_listen('on_cron_regular', 'cw_order_messages_get_emails');
Exemplo n.º 25
0
<?php

cw_include('addons/detailed_product_images/func.hooks.php');
cw_addons_set_controllers(array('pre', 'include/products/modify.php', 'addons/detailed_product_images/product_images_modify.php'), array('pre', 'include/products/modify.php', 'addons/detailed_product_images/product_images.php'), array('post', 'customer/product.php', 'addons/detailed_product_images/product_images.php'));
cw_addons_set_template(array('replace', 'customer/products/thumbnail.tpl', 'addons/detailed_product_images/popup_image.tpl', 'images'));
cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw_dpi_tabs_js_abstract'));
cw_set_hook('cw_delete_product', 'cw_dpi_delete_product', EVENT_POST);
if (APP_AREA == 'customer') {
    cw_addons_add_css('addons/detailed_product_images/css/dpi.css');
}
Exemplo n.º 26
0
<?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'));
}
Exemplo n.º 27
0
<?php

$tables['linked_products'] = 'cw_linked_products';
require $app_main_dir . '/addons/accessories/func.php';
require $app_main_dir . '/addons/accessories/func.hooks.php';
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('pre', 'include/products/modify.php', 'addons/accessories/product_modify_accessories.php'));
    cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw_ac_tabs_js_abstract'));
    cw_set_hook('cw_product_clone', 'cw_ac_product_clone', EVENT_POST);
    cw_set_hook('cw_delete_product', 'cw_ac_delete_product', EVENT_POST);
}
if (APP_AREA == 'customer') {
    //cw_addons_add_js('addons/accessories/func.js');
    cw_addons_set_controllers(array('post', 'customer/product.php', 'addons/accessories/product_accessories.php'));
    cw_set_controller('customer/product.php', 'addons/accessories/rv_product.php', EVENT_POST);
    cw_set_controller('customer/cart.php', 'addons/accessories/rv_products_list.php', EVENT_POST);
    cw_set_controller('customer/cart.php', 'addons/accessories/cab_products_list.php', EVENT_POST);
    cw_addons_set_template(array('post', 'customer/cart/cart.tpl', 'addons/accessories/cart_recently_viewed_products.tpl'), array('post', 'customer/cart/cart.tpl', 'addons/accessories/cab_products_list.tpl'));
    cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw_ac_tabs_js_abstract'));
    // Integration with ajax_add2cart addon {
    if (defined('IS_AJAX') && constant('IS_AJAX')) {
        cw_event_listen('on_add_cart', 'cw_ac_on_add_to_cart');
        cw_addons_set_template(array('post', 'addons/ajax_add2cart/add2cart_popup.tpl', 'addons/accessories/add2cart_popup.tpl'));
    }
    // } Integration with ajax_add2cart addon
    cw_addons_add_css('addons/accessories/accessories.css');
}
Exemplo n.º 28
0
<?php

if (!defined('APP_START')) {
    die('Access denied');
}
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('replace', 'admin/addons_manager.php', 'addons/addons_manager/addons_manager.php'), array('replace', 'admin/installmod.php', 'addons/addons_manager/installmod.php'));
    cw_addons_set_template(array('replace', 'admin/main/addons_manager.tpl', 'addons/addons_manager/addons_manager.tpl'), array('replace', 'admin/configuration/addons_manager.tpl', 'addons/addons_manager/addons_manager.tpl'));
}
cw_addons_set_controllers(array('replace', 'customer/version.php', 'addons/addons_manager/version.php'), array('replace', 'admin/version.php', 'addons/addons_manager/version.php'));
Exemplo n.º 29
0
<?php

/*
 * Vendor: CW
 * addon: Orders Extra Features
 */
const orders_extra_features_addon_name = 'orders_extra_features';
if (APP_AREA == 'admin') {
    cw_addons_set_controllers(array('replace', 'admin/report_cost_history.php', 'addons/' . orders_extra_features_addon_name . '/admin/report_cost_history.php'), array('replace', 'admin/profit_reports.php', 'addons/' . orders_extra_features_addon_name . '/admin/profit_reports.php'));
    cw_addons_set_template(array('replace', 'admin/orders/report_cost_history.tpl', 'addons/' . orders_extra_features_addon_name . '/admin/report_cost_history.tpl'), array('replace', 'admin/orders/profit_reports.tpl', 'addons/' . orders_extra_features_addon_name . '/admin/profit_reports.tpl'), array('post', 'main/orders/search.tpl@after_product_field', 'addons/' . orders_extra_features_addon_name . '/admin/excl_by_product_name.tpl'));
}
Exemplo n.º 30
0
<?php

namespace CW\Ajax_Add2Cart;

const addon_name = 'ajax_add2cart';
const addon_version = '0.2';
if (APP_AREA == 'customer' && !empty($addons[addon_name])) {
    cw_include('addons/ajax_add2cart/func.php');
    if ($target == 'cart') {
        cw_addons_set_controllers(array('post', 'customer/cart.php', 'addons/ajax_add2cart/minicart.php'));
        cw_event_listen('on_add_cart', 'CW\\Ajax_Add2Cart\\on_add_cart');
    }
    // Skin requirements:
    // add_to_cart.tpl is used for button
    // cw_form_submit is used for form submittion, no GET links supported
    if ($target != 'gifts') {
        cw_addons_set_template(array('replace', 'customer/menu/minicart.tpl', 'addons/ajax_add2cart/minicart.tpl'), array('pre', 'buttons/add_to_cart.tpl', 'addons/' . addon_name . '/add_to_cart.tpl', 'CW\\Ajax_Add2Cart\\cw_smarty_replace_href'), array('pre', 'buttons/buy_now.tpl', 'addons/' . addon_name . '/buy_now.tpl', 'CW\\Ajax_Add2Cart\\cw_smarty_replace_href'));
    }
    cw_addons_set_template(array('pre', 'customer/menu/microcart.tpl', 'addons/ajax_add2cart/microcart.tpl'));
    cw_addons_add_css('addons/ajax_add2cart/minicart.css');
    cw_addons_add_js('addons/ajax_add2cart/minicart.js');
    cw_set_controller('addons/mobile/init/mobile.php', 'addons/' . addon_name . '/addons/mobile.php', EVENT_POST);
}