Version Notes
Create an option that will stop users who are not logged in accessing pages.
Create an option that will redirect user to a specified CMS page or the customer login/register page when not logged in.
Download this release
Release Info
Developer | Sitewards Magento Team |
Extension | Sitewards_B2BProfessional |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.1.0
- app/code/community/Sitewards/B2BProfessional/Block/Price.php +1 -1
- app/code/community/Sitewards/B2BProfessional/Helper/Data.php +38 -0
- app/code/community/Sitewards/B2BProfessional/Model/Observer.php +62 -0
- app/code/community/Sitewards/B2BProfessional/Model/System/Config/Source/Page.php +32 -0
- app/code/community/Sitewards/B2BProfessional/etc/config.xml +13 -1
- app/code/community/Sitewards/B2BProfessional/etc/system.xml +190 -161
- app/locale/de_DE/Sitewards_B2BProfessional.csv +30 -23
- app/locale/en_US/Sitewards_B2BProfessional.csv +3 -2
- package.xml +7 -5
app/code/community/Sitewards/B2BProfessional/Block/Price.php
CHANGED
@@ -43,4 +43,4 @@ class Sitewards_B2BProfessional_Block_Price extends Mage_Catalog_Block_Product_P
|
|
43 |
}
|
44 |
return $sPriceHtml;
|
45 |
}
|
46 |
-
}
|
43 |
}
|
44 |
return $sPriceHtml;
|
45 |
}
|
46 |
+
}
|
app/code/community/Sitewards/B2BProfessional/Helper/Data.php
CHANGED
@@ -14,6 +14,15 @@
|
|
14 |
* @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/)
|
15 |
*/
|
16 |
class Sitewards_B2BProfessional_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* Check to see if the user is allowed on the current store
|
19 |
*
|
@@ -228,4 +237,33 @@ class Sitewards_B2BProfessional_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
228 |
$oCurrentCategory = $oCurrentCategory->load($iCategoryId);
|
229 |
return array_merge($aCurrentCategories, $oCurrentCategory->getAllChildren(true));
|
230 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
}
|
14 |
* @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/)
|
15 |
*/
|
16 |
class Sitewards_B2BProfessional_Helper_Data extends Mage_Core_Helper_Abstract {
|
17 |
+
/**
|
18 |
+
* Check to see if the website is set-up to require a user login to view pages
|
19 |
+
*
|
20 |
+
* @return boolean
|
21 |
+
*/
|
22 |
+
public function checkRequireLogin() {
|
23 |
+
return Mage::getStoreConfigFlag('b2bprofessional/generalsettings/requirelogin');
|
24 |
+
}
|
25 |
+
|
26 |
/**
|
27 |
* Check to see if the user is allowed on the current store
|
28 |
*
|
237 |
$oCurrentCategory = $oCurrentCategory->load($iCategoryId);
|
238 |
return array_merge($aCurrentCategories, $oCurrentCategory->getAllChildren(true));
|
239 |
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Get the require login message
|
243 |
+
*
|
244 |
+
* @return string
|
245 |
+
*/
|
246 |
+
public function getRequireLoginMessage() {
|
247 |
+
// text displayed instead of price
|
248 |
+
if (Mage::getStoreConfig('b2bprofessional/languagesettings/languageoverride') == 1) {
|
249 |
+
$sLoginMessage = Mage::getStoreConfig('b2bprofessional/languagesettings/requireloginmessage');
|
250 |
+
} else {
|
251 |
+
$sLoginMessage = $this->__('You do not have access to view this store.');
|
252 |
+
}
|
253 |
+
return $sLoginMessage;
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Get the url of the require login redirect
|
258 |
+
*
|
259 |
+
* @return string
|
260 |
+
*/
|
261 |
+
public function getRequireLoginRedirect() {
|
262 |
+
$sRedirectPath = '/';
|
263 |
+
$sConfigVar = Mage::getStoreConfig('b2bprofessional/generalsettings/requireloginredirect');
|
264 |
+
if (isset($sConfigVar)) {
|
265 |
+
$sRedirectPath = $sConfigVar;
|
266 |
+
}
|
267 |
+
return Mage::getUrl($sRedirectPath);
|
268 |
+
}
|
269 |
}
|
app/code/community/Sitewards/B2BProfessional/Model/Observer.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Sitewards_B2BProfessional_Model_Observer
|
4 |
+
* - Observer to catch the following actions
|
5 |
+
*
|
6 |
+
* @category Sitewards
|
7 |
+
* @package Sitewards_B2BProfessional
|
8 |
+
* @copyright Copyright (c) 2013 Sitewards GmbH (http://www.sitewards.com/)
|
9 |
+
*/
|
10 |
+
class Sitewards_B2BProfessional_Model_Observer {
|
11 |
+
/**
|
12 |
+
* Check if the site requires login to work
|
13 |
+
* - Add notice,
|
14 |
+
* - Redirect to the home page,
|
15 |
+
*
|
16 |
+
* @param Varien_Event_Observer $oObserver
|
17 |
+
*/
|
18 |
+
public function onControllerActionPreDispatch(Varien_Event_Observer $oObserver) {
|
19 |
+
/* @var $oHelper Sitewards_B2BProfessional_Helper_Data */
|
20 |
+
$oHelper = Mage::helper('b2bprofessional');
|
21 |
+
if($oHelper->checkGlobalActive() == true) {
|
22 |
+
/*
|
23 |
+
* Check to see if the system requires a login
|
24 |
+
* And there is no logged in user
|
25 |
+
*/
|
26 |
+
if($oHelper->checkRequireLogin() == true && !Mage::getSingleton('customer/session')->isLoggedIn()) {
|
27 |
+
/* @var $oControllerAction Mage_Core_Controller_Front_Action */
|
28 |
+
$oControllerAction = $oObserver->getData('controller_action');
|
29 |
+
/*
|
30 |
+
* Check to see if the controller is:
|
31 |
+
* 1) Cms related for cms pages,
|
32 |
+
* 2) A front action to allow for admin pages,
|
33 |
+
* 3) Customer account to allow for login
|
34 |
+
*/
|
35 |
+
if(
|
36 |
+
!$oControllerAction instanceof Mage_Cms_IndexController
|
37 |
+
&&
|
38 |
+
!$oControllerAction instanceof Mage_Cms_PageController
|
39 |
+
&&
|
40 |
+
$oControllerAction instanceof Mage_Core_Controller_Front_Action
|
41 |
+
&&
|
42 |
+
!$oControllerAction instanceof Mage_Customer_AccountController
|
43 |
+
){
|
44 |
+
// Redirect to the homepage
|
45 |
+
/* @var $oResponse Mage_Core_Controller_Response_Http */
|
46 |
+
$oResponse = $oControllerAction->getResponse();
|
47 |
+
$oResponse->setRedirect($oHelper->getRequireLoginRedirect());
|
48 |
+
|
49 |
+
/*
|
50 |
+
* Add message to the session
|
51 |
+
* - Note:
|
52 |
+
* We need session_write_close otherwise the messages get lots in redirect
|
53 |
+
*/
|
54 |
+
/* @var $oSession Mage_Core_Model_Session */
|
55 |
+
$oSession = Mage::getSingleton('core/session');
|
56 |
+
$oSession->addNotice($oHelper->getRequireLoginMessage());
|
57 |
+
session_write_close();
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
app/code/community/Sitewards/B2BProfessional/Model/System/Config/Source/Page.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Sitewards_B2BProfessional_Model_System_Config_Source_Page
|
4 |
+
* - Create an options array with the current system cms pages and the customer login page
|
5 |
+
*
|
6 |
+
* @category Sitewards
|
7 |
+
* @package Sitewards_B2BProfessional
|
8 |
+
* @copyright Copyright (c) 2013 Sitewards GmbH (http://www.sitewards.com/)
|
9 |
+
*/
|
10 |
+
class Sitewards_B2BProfessional_Model_System_Config_Source_Page extends Mage_Adminhtml_Model_System_Config_Source_Cms_Page {
|
11 |
+
/**
|
12 |
+
* Populate an options array with the current system cms pages and the customer login page
|
13 |
+
*
|
14 |
+
* @param boolean $bAddEmpty
|
15 |
+
* @return array
|
16 |
+
*/
|
17 |
+
public function toOptionArray() {
|
18 |
+
if (!$this->_options) {
|
19 |
+
parent::toOptionArray();
|
20 |
+
$aNewCmsOption = array(
|
21 |
+
'value' => '',
|
22 |
+
'label' => Mage::helper('b2bprofessional')->__('-- Please Select --')
|
23 |
+
);
|
24 |
+
$aCustomerLogin = array(
|
25 |
+
'value' => 'customer/account/login',
|
26 |
+
'label' => Mage::helper('b2bprofessional')->__('Customer Login')
|
27 |
+
);
|
28 |
+
array_unshift($this->_options, $aNewCmsOption, $aCustomerLogin);
|
29 |
+
}
|
30 |
+
return $this->_options;
|
31 |
+
}
|
32 |
+
}
|
app/code/community/Sitewards/B2BProfessional/etc/config.xml
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
<config>
|
19 |
<modules>
|
20 |
<Sitewards_B2BProfessional>
|
21 |
-
<version>2.0
|
22 |
</Sitewards_B2BProfessional>
|
23 |
</modules>
|
24 |
<global>
|
@@ -43,6 +43,16 @@
|
|
43 |
<class>Sitewards_B2BProfessional_Block</class>
|
44 |
</b2bprofessional>
|
45 |
</blocks>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
<helpers>
|
47 |
<b2bprofessional>
|
48 |
<class>Sitewards_B2BProfessional_Helper</class>
|
@@ -103,6 +113,8 @@
|
|
103 |
<languagesettings>
|
104 |
<logintext>Please login</logintext>
|
105 |
<errortext>Your account is not allowed to access this store.</errortext>
|
|
|
|
|
106 |
</languagesettings>
|
107 |
</b2bprofessional>
|
108 |
</default>
|
18 |
<config>
|
19 |
<modules>
|
20 |
<Sitewards_B2BProfessional>
|
21 |
+
<version>2.1.0</version>
|
22 |
</Sitewards_B2BProfessional>
|
23 |
</modules>
|
24 |
<global>
|
43 |
<class>Sitewards_B2BProfessional_Block</class>
|
44 |
</b2bprofessional>
|
45 |
</blocks>
|
46 |
+
<events>
|
47 |
+
<controller_action_predispatch>
|
48 |
+
<observers>
|
49 |
+
<b2bprofessional>
|
50 |
+
<class>b2bprofessional/observer</class>
|
51 |
+
<method>onControllerActionPreDispatch</method>
|
52 |
+
</b2bprofessional>
|
53 |
+
</observers>
|
54 |
+
</controller_action_predispatch>
|
55 |
+
</events>
|
56 |
<helpers>
|
57 |
<b2bprofessional>
|
58 |
<class>Sitewards_B2BProfessional_Helper</class>
|
113 |
<languagesettings>
|
114 |
<logintext>Please login</logintext>
|
115 |
<errortext>Your account is not allowed to access this store.</errortext>
|
116 |
+
<requireloginmessage>You do not have access to view this store.</requireloginmessage>
|
117 |
+
<requireloginredirect>0</requireloginredirect>
|
118 |
</languagesettings>
|
119 |
</b2bprofessional>
|
120 |
</default>
|
app/code/community/Sitewards/B2BProfessional/etc/system.xml
CHANGED
@@ -1,162 +1,191 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/**
|
4 |
-
* sytem.xml
|
5 |
-
* - create admin config tab,
|
6 |
-
* - assign admin config fields to sections
|
7 |
-
*
|
8 |
-
* @category Sitewards
|
9 |
-
* @package Sitewards_B2BProfessional
|
10 |
-
* @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/)
|
11 |
-
*/
|
12 |
-
-->
|
13 |
-
<config>
|
14 |
-
<tabs>
|
15 |
-
<b2bprofessional translate="label" module="b2bprofessional">
|
16 |
-
<label>B2B Professional</label>
|
17 |
-
<sort_order>301</sort_order>
|
18 |
-
</b2bprofessional>
|
19 |
-
</tabs>
|
20 |
-
<sections>
|
21 |
-
<b2bprofessional translate="label" module="b2bprofessional">
|
22 |
-
<label>B2B Professional</label>
|
23 |
-
<tab>general</tab>
|
24 |
-
<frontend_type>text</frontend_type>
|
25 |
-
<sort_order>990</sort_order>
|
26 |
-
<show_in_default>1</show_in_default>
|
27 |
-
<show_in_website>1</show_in_website>
|
28 |
-
<show_in_store>1</show_in_store>
|
29 |
-
<groups>
|
30 |
-
<generalsettings translate="label">
|
31 |
-
<label>General settings</label>
|
32 |
-
<frontend_type>text</frontend_type>
|
33 |
-
<sort_order>1</sort_order>
|
34 |
-
<show_in_default>1</show_in_default>
|
35 |
-
<show_in_website>1</show_in_website>
|
36 |
-
<show_in_store>1</show_in_store>
|
37 |
-
<fields>
|
38 |
-
<active translate="label,comment">
|
39 |
-
<label>Enable B2B extension</label>
|
40 |
-
<frontend_type>select</frontend_type>
|
41 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
42 |
-
<sort_order>1</sort_order>
|
43 |
-
<show_in_default>1</show_in_default>
|
44 |
-
<show_in_website>1</show_in_website>
|
45 |
-
<show_in_store>1</show_in_store>
|
46 |
-
<comment><![CDATA[Enable or disable extension. Customer activation behaviour can be configured under <br />"Customer Configuration > Customer activation"]]></comment>
|
47 |
-
</active>
|
48 |
-
<activecustomers translate="label comment">
|
49 |
-
<label>Global customer activation</label>
|
50 |
-
<frontend_type>select</frontend_type>
|
51 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
52 |
-
<sort_order>
|
53 |
-
<show_in_default>1</show_in_default>
|
54 |
-
<show_in_website>1</show_in_website>
|
55 |
-
<show_in_store>1</show_in_store>
|
56 |
-
<comment><![CDATA[Activate customers for all stores. Otherwise they will only see the prices in the store, they have registered for.]]></comment>
|
57 |
-
</activecustomers>
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
<
|
69 |
-
<label>
|
70 |
-
<frontend_type>select</frontend_type>
|
71 |
-
<source_model>
|
72 |
-
<sort_order>
|
73 |
-
<show_in_default>1</show_in_default>
|
74 |
-
<show_in_website>1</show_in_website>
|
75 |
-
<show_in_store>1</show_in_store>
|
76 |
-
<comment><![CDATA[
|
77 |
-
</
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
<
|
90 |
-
<
|
91 |
-
<
|
92 |
-
<
|
93 |
-
<
|
94 |
-
<
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
<
|
109 |
-
<
|
110 |
-
<sort_order>5</sort_order>
|
111 |
-
<show_in_default>1</show_in_default>
|
112 |
-
<show_in_website>1</show_in_website>
|
113 |
-
<show_in_store>1</show_in_store>
|
114 |
-
<comment><![CDATA[
|
115 |
-
</
|
116 |
-
<
|
117 |
-
<label>
|
118 |
-
<frontend_type>
|
119 |
-
<
|
120 |
-
<
|
121 |
-
<
|
122 |
-
<
|
123 |
-
<
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
<
|
130 |
-
<
|
131 |
-
<
|
132 |
-
<
|
133 |
-
<
|
134 |
-
<
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
<
|
139 |
-
<
|
140 |
-
<
|
141 |
-
<
|
142 |
-
<
|
143 |
-
<
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
<
|
149 |
-
<
|
150 |
-
<
|
151 |
-
<
|
152 |
-
<
|
153 |
-
<
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* sytem.xml
|
5 |
+
* - create admin config tab,
|
6 |
+
* - assign admin config fields to sections
|
7 |
+
*
|
8 |
+
* @category Sitewards
|
9 |
+
* @package Sitewards_B2BProfessional
|
10 |
+
* @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/)
|
11 |
+
*/
|
12 |
+
-->
|
13 |
+
<config>
|
14 |
+
<tabs>
|
15 |
+
<b2bprofessional translate="label" module="b2bprofessional">
|
16 |
+
<label>B2B Professional</label>
|
17 |
+
<sort_order>301</sort_order>
|
18 |
+
</b2bprofessional>
|
19 |
+
</tabs>
|
20 |
+
<sections>
|
21 |
+
<b2bprofessional translate="label" module="b2bprofessional">
|
22 |
+
<label>B2B Professional</label>
|
23 |
+
<tab>general</tab>
|
24 |
+
<frontend_type>text</frontend_type>
|
25 |
+
<sort_order>990</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>1</show_in_website>
|
28 |
+
<show_in_store>1</show_in_store>
|
29 |
+
<groups>
|
30 |
+
<generalsettings translate="label">
|
31 |
+
<label>General settings</label>
|
32 |
+
<frontend_type>text</frontend_type>
|
33 |
+
<sort_order>1</sort_order>
|
34 |
+
<show_in_default>1</show_in_default>
|
35 |
+
<show_in_website>1</show_in_website>
|
36 |
+
<show_in_store>1</show_in_store>
|
37 |
+
<fields>
|
38 |
+
<active translate="label,comment">
|
39 |
+
<label>Enable B2B extension</label>
|
40 |
+
<frontend_type>select</frontend_type>
|
41 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
42 |
+
<sort_order>1</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
<comment><![CDATA[Enable or disable extension. Customer activation behaviour can be configured under <br />"Customer Configuration > Customer activation"]]></comment>
|
47 |
+
</active>
|
48 |
+
<activecustomers translate="label comment">
|
49 |
+
<label>Global customer activation</label>
|
50 |
+
<frontend_type>select</frontend_type>
|
51 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
52 |
+
<sort_order>2</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>1</show_in_store>
|
56 |
+
<comment><![CDATA[Activate customers for all stores. Otherwise they will only see the prices in the store, they have registered for.]]></comment>
|
57 |
+
</activecustomers>
|
58 |
+
<requirelogin translate="label comment">
|
59 |
+
<label>Require User Login</label>
|
60 |
+
<frontend_type>select</frontend_type>
|
61 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
62 |
+
<sort_order>3</sort_order>
|
63 |
+
<show_in_default>1</show_in_default>
|
64 |
+
<show_in_website>1</show_in_website>
|
65 |
+
<show_in_store>1</show_in_store>
|
66 |
+
<comment><![CDATA[The user is required to login before they can view pages in this shop. <br /> Note: CMS pages are always allowed.]]></comment>
|
67 |
+
</requirelogin>
|
68 |
+
<requireloginredirect translate="label comment">
|
69 |
+
<label>Redirect User To Page</label>
|
70 |
+
<frontend_type>select</frontend_type>
|
71 |
+
<source_model>b2bprofessional/system_config_source_page</source_model>
|
72 |
+
<sort_order>6</sort_order>
|
73 |
+
<show_in_default>1</show_in_default>
|
74 |
+
<show_in_website>1</show_in_website>
|
75 |
+
<show_in_store>1</show_in_store>
|
76 |
+
<comment><![CDATA[Select which page to redirect a user to.]]></comment>
|
77 |
+
</requireloginredirect>
|
78 |
+
</fields>
|
79 |
+
</generalsettings>
|
80 |
+
<languagesettings translate="label comment">
|
81 |
+
<label>Language settings</label>
|
82 |
+
<frontend_type>text</frontend_type>
|
83 |
+
<sort_order>2</sort_order>
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
<show_in_website>1</show_in_website>
|
86 |
+
<show_in_store>1</show_in_store>
|
87 |
+
<fields>
|
88 |
+
<languageoverride translate="label comment">
|
89 |
+
<label>Override language file</label>
|
90 |
+
<frontend_type>select</frontend_type>
|
91 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
92 |
+
<sort_order>3</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>1</show_in_store>
|
96 |
+
<comment><![CDATA[Override language file text with text specified below]]></comment>
|
97 |
+
</languageoverride>
|
98 |
+
<logintext translate="label comment">
|
99 |
+
<label>Custom text for price</label>
|
100 |
+
<frontend_type>textarea</frontend_type>
|
101 |
+
<sort_order>4</sort_order>
|
102 |
+
<show_in_default>1</show_in_default>
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
<show_in_store>1</show_in_store>
|
105 |
+
<comment><![CDATA[Text to be displayed instead of the prices.<br />Only visible when language override is active.<br />Otherwise text in language file ist used.<br />May contain HTML]]></comment>
|
106 |
+
</logintext>
|
107 |
+
<errortext translate="label comment">
|
108 |
+
<label>Custom text for checkout-error</label>
|
109 |
+
<frontend_type>textarea</frontend_type>
|
110 |
+
<sort_order>5</sort_order>
|
111 |
+
<show_in_default>1</show_in_default>
|
112 |
+
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>1</show_in_store>
|
114 |
+
<comment><![CDATA[Text to be displayed when customer is not allowed to checkout product.<br />Only visible when language override is active.<br />Otherwise text in language file is used.<br />May contain HTML]]></comment>
|
115 |
+
</errortext>
|
116 |
+
<requireloginmessage translate="label comment">
|
117 |
+
<label>Require User Login - Message</label>
|
118 |
+
<frontend_type>textarea</frontend_type>
|
119 |
+
<sort_order>6</sort_order>
|
120 |
+
<show_in_default>1</show_in_default>
|
121 |
+
<show_in_website>1</show_in_website>
|
122 |
+
<show_in_store>1</show_in_store>
|
123 |
+
<comment><![CDATA[Text to be displayed when the store requires a user to login to view pages<br />Only visible when language override is active.<br />Otherwise text in language file is used.<br />May contain HTML]]></comment>
|
124 |
+
</requireloginmessage>
|
125 |
+
</fields>
|
126 |
+
</languagesettings>
|
127 |
+
<activatebycategorysettings translate="label comment">
|
128 |
+
<label>Activate by category</label>
|
129 |
+
<frontend_type>text</frontend_type>
|
130 |
+
<sort_order>3</sort_order>
|
131 |
+
<show_in_default>1</show_in_default>
|
132 |
+
<show_in_website>1</show_in_website>
|
133 |
+
<show_in_store>1</show_in_store>
|
134 |
+
<fields>
|
135 |
+
<activebycategory translate="label comment">
|
136 |
+
<label>Activate by category</label>
|
137 |
+
<frontend_type>select</frontend_type>
|
138 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
139 |
+
<sort_order>5</sort_order>
|
140 |
+
<show_in_default>1</show_in_default>
|
141 |
+
<show_in_website>1</show_in_website>
|
142 |
+
<show_in_store>1</show_in_store>
|
143 |
+
<comment><![CDATA[Activate extension only for categories selected below]]></comment>
|
144 |
+
</activebycategory>
|
145 |
+
<activecategories translate="label comment">
|
146 |
+
<label>Active categories</label>
|
147 |
+
<frontend_type>multiselect</frontend_type>
|
148 |
+
<source_model>b2bprofessional/system_config_source_category</source_model>
|
149 |
+
<sort_order>6</sort_order>
|
150 |
+
<show_in_default>1</show_in_default>
|
151 |
+
<show_in_website>1</show_in_website>
|
152 |
+
<show_in_store>1</show_in_store>
|
153 |
+
<comment><![CDATA[Select categories for which the extension should be active.<br />Hold down Ctrl-key for multiple selection.<br />Be aware, that a product with multiple categories can not be checked out if one of its categories is selected here.]]></comment>
|
154 |
+
</activecategories>
|
155 |
+
</fields>
|
156 |
+
</activatebycategorysettings>
|
157 |
+
<activatebycustomersettings translate="label comment">
|
158 |
+
<label>Activate by customer group</label>
|
159 |
+
<frontend_type>text</frontend_type>
|
160 |
+
<sort_order>4</sort_order>
|
161 |
+
<show_in_default>1</show_in_default>
|
162 |
+
<show_in_website>1</show_in_website>
|
163 |
+
<show_in_store>1</show_in_store>
|
164 |
+
<comment><![CDATA[When activating this extension by customer group the guest user is also included.]]></comment>
|
165 |
+
<fields>
|
166 |
+
<activebycustomer translate="label comment">
|
167 |
+
<label>Activate by customer group</label>
|
168 |
+
<frontend_type>select</frontend_type>
|
169 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
170 |
+
<sort_order>5</sort_order>
|
171 |
+
<show_in_default>1</show_in_default>
|
172 |
+
<show_in_website>1</show_in_website>
|
173 |
+
<show_in_store>1</show_in_store>
|
174 |
+
<comment><![CDATA[Activate extension only for customer groups selected below]]></comment>
|
175 |
+
</activebycustomer>
|
176 |
+
<activecustomers translate="label comment">
|
177 |
+
<label>Active customer groups</label>
|
178 |
+
<frontend_type>multiselect</frontend_type>
|
179 |
+
<source_model>adminhtml/system_config_source_customer_group</source_model>
|
180 |
+
<sort_order>6</sort_order>
|
181 |
+
<show_in_default>1</show_in_default>
|
182 |
+
<show_in_website>1</show_in_website>
|
183 |
+
<show_in_store>1</show_in_store>
|
184 |
+
<comment><![CDATA[Select customer groups for which the extension should be active.<br />Hold down Ctrl-key for multiple selection.]]></comment>
|
185 |
+
</activecustomers>
|
186 |
+
</fields>
|
187 |
+
</activatebycustomersettings>
|
188 |
+
</groups>
|
189 |
+
</b2bprofessional>
|
190 |
+
</sections>
|
191 |
</config>
|
app/locale/de_DE/Sitewards_B2BProfessional.csv
CHANGED
@@ -1,23 +1,30 @@
|
|
1 |
-
"Your account is not allowed to access this store.","Ihr Benutzerkonto ist für diesen Shop nicht freigeschaltet."
|
2 |
-
"Please login","Bitte einloggen"
|
3 |
-
"General settings","Allgemeine Einstellungen"
|
4 |
-
"Enable B2B extension","B2B Extension aktivieren"
|
5 |
-
"Global customer activation","Globale Kundenaktivierung"
|
6 |
-
"Language settings","Spracheinstellungen"
|
7 |
-
"Override language file","Sprachdateien ignorieren"
|
8 |
-
"Custom text for price","Text für Preis"
|
9 |
-
"Custom text for checkout-error","Text für Checkout-Fehler"
|
10 |
-
"Activate by category","Für Kategorien aktivieren"
|
11 |
-
"Active categories","Aktive Kategorien"
|
12 |
-
"Activate by customer group","Für Kundengruppen aktivieren"
|
13 |
-
"Active customer groups","Aktive Kundengruppen"
|
14 |
-
"Enable or disable extension. Customer activation behaviour can be configured under <br />""Customer Configuration > Customer activation""","Aktivieren oder Deaktivieren der Extension. Verhalten bei der Kundenaktivierung kann konfiguriert werden unter<br />""Kundenkonfiguration > Kundenaktivierung"""
|
15 |
-
"Activate customers for all stores. Otherwise they will only see the prices in the store, they have registered for.","Kunden für alle Ladenansichten aktivieren. Anderenfalls werden sie nur in den Ladenansichten Preise sehen können, für die sie sich registriert haben."
|
16 |
-
"Override language file text with text specified below","Sprachdateien ignorieren und folgenden Text benutzen"
|
17 |
-
"Text to be displayed instead of the prices.<br />Only visible when language override is active.<br />Otherwise text in language file ist used.<br />May contain HTML","Text, der statt der Preise angezeigt wird.<br />Nur sichtbar, wenn ""Sprachdateien ignorieren"" aktiviert ist.<br />Anderenfalls werden die Sprachdateien benutzt.<br />Kann HTML enthalten"
|
18 |
-
"Text to be displayed when customer is not allowed to checkout product.<br />Only visible when language override is active.<br />Otherwise text in language file is used.<br />May contain HTML","Text, der angezeigt wird, wenn der Kunde nicht mit dem Produkt auschecken darf.<br />Nur sichtbar, wenn ""Sprachdateien ignorieren"" aktiviert ist.<br />Anderenfalls werden die Sprachdateien benutzt.<br />Kann HTML enthalten"
|
19 |
-
"Activate extension only for categories selected below","Extension nur für folgende Kategorien aktivieren"
|
20 |
-
"Select categories for which the extension should be active.<br />Hold down Ctrl-key for multiple selection.<br />Be aware, that a product with multiple categories can not be checked out if one of its categories is selected here.","Kategorien auswählen, für die die Extension aktiviert werden soll.<br />Für Mehrfachauswahl Strg-Taste halten.<br />Beachten Sie bitte, dass man nicht mit einem Produkt auschecken kann, wenn er mindestens einer dieser Kategorien zugeordnet ist."
|
21 |
-
"Activate extension only for customer groups selected below","Extension nur für Kunden aus folgenden Kundengruppen aktivieren."
|
22 |
-
"Select customer groups for which the extension should be active.<br />Hold down Ctrl-key for multiple selection.","Kundengruppen auswählen, für die die Extension aktiviert werden soll.<br />Für Mehrfachauswahl Strg-Taste halten."
|
23 |
-
"When activating this extension by customer group the guest user is also included.","Beim Aktivieren von Kundengruppen wird die Extension ebenfalls für Gast-Benutzer freigeschaltet"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Your account is not allowed to access this store.","Ihr Benutzerkonto ist für diesen Shop nicht freigeschaltet."
|
2 |
+
"Please login","Bitte einloggen"
|
3 |
+
"General settings","Allgemeine Einstellungen"
|
4 |
+
"Enable B2B extension","B2B Extension aktivieren"
|
5 |
+
"Global customer activation","Globale Kundenaktivierung"
|
6 |
+
"Language settings","Spracheinstellungen"
|
7 |
+
"Override language file","Sprachdateien ignorieren"
|
8 |
+
"Custom text for price","Text für Preis"
|
9 |
+
"Custom text for checkout-error","Text für Checkout-Fehler"
|
10 |
+
"Activate by category","Für Kategorien aktivieren"
|
11 |
+
"Active categories","Aktive Kategorien"
|
12 |
+
"Activate by customer group","Für Kundengruppen aktivieren"
|
13 |
+
"Active customer groups","Aktive Kundengruppen"
|
14 |
+
"Enable or disable extension. Customer activation behaviour can be configured under <br />""Customer Configuration > Customer activation""","Aktivieren oder Deaktivieren der Extension. Verhalten bei der Kundenaktivierung kann konfiguriert werden unter<br />""Kundenkonfiguration > Kundenaktivierung"""
|
15 |
+
"Activate customers for all stores. Otherwise they will only see the prices in the store, they have registered for.","Kunden für alle Ladenansichten aktivieren. Anderenfalls werden sie nur in den Ladenansichten Preise sehen können, für die sie sich registriert haben."
|
16 |
+
"Override language file text with text specified below","Sprachdateien ignorieren und folgenden Text benutzen"
|
17 |
+
"Text to be displayed instead of the prices.<br />Only visible when language override is active.<br />Otherwise text in language file ist used.<br />May contain HTML","Text, der statt der Preise angezeigt wird.<br />Nur sichtbar, wenn ""Sprachdateien ignorieren"" aktiviert ist.<br />Anderenfalls werden die Sprachdateien benutzt.<br />Kann HTML enthalten"
|
18 |
+
"Text to be displayed when customer is not allowed to checkout product.<br />Only visible when language override is active.<br />Otherwise text in language file is used.<br />May contain HTML","Text, der angezeigt wird, wenn der Kunde nicht mit dem Produkt auschecken darf.<br />Nur sichtbar, wenn ""Sprachdateien ignorieren"" aktiviert ist.<br />Anderenfalls werden die Sprachdateien benutzt.<br />Kann HTML enthalten"
|
19 |
+
"Activate extension only for categories selected below","Extension nur für folgende Kategorien aktivieren"
|
20 |
+
"Select categories for which the extension should be active.<br />Hold down Ctrl-key for multiple selection.<br />Be aware, that a product with multiple categories can not be checked out if one of its categories is selected here.","Kategorien auswählen, für die die Extension aktiviert werden soll.<br />Für Mehrfachauswahl Strg-Taste halten.<br />Beachten Sie bitte, dass man nicht mit einem Produkt auschecken kann, wenn er mindestens einer dieser Kategorien zugeordnet ist."
|
21 |
+
"Activate extension only for customer groups selected below","Extension nur für Kunden aus folgenden Kundengruppen aktivieren."
|
22 |
+
"Select customer groups for which the extension should be active.<br />Hold down Ctrl-key for multiple selection.","Kundengruppen auswählen, für die die Extension aktiviert werden soll.<br />Für Mehrfachauswahl Strg-Taste halten."
|
23 |
+
"When activating this extension by customer group the guest user is also included.","Beim Aktivieren von Kundengruppen wird die Extension ebenfalls für Gast-Benutzer freigeschaltet"
|
24 |
+
"You do not have access to view this store.","Sie haben keine Berechtigungen um diese Webshop-Seite zu betrachten."
|
25 |
+
"Require User Login","Nutzer muss sich einloggen"
|
26 |
+
"The user is required to login before they can view pages in this shop. <br /> Note: CMS pages are always allowed.","Der Nutzer muss sich einloggen bevor Seiten im Shop aufgerufen werden können. <br /> Hinweis: CMS-Seiten sind immer erlaubt."
|
27 |
+
"Require User Login - Message","Nutzer muss sich einloggen - Nachricht"
|
28 |
+
"Text to be displayed when the store requires a user to login to view pages<br />Only visible when language override is active.<br />Otherwise text in language file is used.<br />May contain HTML","Text der angezeigt wird, wenn der Nutzer sich einloggen muss, um eine bestimmte Seite im Shop zu betrachten.<br /> Wird nur verwendet, wenn die Sprache überschrieben wird.<br/>Ansonsten wird der Text aus der Sparchdatei benutzt.<br/> Dieser Text darf HTML beinhalten."
|
29 |
+
"Redirect User To Page","Nutzer auf Seite weiterleiten"
|
30 |
+
"Select which page to redirect a user to.","Wählen Sie die Seite, auf die der Nutzer weitergeleitet werden soll."
|
app/locale/en_US/Sitewards_B2BProfessional.csv
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
-
"Your account is not allowed to access this store.","Your account is not allowed to access this store."
|
2 |
-
"Please login","Please login"
|
|
1 |
+
"Your account is not allowed to access this store.","Your account is not allowed to access this store."
|
2 |
+
"Please login","Please login"
|
3 |
+
"You do not have access to view this store.","You do not have access to view this store."
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Sitewards_B2BProfessional</name>
|
4 |
-
<version>2.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
<channel>community</channel>
|
@@ -20,11 +20,13 @@ Features of the B2BProfessional Extension:
|
|
20 |
· Activation for specific product categories
|
21 |
· Activation for specific customer groups
|
22 |
· Optional require login to access store</description>
|
23 |
-
<notes>
|
|
|
|
|
24 |
<authors><author><name>Sitewards Magento Team</name><user>sitewards</user><email>magento@sitewards.com</email></author></authors>
|
25 |
-
<date>2013-03-
|
26 |
-
<time>
|
27 |
-
<contents><target name="magecommunity"><dir name="Sitewards"><dir name="B2BProfessional"><dir name="Block"><dir name="Bundle"><dir name="Catalog"><file name="Price.php" hash="29947f4d2db1edb62d31ab2bb26d5612"/><dir name="Product"><dir name="View"><dir name="Type"><dir name="Bundle"><dir name="Option"><file name="Checkbox.php" hash="97e3e7ce97a873c0bf438dcbb9d63538"/><file name="Multi.php" hash="aade197dae894c11df15ded6b90c5fa6"/><file name="Radio.php" hash="6bae85356183c20b8f7327018f4939fe"/><file name="Select.php" hash="b90a778084796edf552d6c87e888404f"/></dir></dir></dir></dir></dir></dir></dir><file name="Price.php" hash="
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Netzarbeiter_CustomerActivation</name><channel>community</channel><min>0.3.0</min><max>0.4.1</max></package></required></dependencies>
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Sitewards_B2BProfessional</name>
|
4 |
+
<version>2.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
<channel>community</channel>
|
20 |
· Activation for specific product categories
|
21 |
· Activation for specific customer groups
|
22 |
· Optional require login to access store</description>
|
23 |
+
<notes>Create an option that will stop users who are not logged in accessing pages.
|
24 |
+

|
25 |
+
Create an option that will redirect user to a specified CMS page or the customer login/register page when not logged in.</notes>
|
26 |
<authors><author><name>Sitewards Magento Team</name><user>sitewards</user><email>magento@sitewards.com</email></author></authors>
|
27 |
+
<date>2013-03-19</date>
|
28 |
+
<time>08:38:35</time>
|
29 |
+
<contents><target name="magecommunity"><dir name="Sitewards"><dir name="B2BProfessional"><dir name="Block"><dir name="Bundle"><dir name="Catalog"><file name="Price.php" hash="29947f4d2db1edb62d31ab2bb26d5612"/><dir name="Product"><dir name="View"><dir name="Type"><dir name="Bundle"><dir name="Option"><file name="Checkbox.php" hash="97e3e7ce97a873c0bf438dcbb9d63538"/><file name="Multi.php" hash="aade197dae894c11df15ded6b90c5fa6"/><file name="Radio.php" hash="6bae85356183c20b8f7327018f4939fe"/><file name="Select.php" hash="b90a778084796edf552d6c87e888404f"/></dir></dir></dir></dir></dir></dir></dir><file name="Price.php" hash="9014ce96fcaf47192692cde42c2e477c"/><dir name="Product"><dir name="View"><dir name="Options"><dir name="Type"><file name="Select.php" hash="01e9eb71f9c35a00fc39e375e2335301"/></dir></dir><dir name="Type"><file name="Configurable.php" hash="03aca82552c1cba03b1b243762bd95ad"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fb54bbbba61ef5e564bfcad9a03c6a67"/></dir><dir name="Model"><file name="Customer.php" hash="965cddbd586db90e693e7cef0bfba762"/><file name="Observer.php" hash="f821f35c2b96a327ffc532879e49434d"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Category.php" hash="115526ef80ee1f799e0c68f81a45fc9f"/><file name="Page.php" hash="042ef4e679e8e8c7b6a2c696119712b3"/></dir></dir></dir></dir><dir name="controllers"><file name="CartController.php" hash="6dfb9530a9361dd2636ce5229369de3c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4532de80b3439c3047ea70776b8420a5"/><file name="config.xml" hash="651acb76508eff0bf7b61127f5cd12c0"/><file name="system.xml" hash="61633ee9a60e9dd3158df36616804e5f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sitewards_B2BProfessional.xml" hash="3eb7e7a0f796d39faf60cf3f30c40ff2"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Sitewards_B2BProfessional.csv" hash="26108c182a96d9f4eb1df05f379105f7"/></dir><dir name="en_US"><file name="Sitewards_B2BProfessional.csv" hash="5b6a370b2c2790ff1cb3954b8180ff81"/></dir></target></contents>
|
30 |
<compatible/>
|
31 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Netzarbeiter_CustomerActivation</name><channel>community</channel><min>0.3.0</min><max>0.4.1</max></package></required></dependencies>
|
32 |
</package>
|