<?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'));
}
<?php

cw_include('addons/paypal/include/func.paypal.php');
cw_addons_set_controllers(array('replace', 'customer/paypal.php', 'addons/paypal/customer/paypal.php'));
cw_addons_set_template(array('post', 'main/docs/notes.tpl@doc_process_other', 'addons/paypal/admin/doc_process_data.tpl'));
cw_addons_set_hooks(array('post', 'cw_payment_get_methods', 'cw_payment_paypal_get_methods'), array('post', 'cw_payment_run_processor', 'cw_payment_paypal_run_processor'));
<?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'));
}
<?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');
}
<?php

$tables['flexible_import_profiles'] = 'cw_flexible_import_profiles';
$tables['flexible_import_files'] = 'cw_flexible_import_files';
$var_dirs['flex_import_test'] = $app_dir . '/files/flex_import_test';
define("fi_files_path", "./files/flexible_import/");
global $csvxc_field_types;
$csvxc_field_types = array('PRICE' => "decimal(12,2) NOT NULL DEFAULT '0.00'", 'PRICE_MODIFIER' => "decimal(12,2) NOT NULL DEFAULT '0.00'", 'DESCR' => "text NOT NULL DEFAULT ''", 'FULLDESCR' => "text NOT NULL DEFAULT ''", 'PRODUCTID' => "int(11) NOT NULL DEFAULT '0'", 'PRODUCTID_TO' => "int(11) NOT NULL DEFAULT '0'", 'OPTIONID' => "int(11) NOT NULL DEFAULT '0'", 'CLASSID' => "int(11) NOT NULL DEFAULT '0'", 'ADD_DATE' => "int(11) NOT NULL DEFAULT '0'", 'WEIGHT' => "decimal(12,2) NOT NULL DEFAULT '0.00'", 'LIST_PRICE' => "decimal(12,2) NOT NULL DEFAULT '0.00'", 'AVAIL' => "int(11) NOT NULL DEFAULT '0'", 'MIN_AMOUNT' => "int(11) NOT NULL DEFAULT '0'", 'LOW_AVAIL_LIMIT' => "int(11) NOT NULL DEFAULT '0'", 'default' => "varchar(255) NOT NULL DEFAULT ''");
global $tmp_load_tables;
$tmp_load_tables = array('CATEGORIES' => array('CATEGORYID' => array('type' => 'int', 'key' => true), 'CATEGORY' => array('type' => 'text', 'key' => true), 'DESCR' => array('type' => 'longtext'), 'META_DESCR' => array('type' => 'longtext'), 'AVAIL' => array('type' => 'bool'), 'ORDERBY' => array('type' => 'int'), 'META_KEYWORDS' => array('type' => 'text'), 'ICON' => array('type' => 'text', 'file_path' => true)), 'PRODUCTS' => array('PRODUCTID' => array('type' => 'int', 'key' => true), 'PRODUCTCODE' => array('type' => 'text', 'key' => true), 'PRODUCT' => array('type' => 'text', 'key' => true), 'WEIGHT' => array('type' => 'text'), 'LIST_PRICE' => array('type' => 'text'), 'DESCR' => array('type' => 'longtext'), 'FULLDESCR' => array('type' => 'longtext'), 'KEYWORDS' => array('type' => 'text'), 'AVAIL' => array('type' => 'text'), 'RATING' => array('type' => 'text'), 'FORSALE' => array('type' => 'text'), 'SHIPPING_FREIGHT' => array('type' => 'text'), 'FREE_SHIPPING' => array('type' => 'text'), 'DISCOUNT_AVAIL' => array('type' => 'text'), 'MIN_AMOUNT' => array('type' => 'text'), 'DIM_X' => array('type' => 'text'), 'DIM_Y' => array('type' => 'text'), 'DIM_Z' => array('type' => 'text'), 'LOW_AVAIL_LIMIT' => array('type' => 'text'), 'FREE_TAX' => array('type' => 'text'), 'CATEGORYID' => array('type' => 'int', 'grouped_key' => array('CATEGORY')), 'CATEGORY' => array('type' => 'text', 'grouped_key' => array('CATEGORYID')), 'MEMBERSHIP' => array('type' => 'text', 'grouped_key' => array('MEMBERSHIPID')), 'PRICE' => array('type' => 'text'), 'THUMBNAIL' => array('type' => 'text'), 'IMAGE' => array('type' => 'text'), 'TAXES' => array('type' => 'text'), 'ADD_DATE' => array('type' => 'text'), 'MANUFACTURERID' => array('type' => 'int', 'grouped_key' => array('MANUFACTURER')), 'MANUFACTURER' => array('type' => 'text', 'grouped_key' => array('MANUFACTURERID')), 'MEMBERSHIPID' => array('type' => 'int', 'grouped_key' => array('MEMBERSHIP')), 'SUPPLIERID' => array('type' => 'text'), 'COST' => array('type' => 'text')), 'PRODUCTS_EXTRA_FIELD_VALUES' => array('PRODUCTID' => array('type' => 'int', 'key' => true), 'PRODUCTCODE' => array('type' => 'text', 'key' => true), 'PRODUCT' => array('type' => 'text', 'key' => true), 'dynamic_field_set' => array('query' => "select field from {$tables['attributes']} where item_type='P' and addon in ('', 'custom_saratogawine_magazines','custom_saratogawine_backorder','clean_urls')")));
if (APP_AREA == 'admin') {
    cw_include('addons/flexible_import/include/func.flexible_import.php');
    cw_include('addons/flexible_import/include/func.import.csvxcart.php');
    cw_include('addons/flexible_import/include/csv_def_arrays.php');
    cw_set_controller('admin/import.php', 'addons/flexible_import/admin/flexible_import.php', EVENT_POST);
    cw_set_controller('admin/import.php', 'addons/flexible_import/admin/flexible_import_profile.php', EVENT_POST);
    cw_addons_set_template(array('replace', 'admin/import_export/flexible_import.tpl', 'addons/flexible_import/flexible_import.tpl'), array('replace', 'admin/import_export/flexible_import_profile.tpl', 'addons/flexible_import/add_modify_import_profile.tpl'));
    cw_addons_add_js('addons/flexible_import/flexible_import.js');
    cw_addons_add_css('addons/flexible_import/flexible_import.css');
    cw_set_hook('cw_error_check', 'cw_flexible_import_validate_import_file', EVENT_POST);
}
<?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'));
}
<?php

