/
register.js
97 lines (96 loc) · 2.96 KB
/
register.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import { Reaction } from "/server/api";
Reaction.registerPackage({
label: "Marketplace",
name: "reaction-marketplace",
icon: "fa fa-globe",
autoEnable: false,
settings: {
name: "Marketplace",
enabled: true,
shops: {
enabledShopTypes: [{
shopType: "merchant",
active: true
}, {
shopType: "affiliate",
active: false
}],
enabledPackagesByShopTypes: [{
shopType: "merchant",
enabledPackages: [
"reaction-dashboard",
"reaction-accounts",
"reaction-orders",
"reaction-connectors",
"reaction-connectors-shopify",
"reaction-product-admin",
"product-detail-simple",
"reaction-product-simple",
"reaction-product-variant",
"reaction-notification",
"reaction-marketplace",
"reaction-analytics",
"reaction-inventory",
"reaction-sms",
"reaction-social",
"reaction-stripe",
"reaction-taxes",
"discount-codes"]
}, {
shopType: "affiliate",
enabledPackages: [
"reaction-dashboard",
"reaction-product-simple",
"reaction-product-variant",
"reaction-notification",
"reaction-analytics",
"reaction-sms"]
}]
},
public: {
allowMerchantSignup: false, // Merchants can sign up without an invite
marketplaceNakedRoutes: true, // Routes to the primary marketplace shop should not use shop prefix
merchantCart: false, // Unique cart for each merchant
merchantFulfillment: true, // Fulfillment comes from merchant which supplies product
merchantLocale: false, // Currency and Language come from active merchant shop
// merchantLanguage: false, // Language comes from active merchant shop
// merchantCurrency: false, // Currency comes from active merchant shop
merchantTheme: false, // Theme comes from active merchant shop
merchantShippingRates: false // Each merchant defines their own shipping rates
}
},
registry: [{
label: "Marketplace",
icon: "fa fa-globe",
provides: ["shopSettings"],
container: "dashboard",
template: "marketplaceShopSettings",
showForShopTypes: ["primary"]
}, {
route: "shop/settings/shops",
template: "MarketplaceShops",
name: "marketplaceShops",
label: "Marketplace Shops",
icon: "fa fa-globe",
provides: ["settings"],
container: "dashboard",
showForShopTypes: ["primary"],
meta: {
actionView: {
dashboardSize: "lg"
}
},
permissions: [{
label: "Marketplace Shops",
permission: "marketplaceShops"
}]
}, {
// This provides the settings container for marketplaceMerchantSettings
label: "My Shop Settings",
icon: "fa fa-briefcase",
provides: ["shopSettings"],
container: "dashboard",
template: "marketplaceMerchantSettings",
hideForShopTypes: ["primary"]
}]
});