Version Notes
Extends Mage_Catalog_Model_Category, Mage_Catalog_Model_Product, Mage_Checkout_Model_Agreement.
Download this release
Release Info
Developer | Magento Core Team |
Extension | xonu_sbe |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
app/code/community/xonu/sbe/Model/Agreement.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mage
|
16 |
+
* @package sbe_Model
|
17 |
+
* @author Pawel Kazakow <support@xonu.de>
|
18 |
+
* @copyright Copyright (c) 2012 Pawel Kazakow (www.xonu.de)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
class xonu_sbe_Model_Agreement extends Mage_Checkout_Model_Agreement
|
22 |
+
{
|
23 |
+
/**
|
24 |
+
* Add parsing filter to agreement box content.
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
public function getContent()
|
29 |
+
{
|
30 |
+
$content = $this->getData('content');
|
31 |
+
$templateFilter = Mage::getModel('cms/template_filter');
|
32 |
+
$html = $templateFilter->filter($content);
|
33 |
+
|
34 |
+
return $html;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Add parsing filter to agreement checkbox text.
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
public function getCheckboxText()
|
43 |
+
{
|
44 |
+
$content = $this->getData('checkbox_text');
|
45 |
+
$templateFilter = Mage::getModel('cms/template_filter');
|
46 |
+
$html = $templateFilter->filter($content);
|
47 |
+
|
48 |
+
return $html;
|
49 |
+
}
|
50 |
+
}
|
app/code/community/xonu/sbe/Model/Category.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mage
|
16 |
+
* @package sbe_Model
|
17 |
+
* @author Pawel Kazakow <support@xonu.de>
|
18 |
+
* @copyright Copyright (c) 2012 Pawel Kazakow (www.xonu.de)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
class xonu_sbe_Model_Category extends Mage_Catalog_Model_Category
|
22 |
+
{
|
23 |
+
function getDescription()
|
24 |
+
{
|
25 |
+
$content = $this->getData('description');
|
26 |
+
$templateFilter = Mage::getModel('cms/template_filter');
|
27 |
+
$html = $templateFilter->filter($content);
|
28 |
+
return $html;
|
29 |
+
}
|
30 |
+
}
|
app/code/community/xonu/sbe/Model/Product.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mage
|
16 |
+
* @package sbe_Model
|
17 |
+
* @author Pawel Kazakow <support@xonu.de>
|
18 |
+
* @copyright Copyright (c) 2012 Pawel Kazakow (www.xonu.de)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
class xonu_sbe_Model_Product extends Mage_Catalog_Model_Product
|
22 |
+
{
|
23 |
+
function getDescription()
|
24 |
+
{
|
25 |
+
$content = $this->getData('description');
|
26 |
+
$templateFilter = Mage::getModel('cms/template_filter');
|
27 |
+
$html = $templateFilter->filter($content);
|
28 |
+
return $html;
|
29 |
+
}
|
30 |
+
|
31 |
+
function getShortDescription()
|
32 |
+
{
|
33 |
+
$content = $this->getData('short_description');
|
34 |
+
$templateFilter = Mage::getModel('cms/template_filter');
|
35 |
+
$html = $templateFilter->filter($content);
|
36 |
+
return $html;
|
37 |
+
}
|
38 |
+
}
|
app/code/community/xonu/sbe/etc/config.xml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Mage
|
17 |
+
* @package sbe_Model
|
18 |
+
* @author Pawel Kazakow <support@xonu.de>
|
19 |
+
* @copyright Copyright (c) 2012 Pawel Kazakow (www.xonu.de)
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<config>
|
24 |
+
<modules>
|
25 |
+
<xonu_sbe>
|
26 |
+
<version>1.0.0</version>
|
27 |
+
</xonu_sbe>
|
28 |
+
</modules>
|
29 |
+
<global>
|
30 |
+
<models>
|
31 |
+
<checkout>
|
32 |
+
<rewrite>
|
33 |
+
<agreement>xonu_sbe_Model_Agreement</agreement>
|
34 |
+
</rewrite>
|
35 |
+
</checkout>
|
36 |
+
<catalog>
|
37 |
+
<rewrite>
|
38 |
+
<category>xonu_sbe_Model_Category</category>
|
39 |
+
<product>xonu_sbe_Model_Product</product>
|
40 |
+
</rewrite>
|
41 |
+
</catalog>
|
42 |
+
</models>
|
43 |
+
</global>
|
44 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>xonu_sbe</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Allows using static blocks in terms and agreements, category description and product description.</summary>
|
10 |
+
<description>In Magento, you can define reusable content blocks in CMS > Static Blocks, which you can insert in CMS pages and other static blocks using the following code:
|
11 |
+

|
12 |
+
{{block type="cms/block" block_id="myblock"}}
|
13 |
+

|
14 |
+
This extension allows you to use the static blocks in Sales > Terms and conditions, in category description and product short and full description, which is not possible by default.</description>
|
15 |
+
<notes>Extends Mage_Catalog_Model_Category, Mage_Catalog_Model_Product, Mage_Checkout_Model_Agreement.</notes>
|
16 |
+
<authors><author><name>Pawel Kazakow</name><user>auto-converted</user><email>support@xonu.de</email></author></authors>
|
17 |
+
<date>2012-07-11</date>
|
18 |
+
<time>16:07:20</time>
|
19 |
+
<contents><target name="magecommunity"><dir name="xonu"><dir name="sbe"><dir name="Model"><file name="Agreement.php" hash="0fba772982236868e0b9de24e6006fa4"/><file name="Category.php" hash="b36948ee0f7d5a93914131ac88e192b4"/><file name="Product.php" hash="74f3897f094a2625b347162de57f9a81"/></dir><dir name="etc"><file name="config.xml" hash="39e497bda0b40a2a8be0bbe276d818b1"/></dir></dir></dir><dir name="modules"><file name="xonu_sbe.xml" hash=""/></dir></target></contents>
|
20 |
+
<compatible/>
|
21 |
+
<dependencies/>
|
22 |
+
</package>
|