Version Notes
Versions:
I've tested the modul with the versions 1.4. Older versions maybe run correct but without guarantee.
Versionen:
Ich konnte das Modul mit der Version 1.4 testen. Andere Versionen sind möglich, aber nicht garantiert.
Download this release
Release Info
Developer | Magento Core Team |
Extension | QR_Mage |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/local/Eisbehr/QrMage/Block/Qrcode.php +39 -0
- app/code/local/Eisbehr/QrMage/Helper/Config.php +74 -0
- app/code/local/Eisbehr/QrMage/Helper/Data.php +108 -0
- app/code/local/Eisbehr/QrMage/Model/Encoding.php +12 -0
- app/code/local/Eisbehr/QrMage/Model/Level.php +13 -0
- app/code/local/Eisbehr/QrMage/Model/Qr.php +30 -0
- app/code/local/Eisbehr/QrMage/controllers/IndexController.php +27 -0
- app/code/local/Eisbehr/QrMage/etc/config.xml +74 -0
- app/code/local/Eisbehr/QrMage/etc/system.xml +89 -0
- app/design/frontend/base/default/layout/qrmage.xml +11 -0
- app/design/frontend/base/default/template/qrmage/qrcode.phtml +1 -0
- app/design/frontend/base/default/template/qrmage/qrcodebox.phtml +10 -0
- app/etc/modules/Eisbehr_QrMage.xml +9 -0
- package.xml +82 -0
app/code/local/Eisbehr/QrMage/Block/Qrcode.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Frontend_Base_Default_Template_QrMage_Qrcode
|
4 |
+
*/
|
5 |
+
|
6 |
+
class Eisbehr_QrMage_Block_Qrcode extends Mage_Core_Block_Template
|
7 |
+
{
|
8 |
+
public $_helper;
|
9 |
+
|
10 |
+
protected function _construct()
|
11 |
+
{
|
12 |
+
$this->_helper = Mage::helper('qrmage/config');
|
13 |
+
return $this;
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function getImageHtml()
|
17 |
+
{
|
18 |
+
$config = Mage::helper('qrmage/config');
|
19 |
+
|
20 |
+
$url = Mage::helper('core/url')->getCurrentUrl();
|
21 |
+
$size = $config->getSize();
|
22 |
+
$level = $config->getLevel();
|
23 |
+
$margin = $config->getMargin();
|
24 |
+
$encoding = $config->getEncoding();
|
25 |
+
$label = $config->getLabel();
|
26 |
+
|
27 |
+
$helper = Mage::helper('qrmage');
|
28 |
+
$html = $helper->setUrl($url)
|
29 |
+
->setSize($size)
|
30 |
+
->setLevel($level)
|
31 |
+
->setMargin($margin)
|
32 |
+
->setEncoding($encoding)
|
33 |
+
->setLabel($label)
|
34 |
+
->getQrImageHtml();
|
35 |
+
|
36 |
+
echo $html;
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
}
|
app/code/local/Eisbehr/QrMage/Helper/Config.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Eisbehr_QrMage_Helper_Config extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
private $config;
|
5 |
+
|
6 |
+
public function load()
|
7 |
+
{
|
8 |
+
$this->config["main"]["level"] = array('L', 'M', 'Q', 'H');
|
9 |
+
$this->config["main"]["encoding"] = array('UTF-8', 'Shift_JIS', 'ISO-8859-1');
|
10 |
+
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function getLevelConfig()
|
15 |
+
{
|
16 |
+
return $this->config["main"]["level"];
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getEncodingConfig()
|
20 |
+
{
|
21 |
+
return $this->config["main"]["encoding"];
|
22 |
+
}
|
23 |
+
|
24 |
+
/* adminhtml */
|
25 |
+
|
26 |
+
public function configValue($path, $name)
|
27 |
+
{
|
28 |
+
$basePath = 'qrmage/';
|
29 |
+
$basePath .= $path;
|
30 |
+
|
31 |
+
if( substr($basePath, 0, -1) != '/' )
|
32 |
+
{
|
33 |
+
$basePath .= '/';
|
34 |
+
}
|
35 |
+
|
36 |
+
return Mage::getStoreConfig( $basePath . $name );
|
37 |
+
}
|
38 |
+
|
39 |
+
public function getActive()
|
40 |
+
{
|
41 |
+
$value = $this->configValue('qrmage', 'active');
|
42 |
+
return ( $value ) ? true : false ;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getSize()
|
46 |
+
{
|
47 |
+
$value = $this->configValue('qrmage', 'size');
|
48 |
+
return $value;
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getLevel()
|
52 |
+
{
|
53 |
+
$value = $this->configValue('qrmage', 'level');
|
54 |
+
return $value;
|
55 |
+
}
|
56 |
+
|
57 |
+
public function getMargin()
|
58 |
+
{
|
59 |
+
$value = $this->configValue('qrmage', 'margin');
|
60 |
+
return $value;
|
61 |
+
}
|
62 |
+
|
63 |
+
public function getEncoding()
|
64 |
+
{
|
65 |
+
$value = $this->configValue('qrmage', 'encoding');
|
66 |
+
return $value;
|
67 |
+
}
|
68 |
+
|
69 |
+
public function getLabel()
|
70 |
+
{
|
71 |
+
$value = $this->configValue('qrmage', 'label');
|
72 |
+
return $value;
|
73 |
+
}
|
74 |
+
}
|
app/code/local/Eisbehr/QrMage/Helper/Data.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Information:
|
3 |
+
// http://code.google.com/apis/chart/
|
4 |
+
|
5 |
+
class Eisbehr_QrMage_Helper_Data extends Mage_Core_Helper_Abstract
|
6 |
+
{
|
7 |
+
/* vars */
|
8 |
+
private $_url = NULL;
|
9 |
+
private $_size = 150;
|
10 |
+
private $_level = "L";
|
11 |
+
private $_margin = 4;
|
12 |
+
private $_encoding = "UTF-8";
|
13 |
+
private $_label = "QR Code";
|
14 |
+
|
15 |
+
/* setter */
|
16 |
+
|
17 |
+
public function setUrl($url)
|
18 |
+
{
|
19 |
+
$this->_url = urlencode($url);
|
20 |
+
return $this;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function setSize($size)
|
24 |
+
{
|
25 |
+
if( is_numeric($size) && $size <= 500 )
|
26 |
+
{
|
27 |
+
$this->_size = $size;
|
28 |
+
}
|
29 |
+
|
30 |
+
return $this;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function setLevel($level)
|
34 |
+
{
|
35 |
+
$config = Mage::helper('qrmage/config')->load();
|
36 |
+
$config = $config->getLevelConfig();
|
37 |
+
|
38 |
+
if( in_array($level, $config) )
|
39 |
+
{
|
40 |
+
$this->_level = $level;
|
41 |
+
}
|
42 |
+
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
|
46 |
+
public function setMargin($margin)
|
47 |
+
{
|
48 |
+
if( is_numeric($margin) )
|
49 |
+
{
|
50 |
+
$this->_margin = $margin;
|
51 |
+
}
|
52 |
+
|
53 |
+
return $this;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function setEncoding($encoding)
|
57 |
+
{
|
58 |
+
$config = Mage::helper('qrmage/config')->load();
|
59 |
+
$config = $config->getEncodingConfig();
|
60 |
+
|
61 |
+
if( in_array($encoding, $config) )
|
62 |
+
{
|
63 |
+
$this->_encoding = $encoding;
|
64 |
+
}
|
65 |
+
|
66 |
+
return $this;
|
67 |
+
}
|
68 |
+
|
69 |
+
public function setLabel($label)
|
70 |
+
{
|
71 |
+
$this->_label = $label;
|
72 |
+
return $this;
|
73 |
+
}
|
74 |
+
|
75 |
+
/* getter */
|
76 |
+
|
77 |
+
public function getQrImageHtml($url = NULL)
|
78 |
+
{
|
79 |
+
if( $url != NULL )
|
80 |
+
{
|
81 |
+
$this->setUrl($url);
|
82 |
+
}
|
83 |
+
|
84 |
+
$model = Mage::getModel('qrmage/qr');
|
85 |
+
$src = $model->getQrImageSrc($this->_url,
|
86 |
+
$this->_size,
|
87 |
+
$this->_level,
|
88 |
+
$this->_margin,
|
89 |
+
$this->_encoding);
|
90 |
+
|
91 |
+
$html = NULL;
|
92 |
+
|
93 |
+
$html .= "<img src=\"";
|
94 |
+
$html .= $src;
|
95 |
+
$html .= "\"";
|
96 |
+
|
97 |
+
if( !empty($this->_label) )
|
98 |
+
{
|
99 |
+
$html .= " alt=\"" . $this->_label . "\"";
|
100 |
+
$html .= " title=\"" . $this->_label . "\"";
|
101 |
+
}
|
102 |
+
|
103 |
+
$html .= " width=\"" . $this->_size . "\"";
|
104 |
+
$html .= " height=\"" . $this->_size . "\"/>";
|
105 |
+
|
106 |
+
return $html;
|
107 |
+
}
|
108 |
+
}
|
app/code/local/Eisbehr/QrMage/Model/Encoding.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?PHP
|
2 |
+
class Eisbehr_QrMage_Model_Encoding
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
array('value' => 'UTF-8', 'label' => 'UTF-8 (default)'),
|
8 |
+
array('value' => 'Shift_JIS', 'label' => 'Shift_JIS'),
|
9 |
+
array('value' => 'ISO-8859-1', 'label' => 'ISO-8859-1'),
|
10 |
+
);
|
11 |
+
}
|
12 |
+
}
|
app/code/local/Eisbehr/QrMage/Model/Level.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?PHP
|
2 |
+
class Eisbehr_QrMage_Model_Level
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
array('value' => 'L', 'label' => 'L (default)'),
|
8 |
+
array('value' => 'M', 'label' => 'M'),
|
9 |
+
array('value' => 'Q', 'label' => 'Q'),
|
10 |
+
array('value' => 'H', 'label' => 'H'),
|
11 |
+
);
|
12 |
+
}
|
13 |
+
}
|
app/code/local/Eisbehr/QrMage/Model/Qr.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?PHP
|
2 |
+
class Eisbehr_QrMage_Model_Qr extends Varien_Object
|
3 |
+
{
|
4 |
+
private $baseurl = "http://chart.apis.google.com/chart";
|
5 |
+
|
6 |
+
function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
}
|
10 |
+
|
11 |
+
public function setBaseUrl($url)
|
12 |
+
{
|
13 |
+
$this->baseurl = $url;
|
14 |
+
return $this;
|
15 |
+
}
|
16 |
+
|
17 |
+
public function getQrImageSrc($url, $size, $level, $margin, $encoding)
|
18 |
+
{
|
19 |
+
$src = NULL;
|
20 |
+
|
21 |
+
$src .= $this->baseurl;
|
22 |
+
$src .= "?chs=" . $size . "x" . $size;
|
23 |
+
$src .= "&cht=qr";
|
24 |
+
$src .= "&chld=" . $level . "|" . $margin;
|
25 |
+
$src .= "&choe=" . $encoding;
|
26 |
+
$src .= "&chl=" . $url;
|
27 |
+
|
28 |
+
return $src;
|
29 |
+
}
|
30 |
+
}
|
app/code/local/Eisbehr/QrMage/controllers/IndexController.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?PHP
|
2 |
+
class Eisbehr_QrMage_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$config = Mage::helper('qrmage/config');
|
7 |
+
|
8 |
+
$url = Mage::helper('core/url')->getCurrentUrl();
|
9 |
+
$size = $config->getSize();
|
10 |
+
$level = $config->getLevel();
|
11 |
+
$margin = $config->getMargin();
|
12 |
+
$encoding = $config->getEncoding();
|
13 |
+
$label = $config->getLabel();
|
14 |
+
|
15 |
+
$helper = Mage::helper('qrmage');
|
16 |
+
$html = $helper->setUrl($url)
|
17 |
+
->setSize($size)
|
18 |
+
->setLevel($level)
|
19 |
+
->setMargin($margin)
|
20 |
+
->setEncoding($encoding)
|
21 |
+
->setLabel($label)
|
22 |
+
->getQrImageHtml();
|
23 |
+
|
24 |
+
echo $html;
|
25 |
+
return;
|
26 |
+
}
|
27 |
+
}
|
app/code/local/Eisbehr/QrMage/etc/config.xml
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Eisbehr_QrMage>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Eisbehr_QrMage>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<models>
|
10 |
+
<qrmage>
|
11 |
+
<class>Eisbehr_QrMage_Model</class>
|
12 |
+
</qrmage>
|
13 |
+
</models>
|
14 |
+
<blocks>
|
15 |
+
<qrmage>
|
16 |
+
<class>Eisbehr_QrMage_Block</class>
|
17 |
+
</qrmage>
|
18 |
+
</blocks>
|
19 |
+
<helpers>
|
20 |
+
<qrmage>
|
21 |
+
<class>Eisbehr_QrMage_Helper</class>
|
22 |
+
</qrmage>
|
23 |
+
</helpers>
|
24 |
+
</global>
|
25 |
+
<frontend>
|
26 |
+
<routers>
|
27 |
+
<qrmage>
|
28 |
+
<use>standard</use>
|
29 |
+
<args>
|
30 |
+
<module>Eisbehr_QrMage</module>
|
31 |
+
<frontName>qrmage</frontName>
|
32 |
+
</args>
|
33 |
+
</qrmage>
|
34 |
+
</routers>
|
35 |
+
<layout>
|
36 |
+
<updates>
|
37 |
+
<qrmage>
|
38 |
+
<file>qrmage.xml</file>
|
39 |
+
</qrmage>
|
40 |
+
</updates>
|
41 |
+
</layout>
|
42 |
+
<translate>
|
43 |
+
<modules>
|
44 |
+
<Eisbehr_QrMage>
|
45 |
+
<files>
|
46 |
+
<default>Eisbehr_QrMage.csv</default>
|
47 |
+
</files>
|
48 |
+
</Eisbehr_QrMage>
|
49 |
+
</modules>
|
50 |
+
</translate>
|
51 |
+
</frontend>
|
52 |
+
<adminhtml>
|
53 |
+
<acl>
|
54 |
+
<resources>
|
55 |
+
<admin>
|
56 |
+
<children>
|
57 |
+
<system>
|
58 |
+
<children>
|
59 |
+
<config>
|
60 |
+
<children>
|
61 |
+
<qrmage translate="title" module="qrmage">
|
62 |
+
<title>Eisbehr QrMage</title>
|
63 |
+
<sort_order>100</sort_order>
|
64 |
+
</qrmage>
|
65 |
+
</children>
|
66 |
+
</config>
|
67 |
+
</children>
|
68 |
+
</system>
|
69 |
+
</children>
|
70 |
+
</admin>
|
71 |
+
</resources>
|
72 |
+
</acl>
|
73 |
+
</adminhtml>
|
74 |
+
</config>
|
app/code/local/Eisbehr/QrMage/etc/system.xml
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<qrmage translate="label comment" module="qrmage">
|
5 |
+
<tab>general</tab>
|
6 |
+
<label>QR Codes</label>
|
7 |
+
<frontend_type>text</frontend_type>
|
8 |
+
<sort_order>100</sort_order>
|
9 |
+
<show_in_default>1</show_in_default>
|
10 |
+
<show_in_website>1</show_in_website>
|
11 |
+
<show_in_store>1</show_in_store>
|
12 |
+
<groups>
|
13 |
+
<qrmage translate="label comment" module="qrmage">
|
14 |
+
<label>General</label>
|
15 |
+
<frontend_type>text</frontend_type>
|
16 |
+
<sort_order>0</sort_order>
|
17 |
+
<show_in_default>1</show_in_default>
|
18 |
+
<show_in_website>1</show_in_website>
|
19 |
+
<show_in_store>1</show_in_store>
|
20 |
+
<fields>
|
21 |
+
<active translate="label">
|
22 |
+
<label>Active:</label>
|
23 |
+
<frontend_type>select</frontend_type>
|
24 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
25 |
+
<sort_order>0</sort_order>
|
26 |
+
<default_value>1</default_value>
|
27 |
+
<show_in_default>1</show_in_default>
|
28 |
+
<show_in_website>1</show_in_website>
|
29 |
+
<show_in_store>1</show_in_store>
|
30 |
+
<comment>activate the view on frontend, default: yes</comment>
|
31 |
+
</active>
|
32 |
+
<size translate="label">
|
33 |
+
<label>Size:</label>
|
34 |
+
<frontend_type>text</frontend_type>
|
35 |
+
<sort_order>5</sort_order>
|
36 |
+
<default_value>150</default_value>
|
37 |
+
<show_in_default>1</show_in_default>
|
38 |
+
<show_in_website>1</show_in_website>
|
39 |
+
<show_in_store>1</show_in_store>
|
40 |
+
<comment>width and height in pixels, default: 150, max: 500</comment>
|
41 |
+
</size>
|
42 |
+
<level translate="label">
|
43 |
+
<label>Level:</label>
|
44 |
+
<frontend_type>select</frontend_type>
|
45 |
+
<source_model>qrmage/level</source_model>
|
46 |
+
<sort_order>10</sort_order>
|
47 |
+
<default_value>L</default_value>
|
48 |
+
<show_in_default>1</show_in_default>
|
49 |
+
<show_in_website>1</show_in_website>
|
50 |
+
<show_in_store>1</show_in_store>
|
51 |
+
<comment>error loss level, default: L</comment>
|
52 |
+
</level>
|
53 |
+
<margin translate="label">
|
54 |
+
<label>Margin:</label>
|
55 |
+
<frontend_type>text</frontend_type>
|
56 |
+
<sort_order>15</sort_order>
|
57 |
+
<default_value>2</default_value>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>1</show_in_store>
|
61 |
+
<comment>in rows, not pixels, default: 2</comment>
|
62 |
+
</margin>
|
63 |
+
<encoding translate="label">
|
64 |
+
<label>Encoding:</label>
|
65 |
+
<frontend_type>select</frontend_type>
|
66 |
+
<source_model>qrmage/encoding</source_model>
|
67 |
+
<sort_order>20</sort_order>
|
68 |
+
<default_value>UTF-8</default_value>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
<comment>encoding for url data, default: UTF-8</comment>
|
73 |
+
</encoding>
|
74 |
+
<label translate="label">
|
75 |
+
<label>Label:</label>
|
76 |
+
<frontend_type>text</frontend_type>
|
77 |
+
<sort_order>25</sort_order>
|
78 |
+
<default_value>QR Code</default_value>
|
79 |
+
<show_in_default>1</show_in_default>
|
80 |
+
<show_in_website>1</show_in_website>
|
81 |
+
<show_in_store>1</show_in_store>
|
82 |
+
<comment>image label, default: QR Code</comment>
|
83 |
+
</label>
|
84 |
+
</fields>
|
85 |
+
</qrmage>
|
86 |
+
</groups>
|
87 |
+
</qrmage>
|
88 |
+
</sections>
|
89 |
+
</config>
|
app/design/frontend/base/default/layout/qrmage.xml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<catalog_product_view>
|
4 |
+
<reference name="left">
|
5 |
+
<block type="qrmage/qrcode" name="qrmage.qrcodebox.left" after="cart_sidebar" template="qrmage/qrcodebox.phtml" />
|
6 |
+
</reference>
|
7 |
+
<reference name="right">
|
8 |
+
<block type="qrmage/qrcode" name="qrmage.qrcodebox.right" after="cart_sidebar" template="qrmage/qrcodebox.phtml" />
|
9 |
+
</reference>
|
10 |
+
</catalog_product_view>
|
11 |
+
</layout>
|
app/design/frontend/base/default/template/qrmage/qrcode.phtml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php echo $this->getImageHtml(); ?>
|
app/design/frontend/base/default/template/qrmage/qrcodebox.phtml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if( $this->_helper->getActive() ): ?>
|
2 |
+
<div class="block block-qrcode">
|
3 |
+
<div class="block-title">
|
4 |
+
<strong><span><?php echo $this->__('Product') ?> <?php echo $this->__('QR Code') ?></span></strong>
|
5 |
+
</div>
|
6 |
+
<div class="block-content" style="padding: 0; text-align: center;">
|
7 |
+
<?php echo $this->getImageHtml(); ?>
|
8 |
+
</div>
|
9 |
+
</div>
|
10 |
+
<?php endif; ?>
|
app/etc/modules/Eisbehr_QrMage.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Eisbehr_QrMage>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Eisbehr_QrMage>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>QR_Mage</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.gnu.org/licenses/gpl-3.0.html">GPL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Adds QR codes to product pages. Can even shown on every other pages. Different configuration options.</summary>
|
10 |
+
<description>English
|
11 |
+
|
12 |
+
Feature List:
|
13 |
+
- QR Codes for every Shop-Page
|
14 |
+
- many configuration options
|
15 |
+
- no other plugins needed
|
16 |
+
- can shown on every single shop page
|
17 |
+
- two templated included
|
18 |
+
|
19 |
+
Installation:
|
20 |
+
After installation you have access to a box at your magento store that show the qr code for the page you currently on. You can customize the block at your own. Please take care of following steps:
|
21 |
+
|
22 |
+
1.) After correct modul installation re-login to magento admin panel. Now you have access to configure all options.
|
23 |
+
|
24 |
+
2.) Activate the modul in the configuration and fill out all field with the values you wish.
|
25 |
+
|
26 |
+
3.) After this the qr codes have to shown up on all product pages in your store in the left and/or right sidebar.
|
27 |
+
|
28 |
+
4.) If you want to use the qr codes more times and/or in different styles and sizes you can create your own template or use the qr code without a box. In the template folder are two different created templates for this. You can just use this or create own templates. The display options is controlled by the playout file 'qrmage.xml'.
|
29 |
+
|
30 |
+
Versions:
|
31 |
+
I've tested the modul with the version 1.4.
|
32 |
+
Older versions maybe run correct but without guarantee.
|
33 |
+
|
34 |
+
Other Problems?
|
35 |
+
You can send me a message with your problem. ;)
|
36 |
+
|
37 |
+
Changelog:
|
38 |
+
- 0.1.0: First Release
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
German
|
43 |
+
|
44 |
+
Feature List:
|
45 |
+
- QR Codes für jede Shop-Seite
|
46 |
+
- Viele Einstellungen
|
47 |
+
- Keine anderen PlugIns nötig
|
48 |
+
- Kann überall eingebunden werden
|
49 |
+
- Zwei vorbereitete Templates
|
50 |
+
|
51 |
+
Installation:
|
52 |
+
Nach der Installation steht Ihnen ein Block zur Verfügung, in dem sich der QR Code für die Seite befindet, auf der Sie sich gerade aufhalten. Ebenfalls kann der QR Code auf jeder Seite eingebunden werden. Um die Box an Ihre Bedürfnisse anzupassen, beachten Sie folgende Schritte:
|
53 |
+
|
54 |
+
1.) Nachdem das Modul installiert wurde, loggen Sie sich aus dem Admin-Bereich aus und erneut wieder an. Konfigurieren Sie im Anschluss alle Optionen im Konfigurations-Bereich.
|
55 |
+
|
56 |
+
2.) Aktivieren Sie die QR Codes in den Einstellungen. Füllen Sie alle Konfigurations-Felder entsprechend Ihren Wünschen aus.
|
57 |
+
|
58 |
+
3.) Der QR Code sollte nun standardmäßig auf den Produktseiten Ihres Shops zu sehen sein.
|
59 |
+
|
60 |
+
4.) Sollten Sie dir Box öfters verwenden wollen, in verschiedenen Größen und Formen, so können Sie jeder Zeit ein eigenes Box-Template erstellen oder die Grafik als Block ohne Box verwenden. Zwei Vorlagen liegen im Template-Ordner des Moduls. Die Anzeige wird über die Layout-Datei 'qrmage.xml' gesteuert.
|
61 |
+
|
62 |
+
Versionen:
|
63 |
+
Ich konnte das Modul mit der Version 1.4 testen.
|
64 |
+
Andere Versionen sind möglich, aber nicht garantiert.
|
65 |
+
|
66 |
+
Andere Probleme?
|
67 |
+
Sie können mir eine Nachricht mit Ihren Problemen schreiben. ;)
|
68 |
+
|
69 |
+
Änderungen:
|
70 |
+
- 0.1.0: Erster Release</description>
|
71 |
+
<notes>Versions:
|
72 |
+
I've tested the modul with the versions 1.4. Older versions maybe run correct but without guarantee.
|
73 |
+
|
74 |
+
Versionen:
|
75 |
+
Ich konnte das Modul mit der Version 1.4 testen. Andere Versionen sind möglich, aber nicht garantiert.</notes>
|
76 |
+
<authors><author><name>Daniel Kern</name><user>auto-converted</user><email>work@eisbehr.de</email></author></authors>
|
77 |
+
<date>2010-12-02</date>
|
78 |
+
<time>10:50:22</time>
|
79 |
+
<contents><target name="magelocal"><dir name="Eisbehr"><dir name="QrMage"><dir name="Block"><file name="Qrcode.php" hash="eb7df1cea5ecf3d0e38aa8a1899780d7"/></dir><dir name="controllers"><file name="IndexController.php" hash="0b841193bad0a68e7e758c9f1a5b69ab"/></dir><dir name="etc"><file name="config.xml" hash="ffdfdce1b19cfc3cb962a874170ea5c2"/><file name="system.xml" hash="63eeca5c1a7c1dd7f59f569904cd9977"/></dir><dir name="Helper"><file name="Config.php" hash="e32cb932deb3b53444ae6f3d123dc8af"/><file name="Data.php" hash="a6f2818812473c3bbf93ae36776da1a4"/></dir><dir name="Model"><file name="Encoding.php" hash="6668407fc9bd4c6068103ba3db76909b"/><file name="Level.php" hash="63b1b9a6d646a841973ef60dbc4a6c97"/><file name="Qr.php" hash="03d53db96abdaf5f3b242295bfdd1e8a"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="qrmage.xml" hash="34ae9558e44fcd764d30f88e56baaddc"/></dir><dir name="template"><dir name="qrmage"><file name="qrcode.phtml" hash="213fe4b9609e53c53b333fbf2c720598"/><file name="qrcodebox.phtml" hash="9a9c2d423b0c3c5c8cd0faad07a4e6a4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eisbehr_QrMage.xml" hash="953f6292d1d58ed4864347afc54d39b8"/></dir></target></contents>
|
80 |
+
<compatible/>
|
81 |
+
<dependencies/>
|
82 |
+
</package>
|