cw_include('addons/mailchimp_subscription/include/MCAPI.class.php');
cw_include('addons/mailchimp_subscription/include/func.mailchimp.php');
cw_set_controller('include/settings.php', 'addons/mailchimp_subscription/admin/settings.php', EVENT_PRE);
cw_addons_set_hooks(array('pre', 'cw_payment_run_processor', 'cw_post_mailchimp_subscribe'));
cw_addons_set_template(array('post', 'customer/checkout/notes.tpl', 'addons/mailchimp_subscription/mailchimp_subscription.tpl'));
<?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'));
}
<?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'));
Esempio n. 10
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');
Esempio n. 11
0
<?php

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

const addon_name = 'bookmarks';
const addon_target = 'bookmarks';
$tables['bookmarks'] = 'cw_bookmarks';
if (APP_AREA != 'admin') {
    return true;
}
cw_include('addons/' . addon_name . '/func.php');
if ($target == addon_target) {
    cw_set_controller(APP_AREA . '/' . addon_target . '.php', 'addons/' . addon_name . '/' . addon_target . '.php', EVENT_REPLACE);
}
cw_addons_set_template(array('post', 'elements/bottom.tpl', 'addons/' . addon_name . '/bookmarks.tpl'), array('post', 'elements/bottom_admin.tpl', 'addons/' . addon_name . '/bookmarks.tpl'));
cw_event_listen('on_login', 'CW\\bookmarks\\on_login');
cw_event_listen('on_customer_delete', 'CW\\bookmarks\\on_customer_delete');
cw_event_listen('on_sessions_delete', 'CW\\bookmarks\\on_sessions_delete');
cw_addons_add_css('addons/' . addon_name . '/bookmarks.css');
cw_addons_add_js('addons/' . addon_name . '/bookmarks.js');
cw_set_controller('addons/mobile/init/mobile.php', 'addons/' . addon_name . '/addons/mobile.php', EVENT_POST);
Esempio n. 12
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;
}
Esempio n. 13
0
$cw_allowed_tunnels[] = 'cw\\addon_skeleton\\get_available_entries_list';
// Include functions
cw_include('addons/' . addon_name . '/include/func.php');
// Sometimes some part of initialization must be after all addons init - in post_init.php
cw_set_controller('init/post_init.php', 'addons/' . addon_name . '/post_init.php', EVENT_POST);
// You can define different hooks depending on area or $target or use common init sequence.
if (APP_AREA == 'admin') {
    // Define own controller which does not exists yet using EVENT_REPLACE
    /* Place comment here with description of functionality provided by this additional controller */
    cw_set_controller(APP_AREA . '/' . addon_target . '.php', 'addons/' . addon_name . '/admin/' . addon_target . '.php', EVENT_REPLACE);
}
if (APP_AREA == 'customer') {
    // Add own controller to existing one using EVENT_POST or EVENT_PRE
    /* Place comment here with description of functionality provided by this additional controller */
    cw_set_controller(APP_AREA . '/index.php', 'addons/' . addon_name . '/customer/index.php', EVENT_POST);
}
// Event handlers
/* Place comment here with description of functionality provided by this event handler */
cw_event_listen('on_login', 'cw\\' . addon_name . '\\on_login');
// specify full function name for event handlers including namespace
// Cron handlers. See docs/core.cron.txt and core/cron/cron.php
cw_event_listen('on_cron_daily', 'cw\\' . addon_name . '\\on_cron_daily');
// Function hooks. Note you can use same function name under scope of addon's namespace
/* Place comment here with description of functionality provided by this hook or how it alters default function */
cw_set_hook('cw_products_in_cart', 'cw\\' . addon_name . '\\cw_products_in_cart', EVENT_POST);
// Hook templates
cw_addons_set_template(array('replace', 'admin/main/' . addon_target . '.tpl', 'addons/' . addon_name . '/admin/' . addon_target . '.tpl'), array('post', 'elements/bottom.tpl', 'addons/' . addon_name . '/customer/my_bottom.tpl'), array('pre', 'elements/bottom_admin.tpl@label', 'addons/' . addon_name . '/admin/my_bottom_admin.tpl'));
// Add addon CSS style
cw_addons_add_css('addons/' . addon_name . '/my_addon.css');
// Add addon JS
cw_addons_add_js('addons/' . addon_name . '/my_addon.js');
Esempio n. 14
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'));
}
Esempio n. 15
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');
Esempio n. 16
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);
}
Esempio n. 17
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'));
}
Esempio n. 18
0
/*
 * Vendor:	CW
 * addon:	catalog_product
 * description:	
 *  New product type "Catalog" means that product is only listed on this site but can be bought on another site
 *  For this type of products the URL to real shop is required
 *  This product has special "buy" button in customer area, which may differ by appearance and text from normal products. For example it cat say "Buy from artist's site"
 *  Statistic about redirections to target site can be gathered as add_to_cart statistic (see "New statistic couner" spec)
 *  "Report as sold" feature is for this type of products only
 */
