-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_config.php
25 lines (20 loc) · 1.03 KB
/
_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
define('ECOMMERCE_DIR','ecommerce');
// Extend the Member with e-commerce related fields.
DataObject::add_extension('Member', 'EcommerceRole');
// Extend Payment with e-commerce relationship.
if(!class_exists('Payment')) user_error("You need to also install the Payment module to use the eCommerce module", E_USER_ERROR);
DataObject::add_extension('Payment', 'EcommercePayment');
//create controller for shopping cart
Director::addRules(50, array(
ShoppingCart::$URLSegment . '/$Action/$ID/$OtherID' => 'ShoppingCart'
));
Object::add_extension("DevelopmentAdmin", "EcommerceDevelopmentAdminDecorator");
DevelopmentAdmin::$allowed_actions[] = 'ecommerce';
//variations
DataObject::add_extension("Product","ProductVariationDecorator");
Object::add_extension("Product_Controller","ProductControllerVariationExtension");
//reports
SS_Report::register("SideReport", "EcommerceSideReport_AllProducts");
SS_Report::register("SideReport", "EcommerceSideReport_FeaturedProducts");
SS_Report::register("SideReport", "EcommerceSideReport_NoImageProducts");