namespace CW\catalog_product;

const addon_name = 'catalog_product';
const addon_target = '';
const addon_version = '0.3';
define('PRODUCT_TYPE_CATALOG', 4);
cw_include('addons/' . addon_name . '/func.php');
if (APP_AREA == 'admin' && $target == 'products') {
    // Hook product modify to require Original URL attr for catalog product type
    cw_set_hook('cw_error_check', 'CW\\catalog_product\\cw_error_check', EVENT_POST);
    // Hook product modify to hide Original URL attr for other product types
    cw_addons_set_hooks(array('post', 'cw_attributes_get', 'CW\\catalog_product\\cw_attributes_get'));
}
if (APP_AREA == 'customer') {
    // Hook special catalog_redirect controller to redirect to original_url
    cw_set_controller('customer/catalog_redirect.php', 'addons/' . addon_name . '/customer/catalog_redirect.php', EVENT_REPLACE);
    cw_set_controller('customer/product.php', 'addons/' . addon_name . '/customer/product.php', EVENT_POST);
    cw_set_controller('customer/report_about_sold.php', 'addons/' . addon_name . '/customer/report_about_sold.php', EVENT_REPLACE);
    // hook for add_to_cart button to replace form, text and action
    cw_addons_set_template(array('pre', 'buttons/add_to_cart.tpl', 'addons/' . addon_name . '/add_to_cart.tpl', 'CW\\catalog_product\\cw_is_catalog_product'), array('pre', 'buttons/buy_now.tpl', 'addons/' . addon_name . '/buy_now.tpl', 'CW\\catalog_product\\cw_is_catalog_product'), array('replace', 'customer/products/product-amount.tpl', '', 'CW\\catalog_product\\cw_is_catalog_product'), array('pre', 'customer/products/product-fields.tpl', 'addons/' . addon_name . '/report_as_sold.tpl'));
}
Esempio n. 19
0
<?php

/*
 * Vendor: CW
 * addon: Feedback report
 */
const feedback_addon_name = 'feedback_report';
const feedback_our_email_to_send = '*****@*****.**';
const feedback_files_folder_name = 'feedback';
const feedback_image_type = 'jpeg';
// png/jpeg (also need change type in feedback.min.js and html2canvas.min.js)
cw_include('addons/' . feedback_addon_name . '/include/func.feedback.php');
cw_event_listen('on_build_var_dirs', 'cw_fbr_build_var_dirs');
cw_event_listen('on_log_add', 'cw_fbr_log_add');
cw_set_controller(APP_AREA . '/save_feedback_data.php', 'addons/' . feedback_addon_name . '/common/save_feedback_data.php', EVENT_REPLACE);
cw_set_controller('init/numbers.php', 'addons/' . feedback_addon_name . '/common/error_handler.php', EVENT_POST);
cw_set_controller('customer/feedback.php', 'addons/' . feedback_addon_name . '/common/feedback.php', EVENT_REPLACE);
cw_event_listen('on_cron_hourly', 'cw_fbr_prepare_and_send_feedbacks');
cw_addons_set_template(array('post', APP_AREA . '/elements/bottom_links.tpl', 'addons/' . feedback_addon_name . '/bottom_links.tpl'), array('post', 'customer/main/feedback_image.tpl', 'addons/' . feedback_addon_name . '/feedback_image.tpl'));
cw_addons_add_css('addons/' . feedback_addon_name . '/css/feedback.css');
cw_addons_add_js('addons/' . feedback_addon_name . '/js/feedback.min.js');
cw_addons_add_js('addons/' . feedback_addon_name . '/js/html2canvas.min.js');
Esempio n. 20
0
<?php

if (APP_AREA == 'customer') {
    cw_set_controller('customer/index.php', 'addons/google_remarketing/customer/google_remarketing.php', EVENT_POST);
    cw_set_controller('customer/product.php', 'addons/google_remarketing/customer/google_remarketing.php', EVENT_POST);
    cw_set_controller('customer/cart.php', 'addons/google_remarketing/customer/google_remarketing.php', EVENT_POST);
    cw_addons_set_template(array('post', 'elements/bottom.tpl', 'addons/google_remarketing/google_remarketing.tpl'));
}
Esempio n. 21
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');
}
Esempio n. 22
0
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');
cw_addons_add_js('addons/dashboard/js/plugins/jqplot.highlighter.min.js');
cw_addons_add_css('addons/dashboard/js/jquery.jqplot.min.css');
Esempio n. 23
0
<?php

if (APP_AREA == 'customer') {
    cw_set_controller('customer/ajax_product_search.php', 'addons/ajax_search/customer/ajax_search.php', EVENT_REPLACE);
    cw_addons_set_template(array('post', 'js/presets_js.tpl', 'addons/ajax_search/ajax_search.tpl'));
    cw_addons_add_js('addons/ajax_search/ajax_search.js');
    cw_addons_add_css('addons/ajax_search/ajax_search.css');
}
Esempio n. 24
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);
}
Esempio n. 25
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');
}
Esempio n. 26
0
namespace cw\product_stages;

// Constants definition
// these constants are defined in scope of addon's namespace
const addon_name = 'product_stages';
const addon_target = 'product_stages';
// Main target of addon, useful but of course addon can handle several targets
$cw_allowed_tunnels[] = 'cw\\' . addon_name . '\\cw_product_stages_get_doc_stages_history';
// New tables definition
$tables['product_stages_library'] = 'cw_product_stages_library';
$tables['product_stages_product_settings'] = 'cw_product_stages_product_settings';
$tables['docs_statuses_log'] = 'cw_docs_statuses_log';
$tables['product_stages_process_log'] = 'cw_product_stages_process_log';
// Include functions
cw_include('addons/' . addon_name . '/include/func.php');
// You can define different hooks depending on area or $target or use common init sequence.
if (APP_AREA == 'admin') {
    // Define own controller which does not exists yet using EVENT_REPLACE
    cw_set_controller(APP_AREA . '/' . addon_target . '.php', 'addons/' . addon_name . '/admin/' . addon_target . '.php', EVENT_REPLACE);
    cw_set_controller('include/products/modify.php', 'addons/' . addon_name . '/admin/include/products/modify.php', EVENT_POST);
    cw_set_controller('include/products/modify.php', 'addons/' . addon_name . '/admin/include/products/modify.php', EVENT_PRE);
    cw_set_controller(APP_AREA . '/stage_email_test.php', 'addons/' . addon_name . '/admin/stage_email_test.php', EVENT_REPLACE);
}
cw_addons_set_hooks(array('post', 'cw_tabs_js_abstract', 'cw\\' . addon_name . '\\cw_product_stages_tabs_js_abstract'));
// Cron handlers. See docs/core.cron.txt and core/cron/cron.php
cw_event_listen('on_cron_daily', 'cw\\' . addon_name . '\\on_cron_daily');
cw_event_listen('on_doc_change_status', 'cw\\' . addon_name . '\\cw_product_stages_on_doc_change_status');
// Hook templates
cw_addons_set_template(array('replace', 'admin/main/' . addon_target . '.tpl', 'addons/' . addon_name . '/admin/' . addon_target . '.tpl'));
cw_addons_set_template(array('replace', 'admin/main/stage_email_test.tpl', 'addons/' . addon_name . '/admin/stage_email_test.tpl'));
Esempio n. 27
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'));
Esempio n. 28
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');
Esempio n. 29
0
<?php

/*
 * Vendor: cw
 * addon: twitter_login
 */
/*
 * init.php
 * this file only defines constants, variables, functinos, hooks and event hanlers
 * no real routine must be here on init stage
 */
// Use namespace for your own addon as vendor\addon_name
//namespace cw\twitter_login;
// Constants definition
// these constants are defined in scope of addon's namespace
//const addon_name    = 'twitter_login';
// Include functions
cw_include('addons/twitter_login/include/func.php');
if (APP_AREA == 'customer') {
    cw_set_controller('include/check_useraccount.php', 'addons/twitter_login/post_init.php', EVENT_POST);
    cw_set_controller(APP_AREA . '/twitter_login_verified.php', 'addons/twitter_login/customer/twitter_login_verified.php', EVENT_REPLACE);
    cw_event_listen('on_logout', 'cw_twitter_on_logout');
    cw_addons_set_template(array('post', 'buttons/social_media_panel.tpl', 'addons/twitter_login/customer/auth-button.tpl'));
}
Esempio n. 30
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'));
}