Version Notes
Magmodules_Sooqr
Download this release
Release Info
Developer | Magento Core Team |
Extension | Magmodules_Sooqr |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/Config/Form/Field/Extra.php +48 -0
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/Config/Form/Renderer/Select.php +161 -0
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Feeds.php +44 -0
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Heading.php +28 -0
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Note.php +28 -0
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Version.php +27 -0
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/Widget/Info/Info.php +76 -0
- app/code/community/Magmodules/Sooqr/Block/Search.php +73 -0
- app/code/community/Magmodules/Sooqr/Helper/Data.php +688 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Backend/Sooqr/Cron.php +68 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Attribute.php +71 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Cacheresize.php +45 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Category.php +62 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Categorytype.php +28 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Condition.php +29 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Configurable.php +33 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Frequency.php +36 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Identifier.php +29 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Images.php +34 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Pricemodel.php +30 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Productid.php +74 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Producttype.php +29 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Resize.php +29 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Selectattribute.php +51 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Status.php +28 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Textattribute.php +71 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Varcharattribute.php +71 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Version.php +28 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Visibility.php +30 -0
- app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Weight.php +30 -0
- app/code/community/Magmodules/Sooqr/Model/Common.php +98 -0
- app/code/community/Magmodules/Sooqr/Model/Observer.php +45 -0
- app/code/community/Magmodules/Sooqr/Model/Sooqr.php +369 -0
- app/code/community/Magmodules/Sooqr/Model/Source/Action.php +28 -0
- app/code/community/Magmodules/Sooqr/Model/Source/Attribute.php +39 -0
- app/code/community/Magmodules/Sooqr/Model/Source/Countries.php +25 -0
- app/code/community/Magmodules/Sooqr/Model/Source/Tax.php +29 -0
- app/code/community/Magmodules/Sooqr/Model/System/Config/Backend/Design/Extra.php +51 -0
- app/code/community/Magmodules/Sooqr/controllers/Adminhtml/SooqrController.php +54 -0
- app/code/community/Magmodules/Sooqr/controllers/InstallationController.php +30 -0
- app/code/community/Magmodules/Sooqr/etc/adminhtml.xml +50 -0
- app/code/community/Magmodules/Sooqr/etc/config.xml +132 -0
- app/code/community/Magmodules/Sooqr/etc/system.xml +615 -0
- app/design/frontend/base/default/layout/magmodules_sooqr.xml +8 -0
- app/design/frontend/base/default/template/magmodules/sooqr/form.mini.phtml +54 -0
- app/etc/modules/Magmodules_Sooqr.xml +9 -0
- app/locale/en_US/Magmodules_Sooqr.csv +122 -0
- app/locale/nl_NL/Magmodules_Sooqr.csv +142 -0
- package.xml +18 -0
app/code/community/Magmodules/Sooqr/Block/Adminhtml/Config/Form/Field/Extra.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Adminhtml_Config_Form_Field_Extra extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract {
|
19 |
+
|
20 |
+
protected $_renders = array();
|
21 |
+
|
22 |
+
public function __construct()
|
23 |
+
{
|
24 |
+
$layout = Mage::app()->getFrontController()->getAction()->getLayout();
|
25 |
+
$renderer_attribute = $layout->createBlock('sooqr/adminhtml_config_form_renderer_select', '', array('is_render_to_js_template' => true));
|
26 |
+
$renderer_attribute->setOptions(Mage::getModel('sooqr/source_attribute')->toOptionArray());
|
27 |
+
$this->addColumn('attribute', array(
|
28 |
+
'label' => Mage::helper('sooqr')->__('Attribute'),
|
29 |
+
'style' => 'width:180px',
|
30 |
+
'renderer' => $renderer_attribute
|
31 |
+
));
|
32 |
+
$this->_renders['attribute'] = $renderer_attribute;
|
33 |
+
$this->_addAfter = false;
|
34 |
+
$this->_addButtonLabel = Mage::helper('sooqr')->__('Add Field');
|
35 |
+
parent::__construct();
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareArrayRow(Varien_Object $row)
|
39 |
+
{
|
40 |
+
foreach ($this->_renders as $key => $render){
|
41 |
+
$row->setData(
|
42 |
+
'option_extra_attr_' . $render->calcOptionHash($row->getData($key)),
|
43 |
+
'selected="selected"'
|
44 |
+
);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
app/code/community/Magmodules/Sooqr/Block/Adminhtml/Config/Form/Renderer/Select.php
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Adminhtml_Config_Form_Renderer_Select extends Mage_Core_Block_Html_Select {
|
19 |
+
|
20 |
+
public function setInputName($inputName)
|
21 |
+
{
|
22 |
+
$this->setData('inputname', $inputName);
|
23 |
+
return $this;
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getInputName()
|
27 |
+
{
|
28 |
+
return $this->getData('inputname');
|
29 |
+
}
|
30 |
+
|
31 |
+
public function setColumnName($columnName)
|
32 |
+
{
|
33 |
+
$this->setData('columnname', $columnName);
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getColumnName()
|
38 |
+
{
|
39 |
+
return $this->getData('columnname');
|
40 |
+
}
|
41 |
+
|
42 |
+
public function setColumn($column)
|
43 |
+
{
|
44 |
+
$this->setData('column', $column);
|
45 |
+
return $this;
|
46 |
+
}
|
47 |
+
|
48 |
+
public function getColumn()
|
49 |
+
{
|
50 |
+
return $this->getData('column');
|
51 |
+
}
|
52 |
+
|
53 |
+
public function getExtraParams()
|
54 |
+
{
|
55 |
+
$column = $this->getColumn();
|
56 |
+
if($column && isset($column['style'])){
|
57 |
+
return ' style="'.$column['style'].'" ';
|
58 |
+
}else{
|
59 |
+
return '';
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
protected function _toHtml()
|
64 |
+
{
|
65 |
+
if(!$this->_beforeToHtml()) {
|
66 |
+
return '';
|
67 |
+
}
|
68 |
+
|
69 |
+
$html = '<select name="'.$this->getInputName().'" class="'.$this->getClass().'" '.$this->getExtraParams().'>';
|
70 |
+
|
71 |
+
$values = $this->getValue();
|
72 |
+
|
73 |
+
if (!is_array($values)){
|
74 |
+
if (!is_null($values)) {
|
75 |
+
$values = array($values);
|
76 |
+
} else {
|
77 |
+
$values = array();
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
$isArrayOption = true;
|
82 |
+
|
83 |
+
foreach($this->getOptions() as $key => $option) {
|
84 |
+
if($isArrayOption && is_array($option)) {
|
85 |
+
$value = $option['value'];
|
86 |
+
$label = $option['label'];
|
87 |
+
$params = (!empty($option['params'])) ? $option['params'] : array();
|
88 |
+
} else {
|
89 |
+
$value = $key;
|
90 |
+
$label = $option;
|
91 |
+
$isArrayOption = false;
|
92 |
+
$params = array();
|
93 |
+
}
|
94 |
+
|
95 |
+
if(is_array($value)) {
|
96 |
+
$html.= '<optgroup label="'.$label.'">';
|
97 |
+
foreach($value as $keyGroup => $optionGroup) {
|
98 |
+
if(!is_array($optionGroup)) {
|
99 |
+
$optionGroup = array(
|
100 |
+
'value' => $keyGroup,
|
101 |
+
'label' => $optionGroup
|
102 |
+
);
|
103 |
+
}
|
104 |
+
$html.= $this->_optionToHtml(
|
105 |
+
$optionGroup,
|
106 |
+
in_array($optionGroup['value'], $values)
|
107 |
+
);
|
108 |
+
}
|
109 |
+
$html.= '</optgroup>';
|
110 |
+
} else {
|
111 |
+
$html.= $this->_optionToHtml(array(
|
112 |
+
'value' => $value,
|
113 |
+
'label' => $label,
|
114 |
+
'params' => $params
|
115 |
+
),
|
116 |
+
in_array($value, $values)
|
117 |
+
);
|
118 |
+
}
|
119 |
+
}
|
120 |
+
$html.= '</select>';
|
121 |
+
return $html;
|
122 |
+
}
|
123 |
+
|
124 |
+
protected function _optionToHtml($option, $selected = false)
|
125 |
+
{
|
126 |
+
$selectedHtml = $selected ? ' selected="selected"' : '';
|
127 |
+
if ($this->getIsRenderToJsTemplate() === true) {
|
128 |
+
$selectedHtml .= ' #{option_extra_attr_' . self::calcOptionHash($option['value']) . '}';
|
129 |
+
}
|
130 |
+
|
131 |
+
$params = '';
|
132 |
+
if (!empty($option['params']) && is_array($option['params'])) {
|
133 |
+
foreach ($option['params'] as $key => $value) {
|
134 |
+
if (is_array($value)) {
|
135 |
+
foreach ($value as $keyMulti => $valueMulti) {
|
136 |
+
$params .= sprintf(' %s="%s" ', $keyMulti, $valueMulti);
|
137 |
+
}
|
138 |
+
} else {
|
139 |
+
$params .= sprintf(' %s="%s" ', $key, $value);
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
return sprintf('<option value="%s"%s %s>%s</option>',
|
145 |
+
$this->htmlEscape($option['value']),
|
146 |
+
$selectedHtml,
|
147 |
+
$params,
|
148 |
+
$this->htmlEscape($option['label']));
|
149 |
+
}
|
150 |
+
|
151 |
+
public function getHtml()
|
152 |
+
{
|
153 |
+
return $this->toHtml();
|
154 |
+
}
|
155 |
+
|
156 |
+
public function calcOptionHash($optionValue)
|
157 |
+
{
|
158 |
+
return sprintf('%u', crc32($this->getColumnName() . $this->getInputName() . $optionValue));
|
159 |
+
}
|
160 |
+
|
161 |
+
}
|
app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Feeds.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Adminhtml_System_Config_Form_Field_Feeds extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
19 |
+
|
20 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
21 |
+
{
|
22 |
+
$store_ids = Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled');
|
23 |
+
$html_feedlinks = '';
|
24 |
+
foreach($store_ids as $storeId) {
|
25 |
+
$generate_url = $this->getUrl('*/sooqr/generateManual/store_id/' . $storeId);
|
26 |
+
$feed_text = Mage::getStoreConfig('sooqr_connect/generate/feed_result', $storeId);
|
27 |
+
if(empty($feed_text)) {
|
28 |
+
$feed_text = Mage::helper('sooqr')->__('No active feed found');
|
29 |
+
}
|
30 |
+
$store_title = Mage::app()->getStore($storeId)->getName();
|
31 |
+
$store_code = Mage::app()->getStore($storeId)->getCode();
|
32 |
+
$html_feedlinks .= '<tr><td valign="top">' . $store_title . ' - ' . $store_code . '</td><td>' . $feed_text . '</td><td><a href="' . $generate_url . '">Generate</a></td></tr>';
|
33 |
+
}
|
34 |
+
if(empty($html_feedlinks)) {
|
35 |
+
$html_feedlinks = Mage::helper('sooqr')->__('No enabled feed(s) found');
|
36 |
+
} else {
|
37 |
+
$html_header = '<div class="grid"><table cellpadding="0" cellspacing="0" class="border" style="width: 100%"><tbody><tr class="headings"><th>Store</th><th>Feed</th><th>Generate</th></tr>';
|
38 |
+
$html_footer = '</tbody></table></div>';
|
39 |
+
$html_feedlinks = $html_header . $html_feedlinks . $html_footer;
|
40 |
+
}
|
41 |
+
return sprintf('<tr id="row_%s"><td colspan="6" class="label" style="margin-bottom: 10px;">%s</td></tr>', $element->getHtmlId(), $html_feedlinks);
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Heading.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Adminhtml_System_Config_Form_Field_Heading extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
19 |
+
|
20 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
21 |
+
{
|
22 |
+
$useContainerId = $element->getData('use_container_id');
|
23 |
+
return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4>%s</h4></td></tr>',
|
24 |
+
$element->getHtmlId(), $element->getLabel()
|
25 |
+
);
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Note.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Adminhtml_System_Config_Form_Field_Note extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
19 |
+
|
20 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
21 |
+
{
|
22 |
+
$useContainerId = $element->getData('use_container_id');
|
23 |
+
return sprintf('<tr id="row_%s"><td colspan="5" class="label" style="margin-bottom: 10px;">%s</td></tr>',
|
24 |
+
$element->getHtmlId(), $element->getLabel()
|
25 |
+
);
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Magmodules/Sooqr/Block/Adminhtml/System/Config/Form/Field/Version.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Adminhtml_System_Config_Form_Field_Version extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
19 |
+
|
20 |
+
public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
21 |
+
{
|
22 |
+
$modules = Mage::getConfig()->getNode('modules')->children();
|
23 |
+
$modulesArray = (array)$modules;
|
24 |
+
return $modulesArray['Magmodules_Sooqr']->version;
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
app/code/community/Magmodules/Sooqr/Block/Adminhtml/Widget/Info/Info.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
19 |
+
|
20 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
21 |
+
{
|
22 |
+
$account_id = Mage::getStoreConfig('sooqr_connect/general/account_id');
|
23 |
+
$api_key = Mage::getStoreConfig('sooqr_connect/general/api_key');
|
24 |
+
$html = '<div style="background:url(\'http://www.magmodules.eu/_logo.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
|
25 |
+
<h4>About Magmodules.eu</h4>
|
26 |
+
<p>We are a Magento only E-commerce Agency located in the Netherlands and we developed this extension in association with Sooqr.<br>
|
27 |
+
<br />
|
28 |
+
<table width="500px" border="0">
|
29 |
+
<tr>
|
30 |
+
<td width="58%">View more extensions from us:</td>
|
31 |
+
<td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
|
32 |
+
</tr>
|
33 |
+
<td>Send us an E-mail:
|
34 |
+
<td><a href="mailto:info@magmodules.eu">info@magmodules.eu</a></td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td height="30">Visit our Website and Knowledgebase:</td>
|
38 |
+
<td><a href="http://www.magmodules.eu/help/sooqr" target="_blank">www.magmodules.eu</a></td>
|
39 |
+
</tr>';
|
40 |
+
|
41 |
+
|
42 |
+
if(empty($account_id) && empty($api_key)) {
|
43 |
+
$html .= ' <tr>
|
44 |
+
<td>Registration on Sooqr (and free trial):</td>
|
45 |
+
<td><a href="https://my.sooqr.com/magtrial" target="_blank">Register here</a></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td>Sooqr Conversion Suite</td>
|
49 |
+
<td><a href="https://my.sooqr.com/user/login" target="_blank">Login here</a></td>
|
50 |
+
</tr>';
|
51 |
+
}
|
52 |
+
|
53 |
+
$html .= ' <tr>
|
54 |
+
<td height="30">Sooqr Support</td>
|
55 |
+
<td><a href="http://support.sooqr.com/support/home" target="_blank">Sooqr Support</a> or <a href="mailto:support@sooqr.com" target="_blank">support@sooqr.com</a></td>
|
56 |
+
</tr>
|
57 |
+
<tr>
|
58 |
+
<td height="30"> </td>
|
59 |
+
<td> </td>
|
60 |
+
</tr>
|
61 |
+
</table>
|
62 |
+
</div>';
|
63 |
+
|
64 |
+
if(Mage::getStoreConfig('catalog/frontend/flat_catalog_product')) {
|
65 |
+
$store_id = Mage::helper('sooqr')->getStoreIdConfig();
|
66 |
+
$non_flat_attributes = Mage::helper('sooqr')->checkFlatCatalog(Mage::getModel("sooqr/sooqr")->getFeedAttributes($store_id));
|
67 |
+
if(count($non_flat_attributes) > 0) {
|
68 |
+
$html .= '<div id="messages"><ul class="messages"><li class="error-msg"><ul><li><span>';
|
69 |
+
$html .= $this->__('Warning: The following used attribute(s) were not found in the flat catalog: %s. This can result in empty data or higher resource usage. Click <a href="%s">here</a> to add these to the flat catalog. ', implode($non_flat_attributes, ', '), $this->getUrl('*/sooqr/addToFlat'));
|
70 |
+
$html .= '</span></ul></li></ul></div>';
|
71 |
+
}
|
72 |
+
}
|
73 |
+
return $html;
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
app/code/community/Magmodules/Sooqr/Block/Search.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Block_Search extends Mage_Core_Block_Template {
|
19 |
+
|
20 |
+
public function isEnabled()
|
21 |
+
{
|
22 |
+
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled');
|
23 |
+
$frontend_enabled = Mage::getStoreConfig('sooqr_connect/general/frontend_enabled');
|
24 |
+
$account_id = Mage::getStoreConfig('sooqr_connect/general/account_id');
|
25 |
+
$api_key = Mage::getStoreConfig('sooqr_connect/general/api_key');
|
26 |
+
if($enabled && $frontend_enabled && (!empty($account_id)) && (!empty($api_key))) {
|
27 |
+
return true;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getSooqrOptions()
|
32 |
+
{
|
33 |
+
$account_id = Mage::getStoreConfig('sooqr_connect/general/account_id');
|
34 |
+
$options = array('account' => $account_id, 'fieldId' => 'search');
|
35 |
+
$parent = Mage::getStoreConfig('sooqr_connect/general/parent');
|
36 |
+
if(!empty($parent)) {
|
37 |
+
$options['containerParent'] = $parent;
|
38 |
+
}
|
39 |
+
$version = Mage::getStoreConfig('sooqr_connect/general/frontend_version');
|
40 |
+
if(!empty($version)) {
|
41 |
+
$options['version'] = $version;
|
42 |
+
}
|
43 |
+
return $options;
|
44 |
+
}
|
45 |
+
|
46 |
+
public function getSooqrLanguage()
|
47 |
+
{
|
48 |
+
return Mage::app()->getLocale()->getLocaleCode();
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getSooqrJavascript() {
|
52 |
+
$custom_js = Mage::getStoreConfig('sooqr_connect/general/custom_js');
|
53 |
+
if(!empty($custom_js)) {
|
54 |
+
return $custom_js;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
public function isTrackingEnabled()
|
59 |
+
{
|
60 |
+
if(Mage::getStoreConfig('sooqr_connect/general/statistics')) {
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
public function getSooqrScriptUri()
|
66 |
+
{
|
67 |
+
if(Mage::getStoreConfig('sooqr_connect/general/staging')) {
|
68 |
+
return 'static.staging.sooqr.com/sooqr.js';
|
69 |
+
}
|
70 |
+
return 'static.sooqr.com/sooqr.js';
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
app/code/community/Magmodules/Sooqr/Helper/Data.php
ADDED
@@ -0,0 +1,688 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* @version 26-03-2016
|
16 |
+
* =============================================================
|
17 |
+
*/
|
18 |
+
|
19 |
+
class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
20 |
+
|
21 |
+
public function getStoreIds($path)
|
22 |
+
{
|
23 |
+
$store_ids = array();
|
24 |
+
foreach(Mage::app()->getStores() as $store) {
|
25 |
+
$store_id = Mage::app()->getStore($store)->getId();
|
26 |
+
if(Mage::getStoreConfig($path, $store_id)) {
|
27 |
+
$store_ids[] = $store_id;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
return $store_ids;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function getProductDataRow($product, $config, $parent)
|
34 |
+
{
|
35 |
+
$fields = $config['field'];
|
36 |
+
$data = array();
|
37 |
+
|
38 |
+
if(!$this->validateParent($parent, $config, $product)) { $parent = ''; }
|
39 |
+
if(!$this->validateProduct($product, $config, $parent)) { return false; }
|
40 |
+
|
41 |
+
foreach($fields as $key => $field) {
|
42 |
+
$rows = $this->getAttributeValue($key, $product, $config, $field['action'], $parent);
|
43 |
+
if(is_array($rows)) {
|
44 |
+
$data = array_merge($data, $rows);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
if(empty($config['skip_validation'])) {
|
48 |
+
if(!empty($data[$fields['price']['label']])) {
|
49 |
+
return $data;
|
50 |
+
}
|
51 |
+
} else {
|
52 |
+
return $data;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getAttributeValue($field, $product, $config, $actions = '', $parent)
|
57 |
+
{
|
58 |
+
$data = $config['field'][$field];
|
59 |
+
$product_data = $product;
|
60 |
+
|
61 |
+
if(!empty($parent)) {
|
62 |
+
if(!empty($data['parent'])) {
|
63 |
+
$product_data = $parent;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
switch($field) {
|
68 |
+
case 'product_url':
|
69 |
+
$value = $this->getProductUrl($product, $config, $parent);
|
70 |
+
break;
|
71 |
+
case 'image_link':
|
72 |
+
$value = $this->getProductImage($product_data, $config);
|
73 |
+
break;
|
74 |
+
case 'condition':
|
75 |
+
$value = $this->getProductCondition($product_data, $config);
|
76 |
+
break;
|
77 |
+
case 'availability':
|
78 |
+
$value = $this->getProductAvailability($product_data, $config);
|
79 |
+
break;
|
80 |
+
case 'weight':
|
81 |
+
$value = $this->getProductWeight($product_data, $config);
|
82 |
+
break;
|
83 |
+
case 'price':
|
84 |
+
$value = $this->getProductPrice($product_data, $config);
|
85 |
+
break;
|
86 |
+
case 'bundle':
|
87 |
+
$value = $this->getProductBundle($product_data, $config);
|
88 |
+
break;
|
89 |
+
case 'parent_id':
|
90 |
+
$value = $this->getProductData($parent, $data);
|
91 |
+
break;
|
92 |
+
case 'categories':
|
93 |
+
$value = $this->getProductCategories($product_data, $config);
|
94 |
+
break;
|
95 |
+
default:
|
96 |
+
if(!empty($data['source'])) {
|
97 |
+
$value = $this->getProductData($product_data, $data, $config);
|
98 |
+
} else {
|
99 |
+
$value = '';
|
100 |
+
}
|
101 |
+
break;
|
102 |
+
}
|
103 |
+
|
104 |
+
if((isset($actions)) && (!empty($value))) {
|
105 |
+
$value = $this->cleanData($value, $actions);
|
106 |
+
}
|
107 |
+
|
108 |
+
if((is_array($value) && ($field == 'image_link'))) {
|
109 |
+
$i = 1;
|
110 |
+
foreach($value as $key => $val) {
|
111 |
+
$data_row[$key] = $val;
|
112 |
+
$i++;
|
113 |
+
}
|
114 |
+
return $data_row;
|
115 |
+
}
|
116 |
+
|
117 |
+
if(!empty($value) || is_numeric($value)) {
|
118 |
+
$data_row[$data['label']] = $value;
|
119 |
+
return $data_row;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
public function cleanData($st, $action = '')
|
124 |
+
{
|
125 |
+
if($action) {
|
126 |
+
$actions = explode('_', $action);
|
127 |
+
if(in_array('striptags', $actions)) {
|
128 |
+
$st = $this->stripTags($st);
|
129 |
+
$st = trim($st);
|
130 |
+
}
|
131 |
+
if(in_array('replacetags', $actions)) {
|
132 |
+
$st = str_replace(array("\r", "\n"), "", $st);
|
133 |
+
$st = str_replace(array("<br>","<br/>", "<br />"), '\n', $st);
|
134 |
+
$st = $this->stripTags($st);
|
135 |
+
$st = rtrim($st);
|
136 |
+
}
|
137 |
+
if(in_array('replacetagsn', $actions)) {
|
138 |
+
$st = str_replace(array("\r", "\n"), "", $st);
|
139 |
+
$st = str_replace(array("<br>","<br/>", "<br />"), '\\' . '\n', $st);
|
140 |
+
$st = $this->stripTags($st);
|
141 |
+
$st = rtrim($st);
|
142 |
+
}
|
143 |
+
if(in_array('rn', $actions)) {
|
144 |
+
$st = str_replace(array("\r", "\n"), "", $st);
|
145 |
+
}
|
146 |
+
if(in_array('truncate', $actions)) {
|
147 |
+
$st = Mage::helper('core/string')->truncate($st, '5000');
|
148 |
+
}
|
149 |
+
if(in_array('cdata', $actions)) {
|
150 |
+
$st = '<![CDATA[' . $st . ']]>';
|
151 |
+
}
|
152 |
+
if(in_array('round', $actions)) {
|
153 |
+
if(!empty($actions[1])) {
|
154 |
+
if($st > $actions[1]) {
|
155 |
+
$st = $actions[1];
|
156 |
+
}
|
157 |
+
}
|
158 |
+
$st = round($st);
|
159 |
+
}
|
160 |
+
if(in_array('boolean', $actions)) {
|
161 |
+
($st > 0 ? $st = 1 : $st = 0);
|
162 |
+
}
|
163 |
+
}
|
164 |
+
return $st;
|
165 |
+
}
|
166 |
+
|
167 |
+
public function getProductUrl($product, $config, $parent)
|
168 |
+
{
|
169 |
+
if(!empty($parent)) {
|
170 |
+
if($parent->getUrlPath()) {
|
171 |
+
$url = Mage::helper('core')->escapeHtml(trim($config['website_url'] . $parent->getUrlPath()));
|
172 |
+
} else {
|
173 |
+
$url = Mage::getModel('catalog/product')->setStoreId($config['store_id'])->load($parent->getId())->getProductUrl();
|
174 |
+
$url = preg_replace('/\?.*/', '', $url);
|
175 |
+
}
|
176 |
+
} else {
|
177 |
+
if($product->getUrlPath()) {
|
178 |
+
$url = Mage::helper('core')->escapeHtml(trim($config['website_url'] . $product->getUrlPath()));
|
179 |
+
} else {
|
180 |
+
$url = Mage::getModel('catalog/product')->setStoreId($config['store_id'])->load($product->getId())->getProductUrl();
|
181 |
+
$url = preg_replace('/\?.*/', '', $url);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
if(!empty($config['url_suffix'])) {
|
185 |
+
$url = $url . '?' . $config['url_suffix'];
|
186 |
+
}
|
187 |
+
if(!empty($parent) && !empty($config['conf_switch_urls'])) {
|
188 |
+
if($parent->getTypeId() == 'configurable') {
|
189 |
+
$productAttributeOptions = $parent->getTypeInstance(true)->getConfigurableAttributesAsArray($parent);
|
190 |
+
$url_extra = '';
|
191 |
+
foreach ($productAttributeOptions as $productAttribute) {
|
192 |
+
if($id = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), $productAttribute['attribute_code'], $config['store_id'])) {
|
193 |
+
$url_extra .= $productAttribute['attribute_id'] . '=' . $id . '&';
|
194 |
+
}
|
195 |
+
}
|
196 |
+
if(!empty($url_extra)) {
|
197 |
+
$url = $url . '#' . rtrim($url_extra, '&');
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
return $url;
|
202 |
+
}
|
203 |
+
|
204 |
+
public function getProductImage($product, $config)
|
205 |
+
{
|
206 |
+
$image_data = array();
|
207 |
+
if(!empty($config['image_resize']) && !empty($config['image_size'])) {
|
208 |
+
$image_file = $product->getData($config['image_source']);
|
209 |
+
$imageModel = Mage::getModel('catalog/product_image')->setSize($config['image_size'])->setDestinationSubdir($config['image_source'])->setBaseFile($image_file);
|
210 |
+
if(!$imageModel->isCached()) {
|
211 |
+
$imageModel->resize()->saveFile();
|
212 |
+
}
|
213 |
+
$productImage = $imageModel->getUrl();
|
214 |
+
return (string)$productImage;
|
215 |
+
} else {
|
216 |
+
$image = '';
|
217 |
+
if(!empty($config['media_attributes'])) {
|
218 |
+
foreach($config['media_attributes'] as $media_att) {
|
219 |
+
if($media_att == 'base') { $media_att = 'image'; }
|
220 |
+
$media_data = $product->getData($media_att);
|
221 |
+
if(!empty($media_data)) {
|
222 |
+
if($media_data != 'no_selection') {
|
223 |
+
$image = $config['media_image_url'] . $media_data;
|
224 |
+
$image_data['image'][$media_att] = $image;
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
} else { // FOR OLDER VERSIONS
|
229 |
+
if($product->getThumbnail()) {
|
230 |
+
if($product->getThumbnail() != 'no_selection') {
|
231 |
+
$image = $config['media_image_url'] . $product->getThumbnail();
|
232 |
+
$image_data['image']['thumb'] = $image;
|
233 |
+
}
|
234 |
+
}
|
235 |
+
if($product->getSmallImage()) {
|
236 |
+
if($product->getSmallImage() != 'no_selection') {
|
237 |
+
$image = $config['media_image_url'] . $product->getSmallImage();
|
238 |
+
$image_data['image']['small'] = $image;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
if($product->getImage()) {
|
242 |
+
if($product->getImage() != 'no_selection') {
|
243 |
+
$image = $config['media_image_url'] . $product->getImage();
|
244 |
+
$image_data['image']['base'] = $image;
|
245 |
+
}
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
if(!empty($config['images'])) {
|
250 |
+
$image_data['image_link'] = $image;
|
251 |
+
$container = new Varien_Object(array('attribute' => new Varien_Object(array('id' => $config['media_gallery_id']))));
|
252 |
+
$img_product = new Varien_Object(array('id' => $product->getId(),'store_id' => $config['store_id']));
|
253 |
+
$gallery = Mage::getResourceModel('catalog/product_attribute_backend_media')->loadGallery($img_product, $container);
|
254 |
+
$images = array(); $i = 1;
|
255 |
+
usort($gallery, function($a, $b) { return $a['position_default'] > $b['position_default']; });
|
256 |
+
foreach($gallery as $gal_image) {
|
257 |
+
if($gal_image['disabled'] == 0) {
|
258 |
+
$image_data['image']['all']['image_' . $i] = $config['media_image_url'] . $gal_image['file'];
|
259 |
+
$image_data['image']['last'] = $config['media_image_url'] . $gal_image['file'];
|
260 |
+
if($i == 1) { $image_data['image']['first'] = $config['media_image_url'] . $gal_image['file']; }
|
261 |
+
$i++;
|
262 |
+
}
|
263 |
+
}
|
264 |
+
return $image_data;
|
265 |
+
} else {
|
266 |
+
return $image;
|
267 |
+
}
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
public function getProductCondition($product, $config)
|
272 |
+
{
|
273 |
+
if(isset($config['condition_attribute'])) {
|
274 |
+
if($condition = $product->getAttributeText($config['condition_attribute'])) {
|
275 |
+
return $condition;
|
276 |
+
} else{
|
277 |
+
return false;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
return $config['condition_default'];
|
281 |
+
}
|
282 |
+
|
283 |
+
public function getProductBundle($product, $config)
|
284 |
+
{
|
285 |
+
if($product->getTypeId() == 'bundle') {
|
286 |
+
return 'true';
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
public function getProductAvailability($product, $config)
|
291 |
+
{
|
292 |
+
if(!empty($config['stock_instock'])) {
|
293 |
+
if($product->getUseConfigManageStock()) {
|
294 |
+
$manage_stock = $config['stock_manage'];
|
295 |
+
} else {
|
296 |
+
$manage_stock = $product->getManageStock();
|
297 |
+
}
|
298 |
+
if($manage_stock) {
|
299 |
+
if($product['stock_status']) {
|
300 |
+
$availability = $config['stock_instock'];
|
301 |
+
} else {
|
302 |
+
$availability = $config['stock_outofstock'];
|
303 |
+
}
|
304 |
+
} else {
|
305 |
+
$availability = $config['stock_instock'];
|
306 |
+
}
|
307 |
+
return $availability;
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
+
public function getProductWeight($product, $config)
|
312 |
+
{
|
313 |
+
if(!empty($config['weight'])) {
|
314 |
+
$weight = number_format($product->getWeight(), 2, '.', '');
|
315 |
+
if(isset($config['weight_units'])) {
|
316 |
+
$weight = $weight . ' ' . $config['weight_units'];
|
317 |
+
}
|
318 |
+
return $weight;
|
319 |
+
}
|
320 |
+
}
|
321 |
+
|
322 |
+
public function getProductCategories($product, $config)
|
323 |
+
{
|
324 |
+
if(isset($config['category_data'])) {
|
325 |
+
$category_data = $config['category_data'];
|
326 |
+
$products_cat = array();
|
327 |
+
$category_ids = $product->getCategoryIds();
|
328 |
+
$level = 0;
|
329 |
+
if(!empty($config['category_full'])) {
|
330 |
+
$path = array();
|
331 |
+
foreach($category_ids as $category_id) {
|
332 |
+
if(isset($category_data[$category_id])) {
|
333 |
+
$path[] = $category_data[$category_id]['name'];
|
334 |
+
}
|
335 |
+
}
|
336 |
+
$products_cat = array('path' => $path);
|
337 |
+
} else {
|
338 |
+
foreach($category_ids as $category_id) {
|
339 |
+
if(isset($category_data[$category_id])) {
|
340 |
+
$products_cat[] = $category_data[$category_id];
|
341 |
+
$level = $category_data[$category_id]['level'];
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
345 |
+
return $products_cat;
|
346 |
+
}
|
347 |
+
}
|
348 |
+
|
349 |
+
public function getProductData($product, $data, $config = '')
|
350 |
+
{
|
351 |
+
$type = $data['type'];
|
352 |
+
$source = $data['source'];
|
353 |
+
$value = '';
|
354 |
+
switch($type) {
|
355 |
+
case 'price':
|
356 |
+
if(!empty($product[$source])) {
|
357 |
+
$value = number_format($product[$source], 2, '.', '');
|
358 |
+
if(!empty($config['currency'])) {
|
359 |
+
$value .= ' ' . $config['currency'];
|
360 |
+
}
|
361 |
+
}
|
362 |
+
break;
|
363 |
+
case 'select':
|
364 |
+
$value = $product->getAttributeText($source);
|
365 |
+
break;
|
366 |
+
case 'multiselect':
|
367 |
+
if(count($product->getAttributeText($source))) {
|
368 |
+
if(count($product->getAttributeText($source)) > 1) {
|
369 |
+
$value = implode(',', $product->getAttributeText($source));
|
370 |
+
} else {
|
371 |
+
$value = $product->getAttributeText($source);
|
372 |
+
}
|
373 |
+
}
|
374 |
+
break;
|
375 |
+
default:
|
376 |
+
if(isset($product[$source])) {
|
377 |
+
$value = $product[$source];
|
378 |
+
}
|
379 |
+
break;
|
380 |
+
}
|
381 |
+
return $value;
|
382 |
+
}
|
383 |
+
|
384 |
+
public function getProductPrice($product, $config)
|
385 |
+
{
|
386 |
+
$price_data = array();
|
387 |
+
$price_markup = $this->getPriceMarkup($config);
|
388 |
+
$tax_param = $config['use_tax'];
|
389 |
+
|
390 |
+
if(!empty($config['hide_currency'])) {
|
391 |
+
$currency = '';
|
392 |
+
} else {
|
393 |
+
$currency = ' ' . $config['currency'];
|
394 |
+
}
|
395 |
+
|
396 |
+
if(!empty($config['price_scope'])) {
|
397 |
+
$price = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), 'price', $config['store_id']);
|
398 |
+
} else {
|
399 |
+
$price = $product->getPrice();
|
400 |
+
}
|
401 |
+
|
402 |
+
$price = Mage::helper('tax')->getPrice($product, $price, $tax_param);
|
403 |
+
$price_data['regular_price'] = number_format(($price * $price_markup), 2, '.', '') . $currency;
|
404 |
+
$pricerule_price = Mage::helper('tax')->getPrice($product, $product->getFinalPrice(), $tax_param);
|
405 |
+
|
406 |
+
$special_price = ''; $special_date = '';
|
407 |
+
if(($pricerule_price > 0) && ($pricerule_price < $product->getPrice())) {
|
408 |
+
$sales_price = $pricerule_price;
|
409 |
+
$specialPriceFromDate = $product->getSpecialFromDate();
|
410 |
+
$specialPriceToDate = $product->getSpecialToDate();
|
411 |
+
$today = time();
|
412 |
+
if($today >= strtotime($specialPriceFromDate)) {
|
413 |
+
if($today <= strtotime($specialPriceToDate) || is_null($specialPriceToDate)) {
|
414 |
+
$price_data['sales_date_start'] = $specialPriceFromDate;
|
415 |
+
$price_data['sales_date_end'] = $specialPriceToDate;
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
|
420 |
+
if(($product->getTypeId() == 'bundle') && ($price < 0.01)) {
|
421 |
+
$price = $this->getPriceBundle($product, $config['store_id']);
|
422 |
+
}
|
423 |
+
|
424 |
+
if($product->getTypeId() == 'grouped') {
|
425 |
+
if(!empty($config['price_grouped'])) {
|
426 |
+
$price = $this->getPriceGrouped($product, $config['price_grouped']);
|
427 |
+
} else {
|
428 |
+
if($price < 0.01) {
|
429 |
+
$price = $this->getPriceGrouped($product);
|
430 |
+
}
|
431 |
+
}
|
432 |
+
}
|
433 |
+
|
434 |
+
$price_data['final_price_clean'] = $price;
|
435 |
+
$price_data['price'] = number_format(($price * $price_markup), 2, '.', '') . $currency;
|
436 |
+
|
437 |
+
if(isset($sales_price)) {
|
438 |
+
$price_data['sales_price'] = number_format(($sales_price * $price_markup), 2, '.', '') . $currency;
|
439 |
+
}
|
440 |
+
|
441 |
+
if($price_data['final_price_clean'] > 0.01) {
|
442 |
+
return $price_data;
|
443 |
+
}
|
444 |
+
|
445 |
+
}
|
446 |
+
|
447 |
+
public function getPriceMarkup($config)
|
448 |
+
{
|
449 |
+
$markup = 1;
|
450 |
+
if(!empty($config['price_add_tax']) && !empty($config['price_add_tax_perc'])) {
|
451 |
+
$markup = 1 + ($config['price_add_tax_perc'] / 100);
|
452 |
+
}
|
453 |
+
if($config['base_currency_code'] != $config['currency']) {
|
454 |
+
$exchange_rate = Mage::helper('directory')->currencyConvert(1, $config['base_currency_code'], $config['currency']);
|
455 |
+
$markup = ($markup * $exchange_rate);
|
456 |
+
}
|
457 |
+
return $markup;
|
458 |
+
}
|
459 |
+
|
460 |
+
public function getTaxUsage($config)
|
461 |
+
{
|
462 |
+
if(!empty($config['force_tax'])) {
|
463 |
+
if($config['force_tax'] == 'incl') {
|
464 |
+
return 'true';
|
465 |
+
} else {
|
466 |
+
return '';
|
467 |
+
}
|
468 |
+
} else {
|
469 |
+
return 'true';
|
470 |
+
}
|
471 |
+
}
|
472 |
+
|
473 |
+
public function addAttributeData($attributes, $config = '')
|
474 |
+
{
|
475 |
+
foreach($attributes as $key => $attribute) {
|
476 |
+
$type = (!empty($attribute['type']) ? $attribute['type'] : '');
|
477 |
+
$action = (!empty($attribute['action']) ? $attribute['action'] : '');
|
478 |
+
$parent = (!empty($attribute['parent']) ? $attribute['parent'] : '');
|
479 |
+
if(isset($attribute['source'])) {
|
480 |
+
$attributeModel = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', $attribute['source']);
|
481 |
+
$type = $attributeModel->getFrontendInput();
|
482 |
+
}
|
483 |
+
if(!empty($config['conf_fields'])) {
|
484 |
+
$conf_attributes = explode(',', $config['conf_fields']);
|
485 |
+
if(in_array($key, $conf_attributes)) {
|
486 |
+
$parent = '1';
|
487 |
+
}
|
488 |
+
}
|
489 |
+
$attributes[$key] = array('label' => $attribute['label'], 'source' => $attribute['source'], 'type' => $type, 'action' => $action, 'parent' => $parent);
|
490 |
+
}
|
491 |
+
return $attributes;
|
492 |
+
}
|
493 |
+
|
494 |
+
public function getCategoryData($config, $storeId)
|
495 |
+
{
|
496 |
+
$eavAttribute = new Mage_Eav_Model_Mysql4_Entity_Attribute();
|
497 |
+
$attributes = array('entity_id','path','name','level');
|
498 |
+
|
499 |
+
if(!empty($config['category_custom'])) {
|
500 |
+
$attributes[] = $config['category_custom'];
|
501 |
+
}
|
502 |
+
if(!empty($config['category_replace'])) {
|
503 |
+
$attributes[] = $config['category_replace'];
|
504 |
+
}
|
505 |
+
|
506 |
+
$categories = Mage::getModel('catalog/category')->setStoreId($storeId)->getCollection()->addAttributeToSelect($attributes)->addFieldToFilter('is_active', array('eq' => 1));
|
507 |
+
$_categories = array();
|
508 |
+
|
509 |
+
foreach($categories as $cat) {
|
510 |
+
$custom = ''; $name = '';
|
511 |
+
if(!empty($config['category_replace'])) {
|
512 |
+
if(!empty($cat[$config['category_replace']])) {
|
513 |
+
$name = $cat[$config['category_replace']];
|
514 |
+
}
|
515 |
+
}
|
516 |
+
if(isset($config['category_custom'])) {
|
517 |
+
if(!empty($cat[$config['category_custom']])) {
|
518 |
+
$custom = $cat[$config['category_custom']];
|
519 |
+
}
|
520 |
+
}
|
521 |
+
if(empty($name)) { $name = $cat['name']; }
|
522 |
+
$_categories[$cat->getId()] = array('path' => $cat['path'], 'custom' => $custom, 'name' => $name, 'level' => $cat['level']);
|
523 |
+
}
|
524 |
+
|
525 |
+
foreach($_categories as $key => $cat) {
|
526 |
+
$path = array();
|
527 |
+
$custom_path = array();
|
528 |
+
$paths = explode('/', $cat['path']);
|
529 |
+
foreach($paths as $p) {
|
530 |
+
if(!empty($_categories[$p]['name'])) {
|
531 |
+
if($_categories[$p]['level'] > 1) {
|
532 |
+
$path[] = $_categories[$p]['name'];
|
533 |
+
if(!empty($_categories[$p]['custom'])) {
|
534 |
+
$custom_path[] = $_categories[$p]['custom'];
|
535 |
+
}
|
536 |
+
}
|
537 |
+
}
|
538 |
+
}
|
539 |
+
$_categories[$key] = array('path' => $this->cleanData($path, 'stiptags'), 'custom_path' => $this->cleanData($custom_path, 'stiptags'), 'custom' => $this->cleanData(end($custom_path), 'striptags'), 'name' => $this->cleanData($cat['name'], 'striptags'), 'level' => $cat['level']);
|
540 |
+
}
|
541 |
+
return $_categories;
|
542 |
+
}
|
543 |
+
|
544 |
+
public function getParentData($product, $config)
|
545 |
+
{
|
546 |
+
if(!empty($config['conf_enabled'])) {
|
547 |
+
if(($product['type_id'] == 'simple')) {
|
548 |
+
$config_ids = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
|
549 |
+
$group_ids = Mage::getResourceSingleton('catalog/product_link')->getParentIdsByChild($product->getId(), Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED);
|
550 |
+
if($config_ids) {
|
551 |
+
return $config_ids[0];
|
552 |
+
}
|
553 |
+
if($group_ids) {
|
554 |
+
return $group_ids[0];
|
555 |
+
}
|
556 |
+
}
|
557 |
+
}
|
558 |
+
}
|
559 |
+
|
560 |
+
public function validateProduct($product, $config, $parent)
|
561 |
+
{
|
562 |
+
if(empty($config['skip_validation'])) {
|
563 |
+
if($product['visibility'] == 1) {
|
564 |
+
if(empty($parent)) {
|
565 |
+
return false;
|
566 |
+
}
|
567 |
+
if($parent['status'] != 1) {
|
568 |
+
return false;
|
569 |
+
}
|
570 |
+
}
|
571 |
+
if(!empty($config['filter_exclude'])) {
|
572 |
+
if($product[$config['filter_exclude']] == 1) {
|
573 |
+
return false;
|
574 |
+
}
|
575 |
+
}
|
576 |
+
if(!empty($config['hide_no_stock'])) {
|
577 |
+
if($product->getUseConfigManageStock()) {
|
578 |
+
$manage_stock = $config['stock_manage'];
|
579 |
+
} else {
|
580 |
+
$manage_stock = $product->getManageStock();
|
581 |
+
}
|
582 |
+
if($manage_stock) {
|
583 |
+
if(!$product['stock_status']) {
|
584 |
+
return false;
|
585 |
+
}
|
586 |
+
}
|
587 |
+
}
|
588 |
+
if(!empty($config['conf_exclude_parent'])) {
|
589 |
+
if($product->getTypeId() == 'configurable') {
|
590 |
+
return false;
|
591 |
+
}
|
592 |
+
}
|
593 |
+
}
|
594 |
+
return true;
|
595 |
+
}
|
596 |
+
|
597 |
+
public function validateParent($parent, $config, $product)
|
598 |
+
{
|
599 |
+
return $this->validateProduct($product, $config, $parent);
|
600 |
+
}
|
601 |
+
|
602 |
+
public function getPriceBundle($product, $storeId)
|
603 |
+
{
|
604 |
+
if(($product->getPriceType() == '1') && ($product->getFinalPrice() > 0)) {
|
605 |
+
$price = $product->getFinalPrice();
|
606 |
+
} else {
|
607 |
+
$priceModel = $product->getPriceModel();
|
608 |
+
$block = Mage::getSingleton('core/layout')->createBlock('bundle/catalog_product_view_type_bundle');
|
609 |
+
$options = $block->setProduct($product)->getOptions();
|
610 |
+
$price = 0;
|
611 |
+
|
612 |
+
foreach ($options as $option) {
|
613 |
+
$selection = $option->getDefaultSelection();
|
614 |
+
if($selection === null) { continue; }
|
615 |
+
$prod_option = Mage::getModel('catalog/product')->setStoreId($storeId)->load($selection->getProductId());
|
616 |
+
$price += ($prod_option->getFinalPrice() * $selection->getSelectionQty());
|
617 |
+
}
|
618 |
+
}
|
619 |
+
if($price < 0.01) {
|
620 |
+
$price = Mage::helper('tax')->getPrice($product, $product->getFinalPrice(), true);
|
621 |
+
}
|
622 |
+
return $price;
|
623 |
+
}
|
624 |
+
|
625 |
+
public function getPriceGrouped($product, $pricemodel = '')
|
626 |
+
{
|
627 |
+
if(!$pricemodel) { $pricemodel = 'min'; }
|
628 |
+
$prices = array();
|
629 |
+
$_associatedProducts = $product->getTypeInstance(true)->getAssociatedProducts($product);
|
630 |
+
foreach($_associatedProducts as $_item) {
|
631 |
+
$price_associated = Mage::helper('tax')->getPrice($_item, $_item->getFinalPrice(), true);
|
632 |
+
if($price_associated > 0) {
|
633 |
+
$prices[] = $price_associated;
|
634 |
+
}
|
635 |
+
}
|
636 |
+
if(!empty($prices)) {
|
637 |
+
if($pricemodel == 'min') { return min($prices); }
|
638 |
+
if($pricemodel == 'max') { return max($prices); }
|
639 |
+
if($pricemodel == 'total') { return array_sum($prices); }
|
640 |
+
}
|
641 |
+
}
|
642 |
+
|
643 |
+
public function checkOldVersion($dir)
|
644 |
+
{
|
645 |
+
if($dir) {
|
646 |
+
$dir = Mage::getBaseDir('app') . DS . 'code' . DS . 'local' . DS . 'Magmodules' . DS . $dir;
|
647 |
+
return file_exists($dir);
|
648 |
+
}
|
649 |
+
}
|
650 |
+
|
651 |
+
public function checkFlatCatalog($attributes)
|
652 |
+
{
|
653 |
+
$non_flat_attributes = array();
|
654 |
+
foreach($attributes as $key => $attribute) {
|
655 |
+
if(!empty($attribute['source'])) {
|
656 |
+
if(($attribute['source'] != 'entity_id') && ($attribute['source'] != 'sku')) {
|
657 |
+
$_attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', $attribute['source']);
|
658 |
+
if($_attribute->getUsedInProductListing() == 0) {
|
659 |
+
if($_attribute->getId()) {
|
660 |
+
$non_flat_attributes[$_attribute->getId()] = $_attribute->getFrontendLabel();
|
661 |
+
}
|
662 |
+
}
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
return $non_flat_attributes;
|
667 |
+
}
|
668 |
+
|
669 |
+
public function getMediaAttributes()
|
670 |
+
{
|
671 |
+
$media_types = array();
|
672 |
+
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')->addFieldToFilter('frontend_input', 'media_image');
|
673 |
+
foreach($attributes as $attribute) {
|
674 |
+
$media_types[] = $attribute->getData('attribute_code');
|
675 |
+
}
|
676 |
+
return $media_types;
|
677 |
+
}
|
678 |
+
|
679 |
+
public function getStoreIdConfig()
|
680 |
+
{
|
681 |
+
$store_id = 0;
|
682 |
+
if(strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) {
|
683 |
+
$store_id = Mage::getModel('core/store')->load($code)->getId();
|
684 |
+
}
|
685 |
+
return $store_id;
|
686 |
+
}
|
687 |
+
|
688 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Backend/Sooqr/Cron.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Backend_Sooqr_Cron extends Mage_Core_Model_Config_Data {
|
19 |
+
|
20 |
+
const CRON_MODEL_PATH = 'sooqr/generate/cron_schedule';
|
21 |
+
|
22 |
+
protected function _afterSave()
|
23 |
+
{
|
24 |
+
$enabled = $this->getData('groups/generate/fields/enabled/value');
|
25 |
+
$time = $this->getData('groups/generate/fields/time/value');
|
26 |
+
$frequency = $this->getData('groups/generate/fields/frequency/value');
|
27 |
+
$store_ids = Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled');
|
28 |
+
if(count($store_ids) > 0) {
|
29 |
+
$minute = array();
|
30 |
+
if(count($store_ids) > 10) {
|
31 |
+
$n = 3;
|
32 |
+
} else {
|
33 |
+
$n = 5;
|
34 |
+
}
|
35 |
+
for($i = 1; $i < count($store_ids); $i++) {
|
36 |
+
$minute[] = ($i * $n);
|
37 |
+
}
|
38 |
+
$minute = implode(',', $minute);
|
39 |
+
|
40 |
+
switch($frequency) {
|
41 |
+
case 0:
|
42 |
+
$cronExprArray = array(intval($time[1]), intval($time[0]), '*', '*', '*');
|
43 |
+
break;
|
44 |
+
case 6:
|
45 |
+
$cronExprArray = array($minute, '*/6', '*', '*', '*');
|
46 |
+
break;
|
47 |
+
case 4:
|
48 |
+
$cronExprArray = array($minute, '*/4', '*', '*', '*');
|
49 |
+
break;
|
50 |
+
case 2:
|
51 |
+
$cronExprArray = array($minute, '*/2', '*', '*', '*');
|
52 |
+
break;
|
53 |
+
case 1:
|
54 |
+
$cronExprArray = array($minute, '*', '*', '*', '*');
|
55 |
+
break;
|
56 |
+
}
|
57 |
+
$cronExprString = join(' ', $cronExprArray);
|
58 |
+
} else {
|
59 |
+
$cronExprString = '';
|
60 |
+
}
|
61 |
+
try {
|
62 |
+
Mage::getModel('core/config_data')->load(self::CRON_MODEL_PATH, 'path')->setValue($cronExprString)->setPath(self::CRON_MODEL_PATH)->save();
|
63 |
+
} catch (Exception $e) {
|
64 |
+
throw new Exception(Mage::helper('cron')->__('Unable to save the cron expression.'));
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Attribute.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Attribute {
|
19 |
+
|
20 |
+
protected $_ignore = array(
|
21 |
+
'compatibility',
|
22 |
+
'gallery',
|
23 |
+
'installation',
|
24 |
+
'language_support',
|
25 |
+
'country_of_manufacture',
|
26 |
+
'links_title',
|
27 |
+
'current_version',
|
28 |
+
'custom_design',
|
29 |
+
'custom_layout_update',
|
30 |
+
'gift_message_available',
|
31 |
+
'image',
|
32 |
+
'image_label',
|
33 |
+
'media_gallery',
|
34 |
+
'msrp_display_actual_price_type',
|
35 |
+
'msrp_enabled',
|
36 |
+
'options_container',
|
37 |
+
'price_view',
|
38 |
+
'page_layout',
|
39 |
+
'samples_title',
|
40 |
+
'sku_type',
|
41 |
+
'tier_price',
|
42 |
+
'url_key',
|
43 |
+
'small_image',
|
44 |
+
'small_image_label',
|
45 |
+
'thumbnail',
|
46 |
+
'thumbnail_label',
|
47 |
+
'recurring_profile',
|
48 |
+
'version_info',
|
49 |
+
'meta_title',
|
50 |
+
'meta_keyword',
|
51 |
+
);
|
52 |
+
|
53 |
+
public function toOptionArray()
|
54 |
+
{
|
55 |
+
$options = array();
|
56 |
+
$options[] = array('value' => '', 'label' => Mage::helper('adminhtml')->__('-- none'));
|
57 |
+
$entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
|
58 |
+
$attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter('entity_type_id', $entityTypeId)->setOrder('attribute_code', 'ASC');
|
59 |
+
foreach ($attributes as $attribute){
|
60 |
+
if(($attribute->getBackendType() == 'text') || ($attribute->getBackendType() == 'varchar') || ($attribute->getBackendType() == 'static') || ($attribute->getBackendType() == 'int')) {
|
61 |
+
if($attribute->getFrontendLabel()) {
|
62 |
+
if(!in_array($attribute->getAttributeCode(), $this->_ignore)) {
|
63 |
+
$options[] = array('value'=> $attribute->getAttributeCode(), 'label'=> $attribute->getFrontendLabel());
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
return $options;
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Cacheresize.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Cacheresize {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$store_id = Mage::helper('sooqr')->getStoreIdConfig();
|
23 |
+
$source = Mage::getStoreConfig('sooqr_connect/products/image_source', $store_id);
|
24 |
+
$options = array();
|
25 |
+
if($source) {
|
26 |
+
$dir = Mage::getBaseDir('media') . DS . 'catalog' . DS . 'product' . DS . 'cache' . DS . $store_id . DS . $source . DS;
|
27 |
+
if(file_exists($dir)) {
|
28 |
+
$dirs = array_filter(glob($dir . '*'), 'is_dir');
|
29 |
+
if(count($dirs)) {
|
30 |
+
foreach($dirs as $img_option) {
|
31 |
+
$img_option = str_replace($dir, '', $img_option);
|
32 |
+
if(strlen($img_option) < 8) {
|
33 |
+
$options[] = array('value'=> $img_option, 'label'=> $img_option);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
if(empty($options)) {
|
40 |
+
$options[] = array('value'=> '', 'label'=> Mage::helper('adminhtml')->__('No cached sizes found'));
|
41 |
+
}
|
42 |
+
return $options;
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Category.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Category {
|
19 |
+
|
20 |
+
public function toOptionArray($addEmpty = true)
|
21 |
+
{
|
22 |
+
$options = array();
|
23 |
+
$collection = Mage::getResourceModel('catalog/category_collection');
|
24 |
+
$collection->addAttributeToSelect('name')->addPathFilter('^1/[0-9/]+')->load();
|
25 |
+
$cats = array();
|
26 |
+
foreach ($collection as $category) {
|
27 |
+
$cat = new stdClass();
|
28 |
+
$cat->label = $category->getName();
|
29 |
+
$cat->value = $category->getId();
|
30 |
+
$cat->level = $category->getLevel();
|
31 |
+
$cat->parentid = $category->getParentId();
|
32 |
+
$cats[$cat->value] = $cat;
|
33 |
+
}
|
34 |
+
|
35 |
+
foreach($cats as $id => $cat){
|
36 |
+
if(isset($cats[$cat->parentid])){
|
37 |
+
if(!isset($cats[$cat->parentid]->child)) {
|
38 |
+
$cats[$cat->parentid]->child = array();
|
39 |
+
}
|
40 |
+
$cats[$cat->parentid]->child[] =& $cats[$id];
|
41 |
+
}
|
42 |
+
}
|
43 |
+
foreach($cats as $id => $cat) {
|
44 |
+
if(!isset($cats[$cat->parentid])){
|
45 |
+
$stack = array($cats[$id]);
|
46 |
+
while(count($stack)>0 ){
|
47 |
+
$opt = array_pop($stack);
|
48 |
+
$option = array('label' => ($opt->level>1 ? str_repeat('- ', $opt->level-1) : '') . $opt->label, 'value' => $opt->value);
|
49 |
+
array_push($options, $option);
|
50 |
+
if(isset($opt->child) && count($opt->child)) {
|
51 |
+
foreach(array_reverse($opt->child) as $child) {
|
52 |
+
array_push($stack, $child);
|
53 |
+
}
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
unset($cats);
|
59 |
+
return $options;
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Categorytype.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Categorytype {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'include', 'label'=> Mage::helper('sooqr')->__('Include by Category'));
|
24 |
+
$type[] = array('value'=>'exclude', 'label'=> Mage::helper('sooqr')->__('Exclude by Category'));
|
25 |
+
return $type;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Condition.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Condition {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'new', 'label'=> Mage::helper('sooqr')->__('New'));
|
24 |
+
$type[] = array('value'=>'refurbished', 'label'=> Mage::helper('sooqr')->__('Refurbished'));
|
25 |
+
$type[] = array('value'=>'used', 'label'=> Mage::helper('sooqr')->__('Used'));
|
26 |
+
return $type;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Configurable.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Configurable {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$attributes = Mage::getModel("sooqr/sooqr")->getFeedAttributes();
|
23 |
+
$attributes_skip = array('id','parent_id','price');
|
24 |
+
$att = array();
|
25 |
+
foreach ($attributes as $key => $attribute) {
|
26 |
+
if(!in_array($key,$attributes_skip)) {
|
27 |
+
$att[] = array('value'=> $key, 'label'=> $key);
|
28 |
+
}
|
29 |
+
}
|
30 |
+
return $att;
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Frequency.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Frequency {
|
19 |
+
|
20 |
+
protected static $_options;
|
21 |
+
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
if(!self::$_options) {
|
25 |
+
self::$_options = array(
|
26 |
+
array('label' => Mage::helper('adminhtml')->__('Daily'), 'value' => '0'),
|
27 |
+
array('label' => Mage::helper('adminhtml')->__('Every 6 hours'), 'value' => '6'),
|
28 |
+
array('label' => Mage::helper('adminhtml')->__('Every 4 hours'), 'value' => '4'),
|
29 |
+
array('label' => Mage::helper('adminhtml')->__('Every 2 hours'), 'value' => '2'),
|
30 |
+
array('label' => Mage::helper('adminhtml')->__('Every hour'), 'value' => '1'),
|
31 |
+
);
|
32 |
+
}
|
33 |
+
return self::$_options;
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Identifier.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Identifier {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'', 'label'=> Mage::helper('adminhtml')->__('No'));
|
24 |
+
$type[] = array('value'=>'1', 'label'=> Mage::helper('adminhtml')->__('Only when less than two.. '));
|
25 |
+
$type[] = array('value'=>'2', 'label'=> Mage::helper('adminhtml')->__('Every product'));
|
26 |
+
return $type;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Images.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Images {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')->addFieldToFilter('frontend_input', 'media_image');
|
23 |
+
$type = array();
|
24 |
+
foreach($attributes as $attribute) {
|
25 |
+
if($attribute->getData('attribute_code') == 'small_image') {
|
26 |
+
$type[] = array('value' => $attribute->getData('attribute_code'), 'label'=> str_replace("'", "", $attribute->getData('frontend_label') . ' ' . Mage::helper('sooqr')->__('(recommended)')));
|
27 |
+
} else {
|
28 |
+
$type[] = array('value' => $attribute->getData('attribute_code'), 'label'=> str_replace("'", "", $attribute->getData('frontend_label')));
|
29 |
+
}
|
30 |
+
}
|
31 |
+
return $type;
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Pricemodel.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Pricemodel {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'', 'label'=> Mage::helper('adminhtml')->__('Use default price'));
|
24 |
+
$type[] = array('value'=>'min', 'label'=> Mage::helper('adminhtml')->__('Use minimum price'));
|
25 |
+
$type[] = array('value'=>'max', 'label'=> Mage::helper('adminhtml')->__('Use maximum price'));
|
26 |
+
$type[] = array('value'=>'total', 'label'=> Mage::helper('adminhtml')->__('Use total price'));
|
27 |
+
return $type;
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Productid.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Productid {
|
19 |
+
|
20 |
+
protected $_ignore = array(
|
21 |
+
'compatibility',
|
22 |
+
'gallery',
|
23 |
+
'installation',
|
24 |
+
'language_support',
|
25 |
+
'country_of_manufacture',
|
26 |
+
'links_title',
|
27 |
+
'current_version',
|
28 |
+
'custom_design',
|
29 |
+
'custom_layout_update',
|
30 |
+
'gift_message_available',
|
31 |
+
'image',
|
32 |
+
'image_label',
|
33 |
+
'media_gallery',
|
34 |
+
'msrp_display_actual_price_type',
|
35 |
+
'msrp_enabled',
|
36 |
+
'options_container',
|
37 |
+
'price_view',
|
38 |
+
'page_layout',
|
39 |
+
'samples_title',
|
40 |
+
'sku_type',
|
41 |
+
'tier_price',
|
42 |
+
'url_key',
|
43 |
+
'small_image',
|
44 |
+
'small_image_label',
|
45 |
+
'thumbnail',
|
46 |
+
'thumbnail_label',
|
47 |
+
'recurring_profile',
|
48 |
+
'version_info',
|
49 |
+
'meta_title',
|
50 |
+
'meta_keyword',
|
51 |
+
'name',
|
52 |
+
'brand',
|
53 |
+
'created_at'
|
54 |
+
);
|
55 |
+
|
56 |
+
public function toOptionArray()
|
57 |
+
{
|
58 |
+
$options = array();
|
59 |
+
$options[] = array('value' => 'entity_id', 'label' => Mage::helper('sooqr')->__('Product ID'));
|
60 |
+
$entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
|
61 |
+
$attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter('entity_type_id', $entityTypeId)->setOrder('attribute_code', 'ASC');
|
62 |
+
foreach ($attributes as $attribute){
|
63 |
+
if(($attribute->getBackendType() == 'varchar') || ($attribute->getBackendType() == 'static') || ($attribute->getBackendType() == 'text')) {
|
64 |
+
if($attribute->getFrontendLabel()) {
|
65 |
+
if(!in_array($attribute->getAttributeCode(), $this->_ignore)) {
|
66 |
+
$options[] = array('value'=> $attribute->getAttributeCode(), 'label'=> $attribute->getFrontendLabel());
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
return $options;
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Producttype.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Producttype {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'', 'label'=> Mage::helper('adminhtml')->__('No'));
|
24 |
+
$type[] = array('value'=>'full', 'label'=> Mage::helper('adminhtml')->__('Full Category Path'));
|
25 |
+
$type[] = array('value'=>'last', 'label'=> Mage::helper('adminhtml')->__('Only Deepest Categoy'));
|
26 |
+
return $type;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Resize.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Resize {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'','label'=> Mage::helper('adminhtml')->__('No'));
|
24 |
+
$type[] = array('value'=>'fixed','label'=> Mage::helper('adminhtml')->__('Yes, fixed value'));
|
25 |
+
$type[] = array('value'=>'custom','label'=> Mage::helper('adminhtml')->__('Yes, custom value'));
|
26 |
+
return $type;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Selectattribute.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Selectattribute {
|
19 |
+
|
20 |
+
protected $_ignore = array(
|
21 |
+
'ebizmarts_mark_visited',
|
22 |
+
'is_recurring',
|
23 |
+
'links_purchased_separately',
|
24 |
+
'price_view',
|
25 |
+
'status',
|
26 |
+
'tax_class_id',
|
27 |
+
'visibility',
|
28 |
+
'sooqr_condition',
|
29 |
+
'sooqr_exclude',
|
30 |
+
'shipment_type',
|
31 |
+
);
|
32 |
+
|
33 |
+
public function toOptionArray()
|
34 |
+
{
|
35 |
+
$options = array();
|
36 |
+
$options[] = array('value' => '', 'label' => Mage::helper('sooqr')->__('-- none'));
|
37 |
+
$entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
|
38 |
+
$attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter('entity_type_id', $entityTypeId)->setOrder('attribute_code', 'ASC');
|
39 |
+
foreach ($attributes as $attribute){
|
40 |
+
if($attribute->getBackendType() == 'int') {
|
41 |
+
if($attribute->getFrontendLabel()) {
|
42 |
+
if(!in_array($attribute->getAttributeCode(), $this->_ignore)) {
|
43 |
+
$options[] = array('value'=> $attribute->getAttributeCode(), 'label'=> $attribute->getFrontendLabel());
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
return $options;
|
49 |
+
}
|
50 |
+
|
51 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Status.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Status {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'1', 'label'=> Mage::helper('adminhtml')->__('Enabled'));
|
24 |
+
$type[] = array('value'=>'2', 'label'=> Mage::helper('adminhtml')->__('Disabled'));
|
25 |
+
return $type;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Textattribute.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Textattribute {
|
19 |
+
|
20 |
+
protected $_ignore = array(
|
21 |
+
'compatibility',
|
22 |
+
'gallery',
|
23 |
+
'installation',
|
24 |
+
'language_support',
|
25 |
+
'country_of_manufacture',
|
26 |
+
'links_title',
|
27 |
+
'current_version',
|
28 |
+
'custom_design',
|
29 |
+
'custom_layout_update',
|
30 |
+
'gift_message_available',
|
31 |
+
'image',
|
32 |
+
'image_label',
|
33 |
+
'media_gallery',
|
34 |
+
'msrp_display_actual_price_type',
|
35 |
+
'msrp_enabled',
|
36 |
+
'options_container',
|
37 |
+
'price_view',
|
38 |
+
'page_layout',
|
39 |
+
'samples_title',
|
40 |
+
'sku_type',
|
41 |
+
'tier_price',
|
42 |
+
'url_key',
|
43 |
+
'small_image',
|
44 |
+
'small_image_label',
|
45 |
+
'thumbnail',
|
46 |
+
'thumbnail_label',
|
47 |
+
'recurring_profile',
|
48 |
+
'version_info',
|
49 |
+
'meta_title',
|
50 |
+
'meta_keyword',
|
51 |
+
);
|
52 |
+
|
53 |
+
public function toOptionArray()
|
54 |
+
{
|
55 |
+
$options = array();
|
56 |
+
$options[] = array('value' => '', 'label' => Mage::helper('sooqr')->__('-- none'));
|
57 |
+
$entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
|
58 |
+
$attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter('entity_type_id', $entityTypeId)->setOrder('attribute_code', 'ASC');
|
59 |
+
foreach ($attributes as $attribute){
|
60 |
+
if(($attribute->getBackendType() == 'text') || ($attribute->getBackendType() == 'varchar') || ($attribute->getBackendType() == 'static')) {
|
61 |
+
if($attribute->getFrontendLabel()) {
|
62 |
+
if(!in_array($attribute->getAttributeCode(), $this->_ignore)) {
|
63 |
+
$options[] = array('value'=> $attribute->getAttributeCode(), 'label'=> $attribute->getFrontendLabel());
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
return $options;
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Varcharattribute.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Varcharattribute {
|
19 |
+
|
20 |
+
protected $_ignore = array(
|
21 |
+
'compatibility',
|
22 |
+
'gallery',
|
23 |
+
'installation',
|
24 |
+
'language_support',
|
25 |
+
'country_of_manufacture',
|
26 |
+
'links_title',
|
27 |
+
'current_version',
|
28 |
+
'custom_design',
|
29 |
+
'custom_layout_update',
|
30 |
+
'gift_message_available',
|
31 |
+
'image',
|
32 |
+
'image_label',
|
33 |
+
'media_gallery',
|
34 |
+
'msrp_display_actual_price_type',
|
35 |
+
'msrp_enabled',
|
36 |
+
'options_container',
|
37 |
+
'price_view',
|
38 |
+
'page_layout',
|
39 |
+
'samples_title',
|
40 |
+
'sku_type',
|
41 |
+
'tier_price',
|
42 |
+
'url_key',
|
43 |
+
'small_image',
|
44 |
+
'small_image_label',
|
45 |
+
'thumbnail',
|
46 |
+
'thumbnail_label',
|
47 |
+
'recurring_profile',
|
48 |
+
'version_info',
|
49 |
+
'meta_keyword',
|
50 |
+
'meta_description',
|
51 |
+
);
|
52 |
+
|
53 |
+
public function toOptionArray()
|
54 |
+
{
|
55 |
+
$options = array();
|
56 |
+
$options[] = array('value' => '', 'label' => Mage::helper('sooqr')->__('-- none'));
|
57 |
+
$entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
|
58 |
+
$attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter('entity_type_id', $entityTypeId)->setOrder('attribute_code', 'ASC');
|
59 |
+
foreach ($attributes as $attribute){
|
60 |
+
if($attribute->getBackendType() == 'varchar') {
|
61 |
+
if($attribute->getFrontendLabel()) {
|
62 |
+
if(!in_array($attribute->getAttributeCode(), $this->_ignore)) {
|
63 |
+
$options[] = array('value'=> $attribute->getAttributeCode(), 'label'=> $attribute->getFrontendLabel());
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
return $options;
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Version.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Version {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'4', 'label'=> Mage::helper('sooqr')->__('Version 4 (Responsive)'));
|
24 |
+
$type[] = array('value'=>'3', 'label'=> Mage::helper('sooqr')->__('Version 3 (Original)'));
|
25 |
+
return $type;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Visibility.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Visibility {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'1', 'label'=> Mage::helper('adminhtml')->__('Not Visible Individually'));
|
24 |
+
$type[] = array('value'=>'2', 'label'=> Mage::helper('adminhtml')->__('Catalog'));
|
25 |
+
$type[] = array('value'=>'3', 'label'=> Mage::helper('adminhtml')->__('Search'));
|
26 |
+
$type[] = array('value'=>'4', 'label'=> Mage::helper('adminhtml')->__('Catalog, Search'));
|
27 |
+
return $type;
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Adminhtml/System/Config/Source/Weight.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Adminhtml_System_Config_Source_Weight {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$type = array();
|
23 |
+
$type[] = array('value'=>'lb', 'label'=> Mage::helper('adminhtml')->__('Pounds (lb)'));
|
24 |
+
$type[] = array('value'=>'oz', 'label'=> Mage::helper('adminhtml')->__('Ounces (oz)'));
|
25 |
+
$type[] = array('value'=>'g', 'label'=> Mage::helper('adminhtml')->__('Grams (g)'));
|
26 |
+
$type[] = array('value'=>'kg', 'label'=> Mage::helper('adminhtml')->__('Kilograms (kg)'));
|
27 |
+
return $type;
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Common.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Common extends Mage_Core_Helper_Abstract {
|
19 |
+
|
20 |
+
public function getProducts($config, $limit = '')
|
21 |
+
{
|
22 |
+
$store_id = $config['store_id'];
|
23 |
+
$collection = Mage::getResourceModel('catalog/product_collection');
|
24 |
+
$collection->setStore($store_id);
|
25 |
+
$collection->addStoreFilter($store_id);
|
26 |
+
$collection->addFinalPrice();
|
27 |
+
|
28 |
+
if(!empty($config['filter_enabled'])) {
|
29 |
+
$type = $config['filter_type'];
|
30 |
+
$categories = $config['filter_cat'];
|
31 |
+
if($type && $categories) {
|
32 |
+
$table = Mage::getSingleton('core/resource')->getTableName('catalog_category_product');
|
33 |
+
if($type == 'include') {
|
34 |
+
$collection->getSelect()->join(array('cats' => $table), 'cats.product_id = e.entity_id');
|
35 |
+
$collection->getSelect()->where('cats.category_id in (' . $categories . ')');
|
36 |
+
} else {
|
37 |
+
$collection->getSelect()->join(array('cats' => $table), 'cats.product_id = e.entity_id');
|
38 |
+
$collection->getSelect()->where('cats.category_id not in (' . $categories . ')');
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
$collection->addAttributeToFilter('status', 1);
|
44 |
+
|
45 |
+
if($limit) {
|
46 |
+
$collection->setPageSize($limit);
|
47 |
+
}
|
48 |
+
|
49 |
+
if(!empty($config['conf_enabled'])) {
|
50 |
+
$collection->addAttributeToFilter('visibility', array('in' => array('1','3','4')));
|
51 |
+
} else {
|
52 |
+
$collection->addAttributeToFilter('visibility', array('in' => array('3','4')));
|
53 |
+
}
|
54 |
+
|
55 |
+
// All attributes
|
56 |
+
$attributes = array();
|
57 |
+
$attributes[] = 'url_path';
|
58 |
+
$attributes[] = 'price';
|
59 |
+
$attributes[] = 'final_price';
|
60 |
+
$attributes[] = 'price_model';
|
61 |
+
$attributes[] = 'price_type';
|
62 |
+
$attributes[] = 'special_price';
|
63 |
+
$attributes[] = 'special_from_date';
|
64 |
+
$attributes[] = 'special_to_date';
|
65 |
+
$attributes[] = 'type_id';
|
66 |
+
$attributes[] = 'tax_class_id';
|
67 |
+
$attributes[] = 'tax_percent';
|
68 |
+
$attributes[] = 'weight';
|
69 |
+
$attributes[] = 'visibility';
|
70 |
+
$attributes[] = 'type_id';
|
71 |
+
$attributes[] = 'image';
|
72 |
+
$attributes[] = 'small_image';
|
73 |
+
$attributes[] = 'thumbnail';
|
74 |
+
|
75 |
+
if(!empty($config['filter_exclude'])) {
|
76 |
+
$attributes[] = $config['filter_exclude'];
|
77 |
+
}
|
78 |
+
|
79 |
+
foreach($config['field'] as $field) {
|
80 |
+
if(isset($field['source'])) {
|
81 |
+
$attributes[] = $field['source'];
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
$collection->addAttributeToSelect($attributes);
|
86 |
+
|
87 |
+
if($limit = $config['limit']) {
|
88 |
+
if($limit > 0) {
|
89 |
+
$collection->getSelect()->limit($limit);
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
$collection->joinTable('cataloginventory/stock_item', 'product_id=entity_id', array("qty" => "qty", "stock_status" => "is_in_stock", "manage_stock" => "manage_stock", "use_config_manage_stock" => "use_config_manage_stock"))->addAttributeToSelect(array('qty', 'stock_status', 'manage_stock', 'use_config_manage_stock'));
|
94 |
+
$collection->getSelect()->group('e.entity_id');
|
95 |
+
return $collection->load();
|
96 |
+
}
|
97 |
+
|
98 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Observer.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Observer {
|
19 |
+
|
20 |
+
public function scheduledGenerateSooqr($schedule)
|
21 |
+
{
|
22 |
+
$enabled = Mage::getStoreConfig('sooqr_connect/general/enabled');
|
23 |
+
$cron = Mage::getStoreConfig('sooqr_connect/generate/cron');
|
24 |
+
$next_store = Mage::getStoreConfig('sooqr_connect/generate/cron_next');
|
25 |
+
if($enabled && $cron) {
|
26 |
+
$storeIds = Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled');
|
27 |
+
if(empty($next_store) || ($next_store >= count($storeIds))) {
|
28 |
+
$next_store = 0;
|
29 |
+
}
|
30 |
+
$store_id = $storeIds[$next_store];
|
31 |
+
$time_start = microtime(true);
|
32 |
+
$appEmulation = Mage::getSingleton('core/app_emulation');
|
33 |
+
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($store_id);
|
34 |
+
if($result = Mage::getModel('sooqr/sooqr')->generateFeed($store_id)) {
|
35 |
+
$html = '<a href="' . $result['url'] . '">' . $result['url'] . '</a><br/>Date: ' . $result['date'] . ' - Products: ' . $result['qty'] . ' - Time: ' . number_format((microtime(true) - $time_start), 4);
|
36 |
+
$config = new Mage_Core_Model_Config();
|
37 |
+
$config->saveConfig('sooqr_connect/generate/feed_result', $html, 'stores', $store_id);
|
38 |
+
}
|
39 |
+
$config->saveConfig('sooqr_connect/generate/cron_next', ($next_store + 1), 'default', 0);
|
40 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
41 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Sooqr.php
ADDED
@@ -0,0 +1,369 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Sooqr extends Magmodules_Sooqr_Model_Common {
|
19 |
+
|
20 |
+
public function generateFeed($store_id, $limit = '', $time_start)
|
21 |
+
{
|
22 |
+
$limit = $this->setMemoryLimit($store_id);
|
23 |
+
$config = $this->getFeedConfig($store_id);
|
24 |
+
$products = $this->getProducts($config, $config['limit']);
|
25 |
+
if($feed = $this->getFeedData($products, $config, $time_start)) {
|
26 |
+
return $this->saveFeed($feed, $config, 'sooqr', count($feed['products']));
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
public function getFeedData($products, $config, $time_start)
|
31 |
+
{
|
32 |
+
foreach($products as $product) {
|
33 |
+
$parent_id = Mage::helper('sooqr')->getParentData($product, $config);
|
34 |
+
if($parent_id > 0) { $parent = $products->getItemById($parent_id); } else { $parent = ''; }
|
35 |
+
if($product_data = Mage::helper('sooqr')->getProductDataRow($product, $config, $parent)) {
|
36 |
+
$product_row['content_type'] = 'product';
|
37 |
+
foreach($product_data as $key => $value) {
|
38 |
+
if((!is_array($value)) && (!empty($value) || is_numeric($value))) { $product_row[$key] = $value; }
|
39 |
+
}
|
40 |
+
if($extra_data = $this->getExtraDataFields($product_data, $config, $product)) {
|
41 |
+
$product_row = array_merge($product_row, $extra_data);
|
42 |
+
}
|
43 |
+
$feed['products'][] = $product_row;
|
44 |
+
unset($product_row);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
if(!empty($feed)) {
|
48 |
+
$return_feed = array();
|
49 |
+
$return_feed['config'] = $this->getFeedHeader($config, count($feed['products']), $time_start);
|
50 |
+
if($config['cms_pages']) {
|
51 |
+
$return_feed['products'] = array_merge($feed['products'], $this->getCmspages($config));
|
52 |
+
} else {
|
53 |
+
$return_feed['products'] = $feed['products'];
|
54 |
+
}
|
55 |
+
return $return_feed;
|
56 |
+
} else {
|
57 |
+
$return_feed = array();
|
58 |
+
$return_feed['config'] = $this->getFeedHeader($config, count($feed['products']), $time_start);
|
59 |
+
return $return_feed;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
public function getFeedConfig($storeId)
|
64 |
+
{
|
65 |
+
|
66 |
+
$config = array();
|
67 |
+
$feed = Mage::helper('sooqr');
|
68 |
+
$filename = $this->getFileName('sooqr', $storeId);
|
69 |
+
$websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
|
70 |
+
|
71 |
+
// DEFAULTS
|
72 |
+
$config['store_id'] = $storeId;
|
73 |
+
$config['website_name'] = $feed->cleanData(Mage::getModel('core/website')->load($websiteId)->getName(), 'striptags');
|
74 |
+
$config['website_url'] = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
|
75 |
+
$config['media_url'] = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
76 |
+
$config['media_image_url'] = $config['media_url'] . 'catalog' . DS . 'product';
|
77 |
+
$config['media_gallery_id'] = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', 'media_gallery');
|
78 |
+
$config['image_source'] = Mage::getStoreConfig('sooqr_connect/products/image_source', $storeId);
|
79 |
+
$config['image_resize'] = Mage::getStoreConfig('sooqr_connect/products/image_resize', $storeId);
|
80 |
+
$config['file_name'] = $filename;
|
81 |
+
$config['limit'] = Mage::getStoreConfig('sooqr_connect/generate/limit', $storeId);
|
82 |
+
$config['version'] = (string)Mage::getConfig()->getNode()->modules->Magmodules_Sooqr->version;
|
83 |
+
$config['filter_enabled'] = Mage::getStoreConfig('sooqr_connect/products/category_enabled', $storeId);
|
84 |
+
$config['filter_cat'] = Mage::getStoreConfig('sooqr_connect/products/categories', $storeId);
|
85 |
+
$config['filter_type'] = Mage::getStoreConfig('sooqr_connect/products/category_type', $storeId);
|
86 |
+
$config['cms_pages'] = Mage::getStoreConfig('sooqr_connect/products/cms_pages', $storeId);
|
87 |
+
|
88 |
+
// PRICE
|
89 |
+
$config['price_scope'] = Mage::getStoreConfig('catalog/price/scope');
|
90 |
+
$config['price_add_tax'] = Mage::getStoreConfig('sooqr_connect/products/add_tax', $storeId);
|
91 |
+
$config['price_add_tax_perc'] = Mage::getStoreConfig('sooqr_connect/products/tax_percentage', $storeId);
|
92 |
+
$config['price_grouped'] = Mage::getStoreConfig('sooqr_connect/products/grouped_price', $storeId);
|
93 |
+
$config['force_tax'] = Mage::getStoreConfig('sooqr_connect/products/force_tax', $storeId);
|
94 |
+
$config['price_rules'] = true;
|
95 |
+
$config['currency'] = Mage::app()->getStore($storeId)->getCurrentCurrencyCode();
|
96 |
+
$config['currency_allow'] = Mage::getStoreConfig('currency/options/allow', $storeId);
|
97 |
+
$config['hide_currency'] = true;
|
98 |
+
$config['base_currency_code'] = Mage::app()->getStore($storeId)->getBaseCurrencyCode();
|
99 |
+
$config['currency_data'] = $this->getCurrencies($storeId, $config['base_currency_code']);
|
100 |
+
$config['conf_enabled'] = Mage::getStoreConfig('sooqr_connect/products/conf_enabled', $storeId);
|
101 |
+
$config['markup'] = $feed->getPriceMarkup($config);
|
102 |
+
$config['use_tax'] = $feed->getTaxUsage($config);
|
103 |
+
|
104 |
+
// FIELD & CATEGORY DATA
|
105 |
+
$config['field'] = $this->getFeedAttributes($storeId, $config);
|
106 |
+
$config['category_data'] = $feed->getCategoryData($config, $storeId);
|
107 |
+
|
108 |
+
if($config['image_resize'] == 'fixed') {
|
109 |
+
$config['image_size'] = Mage::getStoreConfig('sooqr_connect/products/image_size_fixed', $storeId);
|
110 |
+
} else {
|
111 |
+
$config['image_size'] = Mage::getStoreConfig('sooqr_connect/products/image_size_custom', $storeId);
|
112 |
+
}
|
113 |
+
|
114 |
+
return $config;
|
115 |
+
}
|
116 |
+
|
117 |
+
public function getFeedAttributes($storeId = 0, $config = '')
|
118 |
+
{
|
119 |
+
$attributes = array();
|
120 |
+
$attributes['id'] = array('label' => 'id', 'source' => Mage::getStoreConfig('sooqr_connect/products/id_attribute', $storeId));
|
121 |
+
$attributes['name'] = array('label' => 'title', 'source' => Mage::getStoreConfig('sooqr_connect/products/name_attribute', $storeId));
|
122 |
+
$attributes['sku'] = array('label' => 'sku', 'source' => Mage::getStoreConfig('sooqr_connect/products/sku_attribute', $storeId));
|
123 |
+
$attributes['description'] = array('label' => 'description', 'source' => Mage::getStoreConfig('sooqr_connect/products/description_attribute', $storeId), 'action' => 'striptags');
|
124 |
+
$attributes['brand'] = array('label' => 'brand', 'source' => Mage::getStoreConfig('sooqr_connect/products/brand_attribute', $storeId));
|
125 |
+
$attributes['product_url'] = array('label' => 'url', 'source' => '');
|
126 |
+
$attributes['image_link'] = array('label' => 'image_link', 'source' => Mage::getStoreConfig('sooqr_connect/products/image_source', $storeId));
|
127 |
+
$attributes['price'] = array('label' => 'price', 'source' => '');
|
128 |
+
$attributes['parent_id'] = array('label' => 'assoc_id', 'source' =>'entity_id', 'parent' => 1);
|
129 |
+
$attributes['qty'] = array('label' => 'stock', 'source' => 'qty', 'action' => 'round');
|
130 |
+
$attributes['stock_status'] = array('label' => 'stock_status', 'source' => 'stock_status');
|
131 |
+
$attributes['type'] = array('label' => 'product_object_type', 'source' => 'type_id');
|
132 |
+
$attributes['visibility'] = array('label' => 'visibility', 'source' => 'visibility');
|
133 |
+
$attributes['status'] = array('label' => 'status', 'source' => 'status');
|
134 |
+
$attributes['categories'] = array('label' => 'categories', 'source' => '', 'parent' => 1);
|
135 |
+
|
136 |
+
if($extra_fields = @unserialize(Mage::getStoreConfig('sooqr_connect/products/extra', $storeId))) {
|
137 |
+
foreach($extra_fields as $extra_field) {
|
138 |
+
$attributes[$extra_field['attribute']] = array('label' => $extra_field['attribute'], 'source' => $extra_field['attribute'], 'action' => 'striptags');
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
return Mage::helper('sooqr')->addAttributeData($attributes, $config);
|
143 |
+
}
|
144 |
+
|
145 |
+
public function getFileName($type, $storeId)
|
146 |
+
{
|
147 |
+
if(!$fileName = Mage::getStoreConfig('sooqr_connect/generate/filename', $storeId)) {
|
148 |
+
$fileName = $type . '.xml';
|
149 |
+
}
|
150 |
+
|
151 |
+
if(substr($fileName, -3) != 'xml') {
|
152 |
+
$fileName = $fileName . '-' . $storeId. '.xml';
|
153 |
+
} else {
|
154 |
+
$fileName = substr($fileName, 0, -4) . '-' . $storeId. '.xml';
|
155 |
+
}
|
156 |
+
|
157 |
+
if(!file_exists(Mage::getBaseDir('media') . DS . $type)) {
|
158 |
+
mkdir(Mage::getBaseDir('media') . DS . $type);
|
159 |
+
}
|
160 |
+
|
161 |
+
$fileName = Mage::getBaseDir() . DS . 'media' . DS . $type . DS . $fileName;
|
162 |
+
if(file_exists($fileName)) {
|
163 |
+
unlink($fileName);
|
164 |
+
}
|
165 |
+
return $fileName;
|
166 |
+
}
|
167 |
+
|
168 |
+
public function saveFeed($feed, $config, $type, $count)
|
169 |
+
{
|
170 |
+
$encoding = Mage::getStoreConfig('design/head/default_charset');
|
171 |
+
$xml_data = new SimpleXMLElement("<rss xmlns:sqr=\"http://base.sooqr.com/ns/1.0\" version=\"2.0\" encoding=\"" . $encoding . "\"></rss>");
|
172 |
+
$this->getArray2Xml($feed, $xml_data);
|
173 |
+
$dom = dom_import_simplexml($xml_data)->ownerDocument;
|
174 |
+
$dom->encoding = $encoding;
|
175 |
+
$dom->formatOutput = true;
|
176 |
+
$xml_feed = $dom->saveXML();
|
177 |
+
if (!file_put_contents($config['file_name'], $xml_feed)) {
|
178 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper($type)->__('File writing not succeeded'));
|
179 |
+
} else {
|
180 |
+
$filename = $config['file_name'];
|
181 |
+
$store_id = $config['store_id'];
|
182 |
+
$local_path = Mage::getBaseDir() . DS . 'media' . DS . $type . DS;
|
183 |
+
$filename = str_replace($local_path, '', $filename);
|
184 |
+
$websiteUrl = Mage::app()->getStore($store_id)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
185 |
+
$feed_url = $websiteUrl . $type . DS . $filename;
|
186 |
+
$result = array();
|
187 |
+
$result['url'] = $feed_url;
|
188 |
+
$result['shop'] = Mage::app()->getStore($store_id)->getCode();
|
189 |
+
$result['date'] = date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time()));
|
190 |
+
$result['qty'] = $count;
|
191 |
+
return $result;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
protected function getPrices($data, $currency, $config)
|
196 |
+
{
|
197 |
+
$prices = array();
|
198 |
+
$prices['currency'] = $currency;
|
199 |
+
|
200 |
+
foreach($config['currency_data'] as $key => $value) {
|
201 |
+
if($currency == $key) {
|
202 |
+
if(isset($data['sales_price'])) {
|
203 |
+
$prices['normal_price'] = $data['regular_price'];
|
204 |
+
$prices['price'] = $data['sales_price'];
|
205 |
+
} else {
|
206 |
+
$prices['price'] = $data['price'];
|
207 |
+
}
|
208 |
+
} else {
|
209 |
+
if(isset($data['sales_price'])) {
|
210 |
+
$prices['normal_price_' . strtolower($key)] = round(($data['regular_price'] * $value), 2);
|
211 |
+
$prices['price_' . strtolower($key)] = round(($data['sales_price'] * $value), 2);
|
212 |
+
} else {
|
213 |
+
$prices['price_' . strtolower($key)] = round(($data['price'] * $value), 2);
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
return $prices;
|
218 |
+
}
|
219 |
+
|
220 |
+
protected function getAssocId($data)
|
221 |
+
{
|
222 |
+
if(empty($data['assoc_id'])) {
|
223 |
+
$assoc_id = array();
|
224 |
+
$assoc_id['assoc_id'] = $data['id'];
|
225 |
+
return $assoc_id;
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
protected function getCategoryData($product_data, $config)
|
230 |
+
{
|
231 |
+
$category = array();
|
232 |
+
if(!empty($product_data['categories'])) {
|
233 |
+
foreach($product_data['categories'] as $cat) {
|
234 |
+
if(!empty($cat['path'])) {
|
235 |
+
$i = 0;
|
236 |
+
foreach($cat['path'] as $catpath) {
|
237 |
+
$category[$i][] = $catpath;
|
238 |
+
$i++;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
}
|
243 |
+
$category_array = array(); $i = 0;
|
244 |
+
if(!empty($category)) {
|
245 |
+
foreach($category as $cat) {
|
246 |
+
$category_array['category' . $i] = array_unique($cat);
|
247 |
+
$i++;
|
248 |
+
}
|
249 |
+
}
|
250 |
+
return $category_array;
|
251 |
+
}
|
252 |
+
|
253 |
+
protected function getExtraDataFields($product_data, $config, $product)
|
254 |
+
{
|
255 |
+
$_extra = array();
|
256 |
+
if($_category_data = $this->getCategoryData($product_data, $config)) {
|
257 |
+
$_extra = array_merge($_extra, $_category_data);
|
258 |
+
}
|
259 |
+
if($_prices = $this->getPrices($product_data['price'], $config['currency'], $config)) {
|
260 |
+
$_extra = array_merge($_extra, $_prices);
|
261 |
+
}
|
262 |
+
if($_assoc_id = $this->getAssocId($product_data)) {
|
263 |
+
$_extra = array_merge($_extra, $_assoc_id);
|
264 |
+
}
|
265 |
+
return $_extra;
|
266 |
+
}
|
267 |
+
|
268 |
+
protected function getFeedHeader($config, $count, $time_start)
|
269 |
+
{
|
270 |
+
$header = array();
|
271 |
+
$header['system'] = 'Magento';
|
272 |
+
$header['extension'] = 'Magmodules_Sooqr';
|
273 |
+
$header['extension_version'] = $config['version'];
|
274 |
+
$header['store'] = $config['website_name'];
|
275 |
+
$header['url'] = $config['website_url'];
|
276 |
+
$header['products_total'] = $count;
|
277 |
+
$header['products_limit'] = $config['limit'];
|
278 |
+
$header['processing_time'] = number_format((microtime(true) - $time_start), 4);
|
279 |
+
return $header;
|
280 |
+
}
|
281 |
+
|
282 |
+
public function getInstallation()
|
283 |
+
{
|
284 |
+
$json = array();
|
285 |
+
$json['search']['enabled'] = '0';
|
286 |
+
$store_ids = Mage::helper('sooqr')->getStoreIds('sooqr_connect/generate/enabled');
|
287 |
+
foreach($store_ids as $store_id) {
|
288 |
+
$media_url = Mage::app()->getStore($store_id)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
289 |
+
if(!$file_name = Mage::getStoreConfig('sooqr_connect/generate/filename', $store_id)) {
|
290 |
+
$file_name = 'soorq.xml';
|
291 |
+
}
|
292 |
+
if(substr($file_name, -3) != 'xml') {
|
293 |
+
$file_name = $file_name . '-' . $store_id. '.xml';
|
294 |
+
} else {
|
295 |
+
$file_name = substr($file_name, 0, -4) . '-' . $store_id. '.xml';
|
296 |
+
}
|
297 |
+
$name = Mage::app()->getStore($store_id)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
|
298 |
+
$name = str_replace(array('https://','http://','www'), '', $name);
|
299 |
+
|
300 |
+
$json['feeds'][$store_id]['name'] = $name;
|
301 |
+
$json['feeds'][$store_id]['feed_url'] = $media_url . DS . 'sooqr' . DS . $file_name;
|
302 |
+
$json['feeds'][$store_id]['currency'] = Mage::app()->getStore($store_id)->getBaseCurrencyCode();
|
303 |
+
$json['feeds'][$store_id]['locale'] = Mage::getStoreConfig('general/locale/code', $store_id) ;
|
304 |
+
$json['feeds'][$store_id]['country'] = Mage::getStoreConfig('general/country/default', $store_id);
|
305 |
+
$json['feeds'][$store_id]['timezone'] = Mage::getStoreConfig('general/locale/timezone', $store_id);
|
306 |
+
$json['feeds'][$store_id]['system'] = Mage::getStoreConfig('general/locale/timezone', $store_id);
|
307 |
+
$json['feeds'][$store_id]['extension'] = 'Magmodules_Sooqr';
|
308 |
+
$json['feeds'][$store_id]['extension_version'] = (string)Mage::getConfig()->getNode()->modules->Magmodules_Sooqr->version;
|
309 |
+
}
|
310 |
+
return $json;
|
311 |
+
}
|
312 |
+
|
313 |
+
public function getCmspages($config)
|
314 |
+
{
|
315 |
+
$cmspages = array();
|
316 |
+
$pages = Mage::getModel('cms/page')->getCollection()->addStoreFilter($config['store_id'])->addFieldToFilter('is_active', 1)->addFieldToFilter('identifier',array(array('nin'=>array('no-route','enable-cookies'))));
|
317 |
+
foreach($pages as $page) {
|
318 |
+
$cmspages[] = array('content_type' => 'cms', 'id' => 'CMS-' . $page->getId(), 'title' => $page->getTitle(), 'content' => Mage::helper('sooqr')->cleanData($page->getContent(), 'striptags'), 'url' => $config['website_url'] . $page->getIdentifier());
|
319 |
+
}
|
320 |
+
return $cmspages;
|
321 |
+
}
|
322 |
+
|
323 |
+
function getArray2Xml($array, &$xml_user_info)
|
324 |
+
{
|
325 |
+
foreach($array as $key => $value) {
|
326 |
+
if(is_array($value)) {
|
327 |
+
if(!is_numeric($key)) {
|
328 |
+
if(substr($key,0,8) == 'category') {
|
329 |
+
$key = 'sqr:' . $key;
|
330 |
+
$subnode = $xml_user_info->addChild("$key", "", "http://base.sooqr.com/ns/1.0");
|
331 |
+
$this->getArray2Xml($value, $subnode);
|
332 |
+
} else {
|
333 |
+
$subnode = $xml_user_info->addChild("$key");
|
334 |
+
$this->getArray2Xml($value, $subnode);
|
335 |
+
}
|
336 |
+
} else{
|
337 |
+
$subnode = $xml_user_info->addChild("item");
|
338 |
+
$this->getArray2Xml($value, $subnode);
|
339 |
+
}
|
340 |
+
} else {
|
341 |
+
if(is_numeric($key)) {
|
342 |
+
$xml_user_info->addChild("node", htmlspecialchars("$value"), "http://base.sooqr.com/ns/1.0");
|
343 |
+
} else {
|
344 |
+
$xml_user_info->addChild("$key", htmlspecialchars("$value"), "http://base.sooqr.com/ns/1.0");
|
345 |
+
}
|
346 |
+
}
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
function getCurrencies($storeId, $base_currency)
|
351 |
+
{
|
352 |
+
$allow = explode(',', Mage::getStoreConfig('currency/options/allow', $storeId));
|
353 |
+
$rates = Mage::getModel('directory/currency')->getCurrencyRates($base_currency, array_values($allow));
|
354 |
+
return $rates;
|
355 |
+
}
|
356 |
+
|
357 |
+
protected function setMemoryLimit($storeId)
|
358 |
+
{
|
359 |
+
if(Mage::getStoreConfig('sooqr_connect/generate/overwrite', $storeId)) {
|
360 |
+
if($memory_limit = Mage::getStoreConfig('sooqr_connect/generate/memory_limit', $storeId)) {
|
361 |
+
ini_set('memory_limit', $memory_limit);
|
362 |
+
}
|
363 |
+
if($max_execution_time = Mage::getStoreConfig('sooqr_connect/generate/max_execution_time', $storeId)) {
|
364 |
+
ini_set('max_execution_time', $max_execution_time);
|
365 |
+
}
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Source/Action.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Source_Action {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$position = array();
|
23 |
+
$position[] = array('value'=> '', 'label'=> Mage::helper('sooqr')->__('-- None'));
|
24 |
+
$position[] = array('value'=> 'strip_tags', 'label'=> Mage::helper('sooqr')->__('Strip Tags'));
|
25 |
+
return $position;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Source/Attribute.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Source_Attribute {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$optionArray = array();
|
23 |
+
$optionArray[] = array('label' => Mage::helper('sooqr')->__('- Product ID'), 'value' => 'entity_id');
|
24 |
+
$optionArray[] = array('label' => Mage::helper('sooqr')->__('- Final Price'), 'value' => 'final_price');
|
25 |
+
|
26 |
+
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')
|
27 |
+
->addVisibleFilter()
|
28 |
+
->addFieldToFilter('backend_type', array('text', 'select', 'textarea', 'date', 'int', 'boolean', 'static', 'varchar'));
|
29 |
+
|
30 |
+
foreach($attributes as $attribute) {
|
31 |
+
$optionArray[] = array(
|
32 |
+
'label' => str_replace("'", "", $attribute->getData('frontend_label')),
|
33 |
+
'value' => $attribute->getData('attribute_code')
|
34 |
+
);
|
35 |
+
}
|
36 |
+
return $optionArray;
|
37 |
+
}
|
38 |
+
|
39 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Source/Countries.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Source_Countries {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
return Mage::getResourceModel('directory/country_collection')->loadData()->toOptionArray(true);
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/Source/Tax.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_Source_Tax {
|
19 |
+
|
20 |
+
public function toOptionArray()
|
21 |
+
{
|
22 |
+
$position = array();
|
23 |
+
$position[] = array('value'=> '', 'label'=> Mage::helper('sooqr')->__('No'));
|
24 |
+
$position[] = array('value'=> 'incl', 'label'=> Mage::helper('sooqr')->__('Force including Tax'));
|
25 |
+
$position[] = array('value'=> 'excl', 'label'=> Mage::helper('sooqr')->__('Force excluding Tax'));
|
26 |
+
return $position;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/Magmodules/Sooqr/Model/System/Config/Backend/Design/Extra.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Model_System_Config_Backend_Design_Extra extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array {
|
19 |
+
|
20 |
+
protected function _beforeSave()
|
21 |
+
{
|
22 |
+
$value = $this->getValue();
|
23 |
+
if(is_array($value)) {
|
24 |
+
unset($value['__empty']);
|
25 |
+
if(count($value)) {
|
26 |
+
$value = $this->orderData($value, 'attribute');
|
27 |
+
$keys = array();
|
28 |
+
for($i=0; $i < count($value); $i++){
|
29 |
+
$keys[] = 'fields_' . uniqid();
|
30 |
+
}
|
31 |
+
|
32 |
+
foreach($value as $key => $field){
|
33 |
+
$attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', $field['attribute']);
|
34 |
+
$value[$key]['attribute'] = $field['attribute'];
|
35 |
+
$value[$key]['type'] = $attribute->getFrontendInput();
|
36 |
+
}
|
37 |
+
$value = array_combine($keys, array_values($value));
|
38 |
+
}
|
39 |
+
}
|
40 |
+
$this->setValue($value);
|
41 |
+
parent::_beforeSave();
|
42 |
+
}
|
43 |
+
|
44 |
+
function orderData($data, $sort)
|
45 |
+
{
|
46 |
+
$code = "return strnatcmp(\$a['$sort'], \$b['$sort']);";
|
47 |
+
usort($data, create_function('$a,$b', $code));
|
48 |
+
return $data;
|
49 |
+
}
|
50 |
+
|
51 |
+
}
|
app/code/community/Magmodules/Sooqr/controllers/Adminhtml/SooqrController.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_Adminhtml_SooqrController extends Mage_Adminhtml_Controller_Action {
|
19 |
+
|
20 |
+
public function generateManualAction($store_id = '')
|
21 |
+
{
|
22 |
+
$store_id = $this->getRequest()->getParam('store_id');
|
23 |
+
if(!empty($store_id)) {
|
24 |
+
$time_start = microtime(true);
|
25 |
+
$appEmulation = Mage::getSingleton('core/app_emulation');
|
26 |
+
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($store_id);
|
27 |
+
if($result = Mage::getModel('sooqr/sooqr')->generateFeed($store_id, '', $time_start)) {
|
28 |
+
$html = '<a href="' . $result['url'] . '">' . $result['url'] . '</a><br/>Date: ' . $result['date'] . ' - Products: ' . $result['qty'] . ' - Time: ' . number_format((microtime(true) - $time_start), 4);
|
29 |
+
$config = new Mage_Core_Model_Config();
|
30 |
+
$config->saveConfig('sooqr_connect/generate/feed_result', $html, 'stores', $store_id);
|
31 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('sooqr')->__('Generated feed with %s products', $result['qty']));
|
32 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
33 |
+
}
|
34 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
35 |
+
}
|
36 |
+
$this->_redirect('adminhtml/system_config/edit/section/sooqr_connect');
|
37 |
+
}
|
38 |
+
|
39 |
+
public function addToFlatAction()
|
40 |
+
{
|
41 |
+
$non_flat_attributes = Mage::helper('sooqr')->checkFlatCatalog(Mage::getModel("sooqr/sooqr")->getFeedAttributes());
|
42 |
+
foreach($non_flat_attributes as $key => $value) {
|
43 |
+
$_attribute = Mage::getModel('catalog/resource_eav_attribute')->load($key)->setUsedInProductListing(1)->save();
|
44 |
+
}
|
45 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('sooqr')->__('Attributes added to Flat Catalog, please reindex Product Flat Data.'));
|
46 |
+
$this->_redirect('adminhtml/system_config/edit/section/sooqr_connect');
|
47 |
+
}
|
48 |
+
|
49 |
+
protected function _isAllowed()
|
50 |
+
{
|
51 |
+
return Mage::getSingleton('admin/session')->isAllowed('admin/sooqr/sooqr');
|
52 |
+
}
|
53 |
+
|
54 |
+
}
|
app/code/community/Magmodules/Sooqr/controllers/InstallationController.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Sooqr
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Sooqr_InstallationController extends Mage_Core_Controller_Front_Action {
|
19 |
+
|
20 |
+
public function indexAction()
|
21 |
+
{
|
22 |
+
if(Mage::getStoreConfig('sooqr_connect/general/enabled')) {
|
23 |
+
if($feed = Mage::getModel('sooqr/sooqr')->getInstallation()) {
|
24 |
+
$this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true);
|
25 |
+
$this->getResponse()->setBody(json_encode($feed));
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Magmodules/Sooqr/etc/adminhtml.xml
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
5 |
+
* =============================================================
|
6 |
+
* NOTICE OF LICENSE [Single domain license]
|
7 |
+
* This source file is subject to the EULA that is
|
8 |
+
* available through the world-wide-web at:
|
9 |
+
* http://www.magmodules.eu/license-agreement/
|
10 |
+
* =============================================================
|
11 |
+
* @category Magmodules
|
12 |
+
* @package Magmodules_Sooqr
|
13 |
+
* @author Magmodules <info@magmodules.eu>
|
14 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
15 |
+
* @license http://www.magmodules.eu/license-agreement/
|
16 |
+
* =============================================================
|
17 |
+
*/
|
18 |
+
-->
|
19 |
+
<config>
|
20 |
+
<acl>
|
21 |
+
<resources>
|
22 |
+
<admin>
|
23 |
+
<children>
|
24 |
+
<system>
|
25 |
+
<children>
|
26 |
+
<config>
|
27 |
+
<children>
|
28 |
+
<sooqr_connect translate="title" module="sooqr">
|
29 |
+
<title>Sooqr</title>
|
30 |
+
</sooqr_connect>
|
31 |
+
</children>
|
32 |
+
</config>
|
33 |
+
</children>
|
34 |
+
</system>
|
35 |
+
<sooqr module="sooqr">
|
36 |
+
<title>Sooqr</title>
|
37 |
+
<sort_order>200</sort_order>
|
38 |
+
<children>
|
39 |
+
<sooqr module="sooqr">
|
40 |
+
<title>Sooqr Manual Feed Generation</title>
|
41 |
+
<sort_order>100</sort_order>
|
42 |
+
<action>adminhtml/sooqr/</action>
|
43 |
+
</sooqr>
|
44 |
+
</children>
|
45 |
+
</sooqr>
|
46 |
+
</children>
|
47 |
+
</admin>
|
48 |
+
</resources>
|
49 |
+
</acl>
|
50 |
+
</config>
|
app/code/community/Magmodules/Sooqr/etc/config.xml
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
5 |
+
* =============================================================
|
6 |
+
* NOTICE OF LICENSE [Single domain license]
|
7 |
+
* This source file is subject to the EULA that is
|
8 |
+
* available through the world-wide-web at:
|
9 |
+
* http://www.magmodules.eu/license-agreement/
|
10 |
+
* =============================================================
|
11 |
+
* @category Magmodules
|
12 |
+
* @package Magmodules_Sooqr
|
13 |
+
* @author Magmodules <info@magmodules.eu>
|
14 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
15 |
+
* @license http://www.magmodules.eu/license-agreement/
|
16 |
+
* =============================================================
|
17 |
+
*/
|
18 |
+
-->
|
19 |
+
<config>
|
20 |
+
<modules>
|
21 |
+
<Magmodules_Sooqr>
|
22 |
+
<version>1.0.0</version>
|
23 |
+
</Magmodules_Sooqr>
|
24 |
+
</modules>
|
25 |
+
<global>
|
26 |
+
<helpers>
|
27 |
+
<sooqr>
|
28 |
+
<class>Magmodules_Sooqr_Helper</class>
|
29 |
+
</sooqr>
|
30 |
+
</helpers>
|
31 |
+
<blocks>
|
32 |
+
<sooqr>
|
33 |
+
<class>Magmodules_Sooqr_Block</class>
|
34 |
+
</sooqr>
|
35 |
+
</blocks>
|
36 |
+
<models>
|
37 |
+
<sooqr>
|
38 |
+
<class>Magmodules_Sooqr_Model</class>
|
39 |
+
</sooqr>
|
40 |
+
</models>
|
41 |
+
</global>
|
42 |
+
<frontend>
|
43 |
+
<routers>
|
44 |
+
<sooqr>
|
45 |
+
<use>standard</use>
|
46 |
+
<args>
|
47 |
+
<module>Magmodules_Sooqr</module>
|
48 |
+
<frontName>sooqr</frontName>
|
49 |
+
</args>
|
50 |
+
</sooqr>
|
51 |
+
</routers>
|
52 |
+
<layout>
|
53 |
+
<updates>
|
54 |
+
<sooqr>
|
55 |
+
<file>magmodules_sooqr.xml</file>
|
56 |
+
</sooqr>
|
57 |
+
</updates>
|
58 |
+
</layout>
|
59 |
+
<translate>
|
60 |
+
<modules>
|
61 |
+
<Magmodules_Sooq>
|
62 |
+
<files>
|
63 |
+
<default>Magmodules_Sooqr.csv</default>
|
64 |
+
</files>
|
65 |
+
</Magmodules_Sooq>
|
66 |
+
</modules>
|
67 |
+
</translate>
|
68 |
+
<product>
|
69 |
+
<collection>
|
70 |
+
<attributes>
|
71 |
+
<image />
|
72 |
+
</attributes>
|
73 |
+
</collection>
|
74 |
+
</product>
|
75 |
+
</frontend>
|
76 |
+
<admin>
|
77 |
+
<routers>
|
78 |
+
<adminhtml>
|
79 |
+
<args>
|
80 |
+
<modules>
|
81 |
+
<magmodules_sooqr after="Mage_Adminhtml">Magmodules_Sooqr_Adminhtml</magmodules_sooqr>
|
82 |
+
</modules>
|
83 |
+
</args>
|
84 |
+
</adminhtml>
|
85 |
+
</routers>
|
86 |
+
</admin>
|
87 |
+
<adminhtml>
|
88 |
+
<translate>
|
89 |
+
<modules>
|
90 |
+
<magmodules_sooqr>
|
91 |
+
<files>
|
92 |
+
<default>Magmodules_Sooqr.csv</default>
|
93 |
+
</files>
|
94 |
+
</magmodules_sooqr>
|
95 |
+
</modules>
|
96 |
+
</translate>
|
97 |
+
</adminhtml>
|
98 |
+
<default>
|
99 |
+
<sooqr_connect>
|
100 |
+
<general>
|
101 |
+
<enabled>0</enabled>
|
102 |
+
<frontend_version>4</frontend_version>
|
103 |
+
</general>
|
104 |
+
<products>
|
105 |
+
<id_attribute>id</id_attribute>
|
106 |
+
<name_attribute>name</name_attribute>
|
107 |
+
<sku_attribute>sku</sku_attribute>
|
108 |
+
<description_attribute>description</description_attribute>
|
109 |
+
<brand_attribute>manufacturer</brand_attribute>
|
110 |
+
<image_source>small_image</image_source>
|
111 |
+
</products>
|
112 |
+
<generate>
|
113 |
+
<enabled>1</enabled>
|
114 |
+
<filename>sooqr-datafeed.xml</filename>
|
115 |
+
<cron>0</cron>
|
116 |
+
<limit>10</limit>
|
117 |
+
<cron_schedule>0 0 * * *</cron_schedule>
|
118 |
+
<memory_limit>1024M</memory_limit>
|
119 |
+
<max_execution_time>300</max_execution_time>
|
120 |
+
<overwrite>0</overwrite>
|
121 |
+
</generate>
|
122 |
+
</sooqr_connect>
|
123 |
+
</default>
|
124 |
+
<crontab>
|
125 |
+
<jobs>
|
126 |
+
<sooqr_generate>
|
127 |
+
<schedule><config_path>sooqr/generate/cron_schedule</config_path></schedule>
|
128 |
+
<run><model>sooqr/observer::scheduledGenerateSooqr</model></run>
|
129 |
+
</sooqr_generate>
|
130 |
+
</jobs>
|
131 |
+
</crontab>
|
132 |
+
</config>
|
app/code/community/Magmodules/Sooqr/etc/system.xml
ADDED
@@ -0,0 +1,615 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
5 |
+
* =============================================================
|
6 |
+
* NOTICE OF LICENSE [Single domain license]
|
7 |
+
* This source file is subject to the EULA that is
|
8 |
+
* available through the world-wide-web at:
|
9 |
+
* http://www.magmodules.eu/license-agreement/
|
10 |
+
* =============================================================
|
11 |
+
* @category Magmodules
|
12 |
+
* @package Magmodules_Sooqr
|
13 |
+
* @author Magmodules <info@magmodules.eu>
|
14 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
15 |
+
* @license http://www.magmodules.eu/license-agreement/
|
16 |
+
* =============================================================
|
17 |
+
*/
|
18 |
+
-->
|
19 |
+
<config>
|
20 |
+
<tabs>
|
21 |
+
<magmodules translate="label" module="sooqr">
|
22 |
+
<label>Magmodules</label>
|
23 |
+
<sort_order>200</sort_order>
|
24 |
+
</magmodules>
|
25 |
+
</tabs>
|
26 |
+
<sections>
|
27 |
+
<sooqr_connect translate="label" module="sooqr">
|
28 |
+
<label>Sooqr Connect</label>
|
29 |
+
<tab>magmodules</tab>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>119</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<groups>
|
36 |
+
<info>
|
37 |
+
<frontend_model>sooqr/adminhtml_widget_info_info</frontend_model>
|
38 |
+
<sort_order>1</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
</info>
|
43 |
+
<general translate="label" module="sooqr">
|
44 |
+
<label>General</label>
|
45 |
+
<frontend_type>text</frontend_type>
|
46 |
+
<sort_order>2</sort_order>
|
47 |
+
<show_in_default>1</show_in_default>
|
48 |
+
<show_in_website>1</show_in_website>
|
49 |
+
<show_in_store>1</show_in_store>
|
50 |
+
<expanded>1</expanded>
|
51 |
+
<fields>
|
52 |
+
<note translate="label">
|
53 |
+
<label><![CDATA[Set the general settings to connect your store with the Sooqr API.]]></label>
|
54 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_note</frontend_model>
|
55 |
+
<sort_order>1</sort_order>
|
56 |
+
<show_in_default>1</show_in_default>
|
57 |
+
<show_in_website>1</show_in_website>
|
58 |
+
<show_in_store>1</show_in_store>
|
59 |
+
</note>
|
60 |
+
<version translate="label">
|
61 |
+
<label>Extension Version</label>
|
62 |
+
<frontend_type>text</frontend_type>
|
63 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_version</frontend_model>
|
64 |
+
<sort_order>2</sort_order>
|
65 |
+
<show_in_default>1</show_in_default>
|
66 |
+
<show_in_website>0</show_in_website>
|
67 |
+
<show_in_store>0</show_in_store>
|
68 |
+
</version>
|
69 |
+
<enabled translate="label">
|
70 |
+
<label>Enabled</label>
|
71 |
+
<frontend_type>select</frontend_type>
|
72 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
73 |
+
<sort_order>3</sort_order>
|
74 |
+
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>1</show_in_website>
|
76 |
+
<show_in_store>1</show_in_store>
|
77 |
+
</enabled>
|
78 |
+
<api_heading translate="label">
|
79 |
+
<label>API Details</label>
|
80 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
81 |
+
<sort_order>10</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>1</show_in_store>
|
85 |
+
</api_heading>
|
86 |
+
<account_id translate="label">
|
87 |
+
<label>Sooqr Account ID</label>
|
88 |
+
<frontend_type>text</frontend_type>
|
89 |
+
<sort_order>11</sort_order>
|
90 |
+
<show_in_default>1</show_in_default>
|
91 |
+
<show_in_website>1</show_in_website>
|
92 |
+
<show_in_store>1</show_in_store>
|
93 |
+
<tooltip>You can find your Sooqr Account ID in your Sooqr account, you can find the link in the information box at the top of this page.</tooltip>
|
94 |
+
</account_id>
|
95 |
+
<api_key translate="label">
|
96 |
+
<label>Sooqr API Key</label>
|
97 |
+
<frontend_type>text</frontend_type>
|
98 |
+
<sort_order>12</sort_order>
|
99 |
+
<show_in_default>1</show_in_default>
|
100 |
+
<show_in_website>1</show_in_website>
|
101 |
+
<show_in_store>1</show_in_store>
|
102 |
+
<tooltip>You can find your Sooqr API Key in your Sooqr account, you can find the link in the information box at the top of this page.</tooltip>
|
103 |
+
</api_key>
|
104 |
+
<frontend_heading translate="label">
|
105 |
+
<label>Frontend Settings</label>
|
106 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
107 |
+
<sort_order>20</sort_order>
|
108 |
+
<show_in_default>1</show_in_default>
|
109 |
+
<show_in_website>1</show_in_website>
|
110 |
+
<show_in_store>1</show_in_store>
|
111 |
+
</frontend_heading>
|
112 |
+
<frontend_enabled translate="label">
|
113 |
+
<label>Enable</label>
|
114 |
+
<frontend_type>select</frontend_type>
|
115 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
116 |
+
<sort_order>21</sort_order>
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
<show_in_website>1</show_in_website>
|
119 |
+
<show_in_store>1</show_in_store>
|
120 |
+
</frontend_enabled>
|
121 |
+
<statistics translate="label">
|
122 |
+
<label>Statistics</label>
|
123 |
+
<frontend_type>select</frontend_type>
|
124 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
125 |
+
<sort_order>22</sort_order>
|
126 |
+
<show_in_default>1</show_in_default>
|
127 |
+
<show_in_website>1</show_in_website>
|
128 |
+
<show_in_store>1</show_in_store>
|
129 |
+
</statistics>
|
130 |
+
<advanced_heading translate="label">
|
131 |
+
<label>Advanced Settings</label>
|
132 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
133 |
+
<sort_order>30</sort_order>
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
<show_in_website>1</show_in_website>
|
136 |
+
<show_in_store>1</show_in_store>
|
137 |
+
</advanced_heading>
|
138 |
+
<parent translate="label">
|
139 |
+
<label>Parent HTML node</label>
|
140 |
+
<frontend_type>text</frontend_type>
|
141 |
+
<sort_order>31</sort_order>
|
142 |
+
<show_in_default>1</show_in_default>
|
143 |
+
<show_in_website>1</show_in_website>
|
144 |
+
<show_in_store>1</show_in_store>
|
145 |
+
</parent>
|
146 |
+
<staging translate="label">
|
147 |
+
<label>Staging Environment</label>
|
148 |
+
<frontend_type>select</frontend_type>
|
149 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
150 |
+
<sort_order>32</sort_order>
|
151 |
+
<show_in_default>1</show_in_default>
|
152 |
+
<show_in_website>1</show_in_website>
|
153 |
+
<show_in_store>1</show_in_store>
|
154 |
+
</staging>
|
155 |
+
<debugging translate="label">
|
156 |
+
<label>Enable Debugging</label>
|
157 |
+
<frontend_type>select</frontend_type>
|
158 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
159 |
+
<sort_order>33</sort_order>
|
160 |
+
<show_in_default>1</show_in_default>
|
161 |
+
<show_in_website>1</show_in_website>
|
162 |
+
<show_in_store>1</show_in_store>
|
163 |
+
</debugging>
|
164 |
+
<frontend_version translate="label">
|
165 |
+
<label>Frontend Version</label>
|
166 |
+
<frontend_type>select</frontend_type>
|
167 |
+
<source_model>sooqr/adminhtml_system_config_source_version</source_model>
|
168 |
+
<sort_order>34</sort_order>
|
169 |
+
<show_in_default>1</show_in_default>
|
170 |
+
<show_in_website>1</show_in_website>
|
171 |
+
<show_in_store>1</show_in_store>
|
172 |
+
</frontend_version>
|
173 |
+
<custom_js translate="label">
|
174 |
+
<label>Custom JS</label>
|
175 |
+
<frontend_type>textarea</frontend_type>
|
176 |
+
<sort_order>35</sort_order>
|
177 |
+
<show_in_default>1</show_in_default>
|
178 |
+
<show_in_website>1</show_in_website>
|
179 |
+
<show_in_store>1</show_in_store>
|
180 |
+
</custom_js>
|
181 |
+
</fields>
|
182 |
+
</general>
|
183 |
+
<products translate="label" module="sooqr">
|
184 |
+
<label>Product Data</label>
|
185 |
+
<frontend_type>text</frontend_type>
|
186 |
+
<sort_order>3</sort_order>
|
187 |
+
<show_in_default>1</show_in_default>
|
188 |
+
<show_in_website>1</show_in_website>
|
189 |
+
<show_in_store>1</show_in_store>
|
190 |
+
<expanded>1</expanded>
|
191 |
+
<fields>
|
192 |
+
<note translate="label">
|
193 |
+
<label><![CDATA[This section lists all the available attributes for the Sooqr Product Feed. Some attributes are required for all products and some are required for certain product types such as apparel, others are recommended. To get the best results with Sooqr lease make sure that you provide most of the attributes.]]></label>
|
194 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_note</frontend_model>
|
195 |
+
<sort_order>1</sort_order>
|
196 |
+
<show_in_default>1</show_in_default>
|
197 |
+
<show_in_website>1</show_in_website>
|
198 |
+
<show_in_store>1</show_in_store>
|
199 |
+
</note>
|
200 |
+
<data_heading translate="label">
|
201 |
+
<label>Product Fields</label>
|
202 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
203 |
+
<sort_order>10</sort_order>
|
204 |
+
<show_in_default>1</show_in_default>
|
205 |
+
<show_in_website>1</show_in_website>
|
206 |
+
<show_in_store>1</show_in_store>
|
207 |
+
</data_heading>
|
208 |
+
<id_attribute translate="label">
|
209 |
+
<label>ID</label>
|
210 |
+
<frontend_type>select</frontend_type>
|
211 |
+
<source_model>sooqr/adminhtml_system_config_source_productid</source_model>
|
212 |
+
<sort_order>11</sort_order>
|
213 |
+
<show_in_default>1</show_in_default>
|
214 |
+
<show_in_website>1</show_in_website>
|
215 |
+
<show_in_store>1</show_in_store>
|
216 |
+
</id_attribute>
|
217 |
+
<name_attribute translate="label">
|
218 |
+
<label>Name</label>
|
219 |
+
<frontend_type>select</frontend_type>
|
220 |
+
<source_model>sooqr/adminhtml_system_config_source_varcharattribute</source_model>
|
221 |
+
<sort_order>12</sort_order>
|
222 |
+
<show_in_default>1</show_in_default>
|
223 |
+
<show_in_website>1</show_in_website>
|
224 |
+
<show_in_store>1</show_in_store>
|
225 |
+
</name_attribute>
|
226 |
+
<sku_attribute translate="label">
|
227 |
+
<label>Sku</label>
|
228 |
+
<frontend_type>select</frontend_type>
|
229 |
+
<source_model>sooqr/adminhtml_system_config_source_textattribute</source_model>
|
230 |
+
<sort_order>13</sort_order>
|
231 |
+
<show_in_default>1</show_in_default>
|
232 |
+
<show_in_website>1</show_in_website>
|
233 |
+
<show_in_store>1</show_in_store>
|
234 |
+
</sku_attribute>
|
235 |
+
<description_attribute translate="label">
|
236 |
+
<label>Description</label>
|
237 |
+
<frontend_type>select</frontend_type>
|
238 |
+
<source_model>sooqr/adminhtml_system_config_source_textattribute</source_model>
|
239 |
+
<sort_order>14</sort_order>
|
240 |
+
<show_in_default>1</show_in_default>
|
241 |
+
<show_in_website>1</show_in_website>
|
242 |
+
<show_in_store>1</show_in_store>
|
243 |
+
</description_attribute>
|
244 |
+
<brand_attribute translate="label">
|
245 |
+
<label>Brand</label>
|
246 |
+
<frontend_type>select</frontend_type>
|
247 |
+
<source_model>sooqr/adminhtml_system_config_source_attribute</source_model>
|
248 |
+
<sort_order>15</sort_order>
|
249 |
+
<show_in_default>1</show_in_default>
|
250 |
+
<show_in_website>1</show_in_website>
|
251 |
+
<show_in_store>1</show_in_store>
|
252 |
+
</brand_attribute>
|
253 |
+
<images_heading translate="label">
|
254 |
+
<label>Images</label>
|
255 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
256 |
+
<sort_order>20</sort_order>
|
257 |
+
<show_in_default>1</show_in_default>
|
258 |
+
<show_in_website>0</show_in_website>
|
259 |
+
<show_in_store>1</show_in_store>
|
260 |
+
</images_heading>
|
261 |
+
<note_resize translate="label">
|
262 |
+
<label><![CDATA[Image resize options are only available on store level which can be selected from the scope dropdown on the left top of this page.<br>]]></label>
|
263 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_note</frontend_model>
|
264 |
+
<sort_order>21</sort_order>
|
265 |
+
<show_in_default>1</show_in_default>
|
266 |
+
<show_in_website>0</show_in_website>
|
267 |
+
<show_in_store>0</show_in_store>
|
268 |
+
</note_resize>
|
269 |
+
<image_source translate="label">
|
270 |
+
<label>Source</label>
|
271 |
+
<frontend_type>select</frontend_type>
|
272 |
+
<source_model>sooqr/adminhtml_system_config_source_images</source_model>
|
273 |
+
<sort_order>22</sort_order>
|
274 |
+
<show_in_default>1</show_in_default>
|
275 |
+
<show_in_website>0</show_in_website>
|
276 |
+
<show_in_store>1</show_in_store>
|
277 |
+
</image_source>
|
278 |
+
<image_resize translate="label">
|
279 |
+
<label>Resize Image</label>
|
280 |
+
<frontend_type>select</frontend_type>
|
281 |
+
<source_model>sooqr/adminhtml_system_config_source_resize</source_model>
|
282 |
+
<sort_order>23</sort_order>
|
283 |
+
<show_in_default>0</show_in_default>
|
284 |
+
<show_in_website>0</show_in_website>
|
285 |
+
<show_in_store>1</show_in_store>
|
286 |
+
</image_resize>
|
287 |
+
<image_size_fixed translate="label">
|
288 |
+
<label>Image Size</label>
|
289 |
+
<frontend_type>select</frontend_type>
|
290 |
+
<source_model>sooqr/adminhtml_system_config_source_cacheresize</source_model>
|
291 |
+
<sort_order>24</sort_order>
|
292 |
+
<show_in_default>0</show_in_default>
|
293 |
+
<show_in_website>0</show_in_website>
|
294 |
+
<show_in_store>1</show_in_store>
|
295 |
+
<depends><image_resize>fixed</image_resize></depends>
|
296 |
+
<comment>List of available sizes in cache directory.</comment>
|
297 |
+
</image_size_fixed>
|
298 |
+
<image_size_custom translate="label">
|
299 |
+
<label>Image Size</label>
|
300 |
+
<frontend_type>text</frontend_type>
|
301 |
+
<sort_order>24</sort_order>
|
302 |
+
<show_in_default>0</show_in_default>
|
303 |
+
<show_in_website>0</show_in_website>
|
304 |
+
<show_in_store>1</show_in_store>
|
305 |
+
<depends><image_resize>custom</image_resize></depends>
|
306 |
+
<comment>Example format: 200x300</comment>
|
307 |
+
</image_size_custom>
|
308 |
+
|
309 |
+
<extra_heading translate="label">
|
310 |
+
<label>Extra Fields</label>
|
311 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
312 |
+
<sort_order>30</sort_order>
|
313 |
+
<show_in_default>1</show_in_default>
|
314 |
+
<show_in_website>1</show_in_website>
|
315 |
+
<show_in_store>1</show_in_store>
|
316 |
+
</extra_heading>
|
317 |
+
<extra_note translate="label">
|
318 |
+
<label><![CDATA[Add your custom attributes as Sooqr fields. The maximum number of allowed fields is restricted by your Sooqr subscription.]]></label>
|
319 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_note</frontend_model>
|
320 |
+
<sort_order>31</sort_order>
|
321 |
+
<show_in_default>1</show_in_default>
|
322 |
+
<show_in_website>1</show_in_website>
|
323 |
+
<show_in_store>1</show_in_store>
|
324 |
+
</extra_note>
|
325 |
+
<extra>
|
326 |
+
<label>Extra Fields</label>
|
327 |
+
<frontend_model>sooqr/adminhtml_config_form_field_extra</frontend_model>
|
328 |
+
<backend_model>sooqr/system_config_backend_design_extra</backend_model>
|
329 |
+
<sort_order>32</sort_order>
|
330 |
+
<show_in_default>1</show_in_default>
|
331 |
+
<show_in_website>1</show_in_website>
|
332 |
+
<show_in_store>1</show_in_store>
|
333 |
+
</extra>
|
334 |
+
<tax_heading translate="label">
|
335 |
+
<label>Prices and Tax</label>
|
336 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
337 |
+
<sort_order>40</sort_order>
|
338 |
+
<show_in_default>1</show_in_default>
|
339 |
+
<show_in_website>1</show_in_website>
|
340 |
+
<show_in_store>1</show_in_store>
|
341 |
+
</tax_heading>
|
342 |
+
<tax_note translate="label">
|
343 |
+
<label><![CDATA[By default prices are shown incl. Tax so only change this option if necessary.<br>If the feed export is without tax it's possible to add it with this option.<br>]]></label>
|
344 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_note</frontend_model>
|
345 |
+
<sort_order>41</sort_order>
|
346 |
+
<show_in_default>1</show_in_default>
|
347 |
+
<show_in_website>1</show_in_website>
|
348 |
+
<show_in_store>1</show_in_store>
|
349 |
+
</tax_note>
|
350 |
+
<force_tax translate="label">
|
351 |
+
<label>Force Tax Usage</label>
|
352 |
+
<frontend_type>select</frontend_type>
|
353 |
+
<source_model>sooqr/source_tax</source_model>
|
354 |
+
<sort_order>42</sort_order>
|
355 |
+
<show_in_default>1</show_in_default>
|
356 |
+
<show_in_website>1</show_in_website>
|
357 |
+
<show_in_store>1</show_in_store>
|
358 |
+
</force_tax>
|
359 |
+
<add_tax translate="label">
|
360 |
+
<label>Manually Add Tax</label>
|
361 |
+
<frontend_type>select</frontend_type>
|
362 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
363 |
+
<sort_order>43</sort_order>
|
364 |
+
<show_in_default>1</show_in_default>
|
365 |
+
<show_in_website>1</show_in_website>
|
366 |
+
<show_in_store>1</show_in_store>
|
367 |
+
</add_tax>
|
368 |
+
<tax_percentage translate="label">
|
369 |
+
<label>Percentage</label>
|
370 |
+
<frontend_type>text</frontend_type>
|
371 |
+
<sort_order>44</sort_order>
|
372 |
+
<show_in_default>1</show_in_default>
|
373 |
+
<show_in_website>1</show_in_website>
|
374 |
+
<show_in_store>1</show_in_store>
|
375 |
+
<comment><![CDATA[When the tax percentage is 21% use 21.]]></comment>
|
376 |
+
<depends><add_tax>1</add_tax></depends>
|
377 |
+
</tax_percentage>
|
378 |
+
<configurable_heading translate="label">
|
379 |
+
<label>Configurable & Grouped</label>
|
380 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
381 |
+
<sort_order>50</sort_order>
|
382 |
+
<show_in_default>1</show_in_default>
|
383 |
+
<show_in_website>1</show_in_website>
|
384 |
+
<show_in_store>1</show_in_store>
|
385 |
+
</configurable_heading>
|
386 |
+
<configurable_note translate="label">
|
387 |
+
<label><![CDATA[Export non visible simple products of configurable and grouped products.]]></label>
|
388 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_note</frontend_model>
|
389 |
+
<sort_order>51</sort_order>
|
390 |
+
<show_in_default>1</show_in_default>
|
391 |
+
<show_in_website>1</show_in_website>
|
392 |
+
<show_in_store>1</show_in_store>
|
393 |
+
</configurable_note>
|
394 |
+
<conf_enabled translate="label">
|
395 |
+
<label>Enable</label>
|
396 |
+
<frontend_type>select</frontend_type>
|
397 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
398 |
+
<sort_order>52</sort_order>
|
399 |
+
<show_in_default>1</show_in_default>
|
400 |
+
<show_in_website>1</show_in_website>
|
401 |
+
<show_in_store>1</show_in_store>
|
402 |
+
</conf_enabled>
|
403 |
+
<grouped_price translate="label">
|
404 |
+
<label>Grouped Price</label>
|
405 |
+
<frontend_type>select</frontend_type>
|
406 |
+
<source_model>sooqr/adminhtml_system_config_source_pricemodel</source_model>
|
407 |
+
<sort_order>53</sort_order>
|
408 |
+
<show_in_default>1</show_in_default>
|
409 |
+
<show_in_website>1</show_in_website>
|
410 |
+
<show_in_store>1</show_in_store>
|
411 |
+
</grouped_price>
|
412 |
+
<category_heading translate="label">
|
413 |
+
<label>Filter by Category</label>
|
414 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
415 |
+
<sort_order>60</sort_order>
|
416 |
+
<show_in_default>1</show_in_default>
|
417 |
+
<show_in_website>1</show_in_website>
|
418 |
+
<show_in_store>1</show_in_store>
|
419 |
+
</category_heading>
|
420 |
+
<category_enabled translate="label">
|
421 |
+
<label>Enabled</label>
|
422 |
+
<frontend_type>select</frontend_type>
|
423 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
424 |
+
<sort_order>61</sort_order>
|
425 |
+
<show_in_default>1</show_in_default>
|
426 |
+
<show_in_website>1</show_in_website>
|
427 |
+
<show_in_store>1</show_in_store>
|
428 |
+
</category_enabled>
|
429 |
+
<category_type translate="label">
|
430 |
+
<label>Type of filter</label>
|
431 |
+
<frontend_type>select</frontend_type>
|
432 |
+
<source_model>sooqr/adminhtml_system_config_source_categorytype</source_model>
|
433 |
+
<sort_order>62</sort_order>
|
434 |
+
<show_in_default>1</show_in_default>
|
435 |
+
<show_in_website>1</show_in_website>
|
436 |
+
<show_in_store>1</show_in_store>
|
437 |
+
<depends><category_enabled>1</category_enabled></depends>
|
438 |
+
</category_type>
|
439 |
+
<categories translate="label">
|
440 |
+
<label>Category</label>
|
441 |
+
<frontend_type>multiselect</frontend_type>
|
442 |
+
<source_model>sooqr/adminhtml_system_config_source_category</source_model>
|
443 |
+
<sort_order>63</sort_order>
|
444 |
+
<show_in_default>1</show_in_default>
|
445 |
+
<show_in_website>1</show_in_website>
|
446 |
+
<show_in_store>1</show_in_store>
|
447 |
+
<depends><category_enabled>1</category_enabled></depends>
|
448 |
+
</categories>
|
449 |
+
<cms_heading translate="label">
|
450 |
+
<label>Export CMS Pages</label>
|
451 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
452 |
+
<sort_order>70</sort_order>
|
453 |
+
<show_in_default>1</show_in_default>
|
454 |
+
<show_in_website>1</show_in_website>
|
455 |
+
<show_in_store>1</show_in_store>
|
456 |
+
</cms_heading>
|
457 |
+
<cms_pages translate="label">
|
458 |
+
<label>Enable</label>
|
459 |
+
<frontend_type>select</frontend_type>
|
460 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
461 |
+
<sort_order>71</sort_order>
|
462 |
+
<show_in_default>1</show_in_default>
|
463 |
+
<show_in_website>1</show_in_website>
|
464 |
+
<show_in_store>1</show_in_store>
|
465 |
+
</cms_pages>
|
466 |
+
</fields>
|
467 |
+
</products>
|
468 |
+
<generate translate="label" module="sooqr">
|
469 |
+
<label>Feed Generation Settings</label>
|
470 |
+
<frontend_type>text</frontend_type>
|
471 |
+
<sort_order>8</sort_order>
|
472 |
+
<show_in_default>1</show_in_default>
|
473 |
+
<show_in_website>1</show_in_website>
|
474 |
+
<show_in_store>1</show_in_store>
|
475 |
+
<expanded>1</expanded>
|
476 |
+
<fields>
|
477 |
+
<note translate="label">
|
478 |
+
<label><![CDATA[Each store view will have their own Sooqr feed, you can easily activate or de-activate the Sooqr feed generation on store level or automatically generate the Sooqr feed. In case your not using the cron job functionality it's possible to generate the Sooqr feed manually.]]></label>
|
479 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_note</frontend_model>
|
480 |
+
<sort_order>1</sort_order>
|
481 |
+
<show_in_default>1</show_in_default>
|
482 |
+
<show_in_website>1</show_in_website>
|
483 |
+
<show_in_store>1</show_in_store>
|
484 |
+
</note>
|
485 |
+
<exclude_heading translate="label">
|
486 |
+
<label>Feed Generation</label>
|
487 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
488 |
+
<sort_order>10</sort_order>
|
489 |
+
<show_in_default>1</show_in_default>
|
490 |
+
<show_in_website>1</show_in_website>
|
491 |
+
<show_in_store>1</show_in_store>
|
492 |
+
</exclude_heading>
|
493 |
+
<enabled translate="label">
|
494 |
+
<label>Enabled</label>
|
495 |
+
<frontend_type>select</frontend_type>
|
496 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
497 |
+
<sort_order>11</sort_order>
|
498 |
+
<show_in_default>1</show_in_default>
|
499 |
+
<show_in_website>1</show_in_website>
|
500 |
+
<show_in_store>1</show_in_store>
|
501 |
+
</enabled>
|
502 |
+
<filename translate="label">
|
503 |
+
<label>Filename</label>
|
504 |
+
<frontend_type>text</frontend_type>
|
505 |
+
<sort_order>12</sort_order>
|
506 |
+
<show_in_default>1</show_in_default>
|
507 |
+
<show_in_website>1</show_in_website>
|
508 |
+
<show_in_store>1</show_in_store>
|
509 |
+
<comment><![CDATA[sqoor-datatfeed.xml]]></comment>
|
510 |
+
</filename>
|
511 |
+
<limit translate="label">
|
512 |
+
<label>Limit Products</label>
|
513 |
+
<frontend_type>text</frontend_type>
|
514 |
+
<sort_order>13</sort_order>
|
515 |
+
<show_in_default>1</show_in_default>
|
516 |
+
<show_in_website>1</show_in_website>
|
517 |
+
<show_in_store>1</show_in_store>
|
518 |
+
<comment><![CDATA[Set limit for testing, use 0 for all products]]></comment>
|
519 |
+
</limit>
|
520 |
+
<server_heading translate="label">
|
521 |
+
<label>Overwrite server settings</label>
|
522 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
523 |
+
<sort_order>20</sort_order>
|
524 |
+
<show_in_default>1</show_in_default>
|
525 |
+
<show_in_website>0</show_in_website>
|
526 |
+
<show_in_store>0</show_in_store>
|
527 |
+
</server_heading>
|
528 |
+
<overwrite translate="label">
|
529 |
+
<label>Enabled</label>
|
530 |
+
<frontend_type>select</frontend_type>
|
531 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
532 |
+
<sort_order>21</sort_order>
|
533 |
+
<show_in_default>1</show_in_default>
|
534 |
+
<show_in_website>0</show_in_website>
|
535 |
+
<show_in_store>0</show_in_store>
|
536 |
+
<tooltip>Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.</tooltip>
|
537 |
+
</overwrite>
|
538 |
+
<memory_limit translate="label">
|
539 |
+
<label>Memory Limit</label>
|
540 |
+
<frontend_type>text</frontend_type>
|
541 |
+
<sort_order>22</sort_order>
|
542 |
+
<show_in_default>1</show_in_default>
|
543 |
+
<show_in_website>0</show_in_website>
|
544 |
+
<show_in_store>0</show_in_store>
|
545 |
+
<depends><overwrite>1</overwrite></depends>
|
546 |
+
<comment><![CDATA[This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg: 1024M.]]></comment>
|
547 |
+
</memory_limit>
|
548 |
+
<max_execution_time translate="label">
|
549 |
+
<label>Max Execution Time</label>
|
550 |
+
<frontend_type>text</frontend_type>
|
551 |
+
<sort_order>23</sort_order>
|
552 |
+
<show_in_default>1</show_in_default>
|
553 |
+
<show_in_website>0</show_in_website>
|
554 |
+
<show_in_store>0</show_in_store>
|
555 |
+
<depends><overwrite>1</overwrite></depends>
|
556 |
+
<comment><![CDATA[This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).]]></comment>
|
557 |
+
</max_execution_time>
|
558 |
+
<mpn_heading translate="label">
|
559 |
+
<label>Cron</label>
|
560 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
561 |
+
<sort_order>30</sort_order>
|
562 |
+
<show_in_default>1</show_in_default>
|
563 |
+
<show_in_website>1</show_in_website>
|
564 |
+
<show_in_store>1</show_in_store>
|
565 |
+
</mpn_heading>
|
566 |
+
<cron translate="label">
|
567 |
+
<label>Enabled</label>
|
568 |
+
<frontend_type>select</frontend_type>
|
569 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
570 |
+
<sort_order>31</sort_order>
|
571 |
+
<show_in_default>1</show_in_default>
|
572 |
+
<show_in_website>0</show_in_website>
|
573 |
+
<show_in_store>0</show_in_store>
|
574 |
+
</cron>
|
575 |
+
<frequency translate="label">
|
576 |
+
<label>Frequency</label>
|
577 |
+
<frontend_type>select</frontend_type>
|
578 |
+
<source_model>sooqr/adminhtml_system_config_source_frequency</source_model>
|
579 |
+
<backend_model>sooqr/adminhtml_system_config_backend_sooqr_cron</backend_model>
|
580 |
+
<sort_order>32</sort_order>
|
581 |
+
<show_in_default>1</show_in_default>
|
582 |
+
<show_in_website>1</show_in_website>
|
583 |
+
<show_in_store>1</show_in_store>
|
584 |
+
</frequency>
|
585 |
+
<time translate="label">
|
586 |
+
<label>Start Time</label>
|
587 |
+
<frontend_type>time</frontend_type>
|
588 |
+
<sort_order>33</sort_order>
|
589 |
+
<show_in_default>1</show_in_default>
|
590 |
+
<show_in_website>1</show_in_website>
|
591 |
+
<show_in_store>1</show_in_store>
|
592 |
+
<depends><frequency>0</frequency></depends>
|
593 |
+
</time>
|
594 |
+
<feeds_heading translate="label">
|
595 |
+
<label>Generated Feeds</label>
|
596 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_heading</frontend_model>
|
597 |
+
<sort_order>40</sort_order>
|
598 |
+
<show_in_default>1</show_in_default>
|
599 |
+
<show_in_website>1</show_in_website>
|
600 |
+
<show_in_store>1</show_in_store>
|
601 |
+
</feeds_heading>
|
602 |
+
<feeds_text translate="label">
|
603 |
+
<label>Text</label>
|
604 |
+
<frontend_model>sooqr/adminhtml_system_config_form_field_feeds</frontend_model>
|
605 |
+
<sort_order>41</sort_order>
|
606 |
+
<show_in_default>1</show_in_default>
|
607 |
+
<show_in_website>1</show_in_website>
|
608 |
+
<show_in_store>1</show_in_store>
|
609 |
+
</feeds_text>
|
610 |
+
</fields>
|
611 |
+
</generate>
|
612 |
+
</groups>
|
613 |
+
</sooqr_connect>
|
614 |
+
</sections>
|
615 |
+
</config>
|
app/design/frontend/base/default/layout/magmodules_sooqr.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="header">
|
5 |
+
<block type="sooqr/search" name="top.search" as="topSearch" template="magmodules/sooqr/form.mini.phtml"/>
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
app/design/frontend/base/default/template/magmodules/sooqr/form.mini.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
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 info@magmodules.eu so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Sooqr
|
17 |
+
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
$catalogSearchHelper = $this->helper('catalogsearch');
|
22 |
+
?>
|
23 |
+
<form id="search_mini_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get">
|
24 |
+
<div class="input-box">
|
25 |
+
<label for="search"><?php echo $this->__('Search:') ?></label>
|
26 |
+
<input id="search" type="search" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text required-entry" placeholder="<?php echo $this->quoteEscape($this->__('Search entire store here...')) ?>" />
|
27 |
+
<button type="submit" title="<?php echo $this->quoteEscape($this->__('Search')) ?>" class="button search-button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
28 |
+
</div>
|
29 |
+
<?php if($this->isEnabled()) : ?>
|
30 |
+
<script type="text/javascript">
|
31 |
+
var _wssq = _wssq || [];
|
32 |
+
_wssq.push(['_load', { 'suggest' : <?php echo json_encode($this->getSooqrOptions()) ?>}]);
|
33 |
+
_wssq.push(['suggest._setPosition', 'screen-middle']);
|
34 |
+
_wssq.push(['suggest._setLocale', '<?php echo $this->getSooqrLanguage() ?>']);
|
35 |
+
_wssq.push(['suggest._setFixedFilters', { 'magento_store' : '<?php echo Mage::app()->getStore()->getCode(); ?>' }]);
|
36 |
+
<?php if (!$this->isTrackingEnabled()) { ?>
|
37 |
+
_wssq.push(['suggest._disableTracking']);
|
38 |
+
<?php } ?>
|
39 |
+
<?php echo $this->getSooqrJavascript() ?>
|
40 |
+
(function() {
|
41 |
+
var ws = document.createElement('script'); ws.type = 'text/javascript'; ws.async = true;
|
42 |
+
ws.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + '<?php echo $this->getSooqrScriptUri() ?>';
|
43 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ws, s);
|
44 |
+
})();
|
45 |
+
</script>
|
46 |
+
<?php else: ?>
|
47 |
+
<script type="text/javascript">
|
48 |
+
//<![CDATA[
|
49 |
+
var searchForm = new Varien.searchForm('search_mini_form', 'search', '');
|
50 |
+
searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
|
51 |
+
//]]>
|
52 |
+
</script>
|
53 |
+
<?php endif; ?>
|
54 |
+
</form>
|
app/etc/modules/Magmodules_Sooqr.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Magmodules_Sooqr>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Magmodules_Sooqr>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/locale/en_US/Magmodules_Sooqr.csv
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"-- none","-- none"
|
2 |
+
"Actions","Actions"
|
3 |
+
"API Details","API Details"
|
4 |
+
"Attribute","Attribute"
|
5 |
+
"Advanced Settings","Advanced Settings"
|
6 |
+
"By default prices are shown incl. Tax so only change this option if necessary.<br>If the feed export is without tax it's possible to add it with this option.<br>","By default prices are shown incl. Tax so only change this option if necessary.<br>If the feed export is without tax it's possible to add it with this option.<br>"
|
7 |
+
"Cron","Cron"
|
8 |
+
"Configurable","Configurable"
|
9 |
+
"Data: Brand","Data: Brand"
|
10 |
+
"Data: Category","Data: Category"
|
11 |
+
"Data: Condition","Data: Condition"
|
12 |
+
"Data: Description","Data: Description"
|
13 |
+
"Data: GTIN","Data: GTIN"
|
14 |
+
"Data: MPN","Data: MPN"
|
15 |
+
"Default Category","Default Category"
|
16 |
+
"Default Condition","Default Condition"
|
17 |
+
"Description Attribute","Description Attribute"
|
18 |
+
"Each store view will have their own Sooqr feed, you can easily activate or de-activate the Sooqr feed generation on store level or automatically generate the Sooqr feed. In case your not using the cron job functionality it's possible to generate the Sooqr feed manually.","Each store view will have their own Sooqr feed, you can easily activate or de-activate the Sooqr feed generation on store level or automatically generate the Sooqr feed. In case your not using the cron job functionality it's possible to generate the Sooqr feed manually."
|
19 |
+
"Enabled","Enabled"
|
20 |
+
"Enable Apparel","Enable Apparel"
|
21 |
+
"Enable Debugging","Enable Debugging"
|
22 |
+
"Every product","Every product"
|
23 |
+
"Exclude products with this visibility","Exclude the products with this visibility"
|
24 |
+
"Export non visible simple products of configurable and grouped products.","Export non visible simple products of configurable and grouped products."
|
25 |
+
"Extra Fields","Extra Fields"
|
26 |
+
"Export CMS Pages","Export CMS Pages"
|
27 |
+
"Exclude Products","Exclude Products"
|
28 |
+
"Exclude Products on Status","Exclude Products on Status"
|
29 |
+
"Exclude Products on Visibility","Exclude Products on Visibility"
|
30 |
+
"Exclude Products on Stock level","Exclude Products on Stock level"
|
31 |
+
"Exclude out of stock products","Exclude out of stock products"
|
32 |
+
"Exclude products with this status","Exclude products with this status"
|
33 |
+
"Exclude products with this visibility","Exclude products with this visibility"
|
34 |
+
"Exclude for Sooqr","Exclude for Sooqr"
|
35 |
+
"Extension Version","Extension Version"
|
36 |
+
"Extention needs to be enabled to use this function","Extension needs to be enabled to use this function"
|
37 |
+
"Feed Generation","Feed Generation"
|
38 |
+
"Feed Generation Settings","Feed Generation Settings"
|
39 |
+
"File writing not succeeded","File writing not succeeded"
|
40 |
+
"Filename","Filename"
|
41 |
+
"Field Name","Field Name"
|
42 |
+
"Filter by Category","Filter by Category"
|
43 |
+
"Force Tax Usage","Force Tax Usage"
|
44 |
+
"Frequency","Frequency"
|
45 |
+
"Frontend Settings","Frontend Settings"
|
46 |
+
"Generate","Generate"
|
47 |
+
"Generated","Generated"
|
48 |
+
"Generated Feeds","Generated Feeds"
|
49 |
+
"Generate Manual","Generate Manual"
|
50 |
+
"Sooqr - Advanced Options","Sooqr - Advanced Options"
|
51 |
+
"Sooqr","Sooqr"
|
52 |
+
"Sooqr - Data","Sooqr - Data"
|
53 |
+
"Sooqr - Filter Conditions","Sooqr - Filter Conditions"
|
54 |
+
"Sooqr - Generation Settings","Sooqr - Generation Settings"
|
55 |
+
"Limit","Limit"
|
56 |
+
"Limit Products","Limit Products"
|
57 |
+
"If you want to submit more fields to your Sooqr Feed you can fill in the data here.",If you want to submit more fields to your Sooqr Feed you can fill in the data here."
|
58 |
+
"Include Weight Field","Include Weight Field"
|
59 |
+
"Include by Category","Include by Category"
|
60 |
+
"Include products with this visibility","Include products with this visibility"
|
61 |
+
"Licence","Licence"
|
62 |
+
"License Key","License Key"
|
63 |
+
"Make sure you <strong><u>save the configuration first</u></strong> before generating a feed!</strong>","Make sure you <strong><u>save the configuration first</u></strong> before generating a feed!</strong>"
|
64 |
+
"Manually Add Tax","Manually Add Tax"
|
65 |
+
"Magmodules","Magmodules"
|
66 |
+
"New","New"
|
67 |
+
"Name Attribute","Name Attribute"
|
68 |
+
"No active feed found","No active feed found"
|
69 |
+
"Non Required Fields","Non Required Fields"
|
70 |
+
"Only when less than two.. ","Only when less than two.. "
|
71 |
+
"Only add products with the following visibility","Only add products with the following visibility"
|
72 |
+
"Percentage","Percentage"
|
73 |
+
"Product Condition","Product Condition"
|
74 |
+
"Product Fields","Product Fields"
|
75 |
+
"Parent HTML node","Parent HTML node"
|
76 |
+
"Products are categorized in Sooqr according to the Google product taxonomy. While Google can't guarantee that a product will show in a particular category, you can increase the chances that your products will be included in the most relevant categories by sending them highly structured information for your items.<br>Click <a href=""https://support.google.com/merchants/answer/160081"" target=""_blank"">here</a> to read more about the Google product Taxonomy inlcuding the different categories.<br><br>","Products are categorized in Sooqr according to the Google product taxonomy. While Google can't guarantee that a product will show in a particular category, you can increase the chances that your products will be included in the most relevant categories by sending them highly structured information for your items.<br>Click <a href=""https://support.google.com/merchants/answer/160081"" target=""_blank"">here</a> to read more about the Google product Taxonomy inlcuding the different categories.<br><br>"
|
77 |
+
"Price Rules","Price Rules"
|
78 |
+
"Refurbished","Refurbished"
|
79 |
+
"Required according to the Unique Product Identifier Rules for all target countries except for Austria, Belgium, Canada, Denmark, India, Mexico, Norway, Poland, Russia, Sweden, and Turkey. This attribute is recommended for Austria, Belgium, Canada, Denmark, India, Mexico, Norway, Poland, Russia, Sweden, and Turkey.<br><strong>Note:</strong> Don't provide your store name as the brand unless you manufacture the product.<br><br>","Required according to the Unique Product Identifier Rules for all target countries except for Austria, Belgium, Canada, Denmark, India, Mexico, Norway, Poland, Russia, Sweden, and Turkey. This attribute is recommended for Austria, Belgium, Canada, Denmark, India, Mexico, Norway, Poland, Russia, Sweden, and Turkey.<br><strong>Note:</strong> Don't provide your store name as the brand unless you manufacture the product.<br><br>"
|
80 |
+
"Server Name","Server Name"
|
81 |
+
"Select if you want to check all the products for special prices based on category price rules.<br>This can have some impact on the speed of the generation of the feed if there are many catalog price rules enabled.","Select if you want to check all the products for special prices based on category price rules.<br>This can have some impact on the speed of the generation of the feed if there are many catalog price rules enabled."
|
82 |
+
"Select if you want to check all the products for special prices based on category price rules. This can have some impact on the speed of the generation of the feed if there are many catalog price rules enabled.","Select if you want to check all the products for special prices based on category price rules. This can have some impact on the speed of the generation of the feed if there are many catalog price rules enabled."
|
83 |
+
"Set limit for testing, use 0 for all products","Set limit for testing, use 0 for all products"
|
84 |
+
"Start Time","Start Time"
|
85 |
+
"Status","Status"
|
86 |
+
"Prices and Tax","Prices and Tax"
|
87 |
+
"Staging Environment","Staging Environment"
|
88 |
+
"Tax Customization","Tax Customization"
|
89 |
+
"Set the general settings to connect your store with the Sooqr API.","Set the general settings to connect your store with the Sooqr API."
|
90 |
+
"Shipping","Shipping"
|
91 |
+
"Shipping Prices","Shipping Prices"
|
92 |
+
"Text","Text"
|
93 |
+
"The Manufacturer Part Number is used to reference and identify a product using a manufacturer specific naming other than GTIN. MPNs are assigned by a manufacturer. MPNs should typically be specific to a single unique product. For example, different colors of a product should have different MPNs.<br><br>","The Manufacturer Part Number is used to reference and identify a product using a manufacturer specific naming other than GTIN. MPNs are assigned by a manufacturer. MPNs should typically be specific to a single unique product. For example, different colors of a product should have different MPNs.<br><br>"
|
94 |
+
"The condition is an required field for the feed. Only three options are available: New, Refurbished & Used. Please select the default condition of your products, when you change the condition on product-level in the Sooqr Tab the product-condition will be overwritten.<br><br>","The condition is an required field for the feed. Only three options are available: New, Refurbished & Used. Please select the default condition of your products, when you change the condition on product-level in the Sooqr Tab the product-condition will be overwritten.<br><br>"
|
95 |
+
"The ‘product type’ attribute also indicates the category of the product being sold.<br>However, unlike the ‘Google product category’ attribute, this refers to your own classification of the item.<br>Moreover, you can include more than one ‘product type’ attribute in your feed, if products apply to more than one category.<br>To determine the correct ‘product type’ Attribute, expand or browse the Google taxonomy (i.e. use one of the Google taxonomy values) or use your own categories.","The ‘product type’ attribute also indicates the category of the product being sold.<br>However, unlike the ‘Google product category’ attribute, this refers to your own classification of the item.<br>Moreover, you can include more than one ‘product type’ attribute in your feed, if products apply to more than one category.<br>To determine the correct ‘product type’ Attribute, expand or browse the Google taxonomy (i.e. use one of the Google taxonomy values) or use your own categories."
|
96 |
+
"This option allows you to exclude product from the Sooqr Feed. To exclude certain products from the Sooqr feed you easily select yes in the Sooqr tab on your product configuration page.<br>","This option allows you to exclude product from the Sooqr Feed. To exclude certain products from the Sooqr feed you easily select yes in the Sooqr tab on your product configuration page.<br>"
|
97 |
+
"This section lists all the available attributes for the Sooqr Product Feed. Some attributes are required for all products and some are required for certain product types such as apparel, others are recommended. To get the best results with Sooqr lease make sure that you provide most of the attributes.","This section lists all the available attributes for the Sooqr Product Feed. Some attributes are required for all products and some are required for certain product types such as apparel, others are recommended. To get the best results with Sooqr lease make sure that you provide most of the attributes."
|
98 |
+
"This new attribute was created for shops that offer custom goods without an identifier like GTIN or MPN.<br>Custom goods are hand knitted sweaters or antique furniture or vintage items. The ‘Identifier Exists’ field can be used to indicate<br>that an identifier does not exist for certain products: Identifier exists = false. Not required for regular goods.","This new attribute was created for shops that offer custom goods without an identifier like GTIN or MPN.<br>Custom goods are hand knitted sweaters or antique furniture or vintage items. The ‘Identifier Exists’ field can be used to indicate<br>that an identifier does not exist for certain products: Identifier exists = false. Not required for regular goods."
|
99 |
+
"This is the weight of the product used to calculate the shipping cost of the item. If you have specified a global shipping method that is dependent on shipping weight (Merchant Dashboard), this attribute will be used to calculate the shipping cost of the item automatically.","This is the weight of the product used to calculate the shipping cost of the item. If you have specified a global shipping method that is dependent on shipping weight (Merchant Dashboard), this attribute will be used to calculate the shipping cost of the item automatically."
|
100 |
+
"This option allows you to include/exclude product from the Sooqr Feed. To exclude certain products from the Sooqr feed you easily select yes in the Sooqr tab on your product configuration page.<br>","This option allows you to include/exclude product from the Sooqr Feed. To exclude certain products from the Sooqr feed you easily select yes in the Sooqr tab on your product configuration page.<br>"
|
101 |
+
"Type of filter","Type of filter"
|
102 |
+
"Use the GTIN/Barcode attribute to submit Global Trade Item Numbers (GTINs) in one of the following formats: UPC (in North America), EAN (in Europe), JAN (in Japan) or ISBN (for books). Please select the attribute that provide these GTINs (for eg. SKU).<br><br>","Use the GTIN/Barcode attribute to submit Global Trade Item Numbers (GTINs) in one of the following formats: UPC (in North America), EAN (in Europe), JAN (in Japan) or ISBN (for books). Please select the attribute that provide these GTINs (for eg. SKU).<br><br>"
|
103 |
+
"Used","Used"
|
104 |
+
"Use Identifier","Use Identifier"
|
105 |
+
"Use Product Type","Use Product Type"
|
106 |
+
"Use Parent Data for Simple","Use Parent Data for Simple"
|
107 |
+
"Use parent data","Use parent data"
|
108 |
+
"Use catalog price rules","Use catalog price rules"
|
109 |
+
"Visibility","Visibility"
|
110 |
+
"Weight Units","Weight Units"
|
111 |
+
"When the tax percentage is 21% use 21.","When the tax percentage is 21% use 21."
|
112 |
+
"We recommend that you configure the shipping costs at your Google Merchant account but in some cases you want to add them into the feed.","We recommend that you configure the shipping costs at your Google Merchant but in some cases you want to add them into the feed."
|
113 |
+
"When using configurable products you can choose to pull information from the parent products. It's specified as 'Configurable products - non apparel' or 'Apparel' markup so activate the Apparel setting to enable the Apparel markup in your feed. Select in the multiple-select box below the fall-back data for the configurable products in the feed.","When using configurable products you can choose to pull information from the parent products. It's specified as 'Configurable products - non apparel' or 'Apparel' markup so activate the Apparel setting to enable the Apparel markup in your feed. Select in the multiple-select box below the fall-back data for the configurable products in the feed."
|
114 |
+
"You can add custom-fields to your feed when needed. Please make sure that your using the latest Custom Fields standards To prevent error messages in the feed. The guidelines for the custom-fields can be found right in our Knowledgebase.","You can add custom-fields to your feed when needed. Please make sure that your using the latest Custom Fields standards To prevent error messages in the feed.<br>The guidelines for the custom-fields can be found right in our Knowledgebase."
|
115 |
+
"You are recommended to provide the following product information for each unique item you submit if it exists, is relevant, and if the information fits into the accepted values for the following detailed product attributes:<br/><br/>","You are recommended to provide the following product information for each unique item you submit if it exists, is relevant, and if the information fits into the accepted values for the following detailed product attributes:<br/><br/>"
|
116 |
+
"You can find your Sooqr Account ID in your Sooqr account, you can find the link in the information box at the top of this page.","You can find your Sooqr Account ID in your Sooqr account, you can find the link in the information box at the top of this page."
|
117 |
+
"Overwrite server settings","Overwrite server settings"
|
118 |
+
"Memory Limit","Memory Limit"
|
119 |
+
"This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg: 1024M.","This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg: 1024M."
|
120 |
+
"Max Execution Time","Max Execution Time"
|
121 |
+
"Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.","Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time."
|
122 |
+
"This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).","This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes)."
|
app/locale/nl_NL/Magmodules_Sooqr.csv
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"-- none","-- none"
|
2 |
+
"Actions","Actie"
|
3 |
+
"Add your custom attributes as Sooqr fields. The maximum number of allowed fields is restricted by your Sooqr subscription.","Voeg handmatig extra attributen toe aan je Sooqr feed. Het maximaal aantal velden is afhankelijk van je soort Sooqr account."
|
4 |
+
"API Details","API gegevens"
|
5 |
+
"Advanced Settings","Geavanceerde Instellingen"
|
6 |
+
"Attribute","Attribuut"
|
7 |
+
"By default prices are shown incl. Tax so only change this option if necessary.<br>If the feed export is without tax it's possible to add it with this option.<br>","Standaard worden de prijzen incl. btw getoond, verander deze optie enkel als het nodig is.<br>Wanneer de export feed de prijzen toont exclusief BTW is het mogelijk deze optie te gebruiken.<br>"
|
8 |
+
"Cron","Cron"
|
9 |
+
"Configurable & Grouped","Configureerbaar & Gegroepeerde producten"
|
10 |
+
"Data: Brand","Data: Merk"
|
11 |
+
"Data: Category","Data: Categorie"
|
12 |
+
"Data: Condition","Data: Conditie"
|
13 |
+
"Data: Id, Name & Description","Data: ID, Naam & Omschrijving"
|
14 |
+
"Data: GTIN","Data: GTIN"
|
15 |
+
"Data: MPN","Data: MPN"
|
16 |
+
"Additional Fields","Extra velden"
|
17 |
+
"Default Category","Standaard categorie"
|
18 |
+
"Default Condition","Standaard conditie"
|
19 |
+
"Description Attribute","Omschrijving attribuut"
|
20 |
+
"Each store view will have their own Sooqr feed, you can easily activate or de-activate the Sooqr feed generation on store level or automatically generate the Sooqr feed. In case your not using the cron job functionality it's possible to generate the Sooqr feed manually.","Elke winkelzicht heeft zijn eigen Sooqr-feed. U kunt deze gemakkelijk activeren of de-activeren en Sooqr-feed automatisch laten genereren. In het geval dat u de cronjob functionaliteit niet gebruikt is het mogelijk om de Sooqr-feed handmatig te genereren."
|
21 |
+
"Enabled","Activeer"
|
22 |
+
"Enable Apparel","Activeer Kleding"
|
23 |
+
"Export non visible simple products of configurable and grouped products.","Exporteer niet zichtbaar simpele producten van configureerbare en gegroepeerd producten."
|
24 |
+
"Extra Fields","Extra velden"
|
25 |
+
"Export CMS Pages","Exporteer CMS pagina's"
|
26 |
+
"Include Products on Visibility","Voeg producten toe op basis van zichtbaarheid"
|
27 |
+
"Exclude products with this visibility","Sluit producten uit met deze zichtbaarheid"
|
28 |
+
"Every product","Elk product"
|
29 |
+
"Enable Debugging","Debug inschakelen"
|
30 |
+
"Exclude Products","Producten uitsluiten"
|
31 |
+
"Exclude Products on Status","Producten met deze status uitsluiten"
|
32 |
+
"Exclude Products on Visibility","Producten met deze zichtbaarheid uitsluiten"
|
33 |
+
"Exclude products with this status","Sluit producten met deze status uit"
|
34 |
+
"Exclude Products on Stock level","Producten uitsluiten op basis van voorraadniveau"
|
35 |
+
"Exclude out of stock products","Producten welke niet op voorraad zijn uitsluiten"
|
36 |
+
"Exclude products with this visibility","Sluit producten met deze zichtbaarheid uit"
|
37 |
+
"Exclude for Sooqr","Uitsluiten voor Sooqr"
|
38 |
+
"Extension Version","Extensie Versie"
|
39 |
+
"Extention needs to be enabled to use this function","De extensie dient geactiveerd te zijn om deze functie te gebruiken"
|
40 |
+
"Feed Generation","Feed Generatie"
|
41 |
+
"Feed Generation Settings","Feed instellingen"
|
42 |
+
"Frontend Version","Frontend versie"
|
43 |
+
"File writing not succeeded","Bestand schrijven niet gelukt"
|
44 |
+
"Filename","Bestandsnaam"
|
45 |
+
"Filter by Category","Filter op categorie"
|
46 |
+
"Your Generated Feeds","Gegenereerde Feeds"
|
47 |
+
"Force Tax Usage","Dwing BTW gebruik"
|
48 |
+
"Field Name","Veldnaam"
|
49 |
+
"Frontend Settings","Frontend Instellingen"
|
50 |
+
"Frequency","Regelmaat"
|
51 |
+
"Generate","Genereren"
|
52 |
+
"Generated","Gegenereerd"
|
53 |
+
"Generated Feeds","Gegenereerde feed"
|
54 |
+
"Generate Manual","Genereer manueel"
|
55 |
+
"Sooqr - Advanced Options","Sooqr - Geavanceerde opties"
|
56 |
+
"Sooqr","Sooqr"
|
57 |
+
"Sooqr - Data","Sooqr - Data"
|
58 |
+
"Sooqr - Filter Conditions","Sooqr - Filter condities"
|
59 |
+
"Sooqr - Generation Settings","Sooqr - generatie instellingen"
|
60 |
+
"If you want to submit more fields to your Sooqr Feed you can fill in the data here.","Het is mogelijk om handmatig extra velden toe te voegen aan de Sooqr Feed."
|
61 |
+
"Include Weight Field","Voeg gewicht toe"
|
62 |
+
"Include by Category","Invoegen bij categorie"
|
63 |
+
"Images","Afbeeldingen"
|
64 |
+
"Include products with this visibility","Voeg producten toe met deze zichtbaarheid"
|
65 |
+
"Image resize options are only available on store level which can be selected from the scope dropdown on the left top of this page.<br>","Schaal opties voor de afbeeldingen zijn beschikbaar op store level niveau te selecteren via de store-level dropdown linksboven deze pagina.<br>"
|
66 |
+
"Limit","Limiet"
|
67 |
+
"Licence","licentie"
|
68 |
+
"License Key","licentie code"
|
69 |
+
"Limit Products","Product limiet"
|
70 |
+
"Make sure you <strong><u>save the configuration first</u></strong> before generating a feed!</strong>","Kies <strong><u>Configuratie opslaan</u></strong> om de laatste instellingen door te voeren in de feed.</strong>"
|
71 |
+
"Manually Add Tax","Handmatig BTW toevoegen"
|
72 |
+
"Magmodules","Magmodules"
|
73 |
+
"New","Nieuw"
|
74 |
+
"Name Attribute","Naam attribuut"
|
75 |
+
"No active feed found","Geen actieve feed gevonden"
|
76 |
+
"Non Required Fields","Niet verplichte velden"
|
77 |
+
"Only when less than two.. ","Enkel wanneer minder dan 2.. "
|
78 |
+
"Only add products with the following visibility","Producten toe voegen met de volgende als zichtbaarheid"
|
79 |
+
"Parent HTML node"," HTML-knooppunt"
|
80 |
+
"Percentage","Percentage"
|
81 |
+
"Product Condition","Product Conditie"
|
82 |
+
"Product Fields","Product Velden"
|
83 |
+
"Products are categorized in Sooqr according to the Google product taxonomy. While Google can't guarantee that a product will show in a particular category, you can increase the chances that your products will be included in the most relevant categories by sending them highly structured information for your items.<br>Click <a href=""https://support.google.com/merchants/answer/160081"" target=""_blank"">here</a> to read more about the Google product Taxonomy inlcuding the different categories.<br><br>","Producten worden gecategoriseerd volgens de Sooqr opmaak. Ondanks dat Google niet kan garanderen dat de producten daadwerkelijk in deze categorie worden geplaatst is het wel mogelijk om een voorkeur aan te geven.<br>klik <a href=""https://support.google.com/merchants/answer/160081"" target=""_blank"">hier</a> om een overzicht te krijgen van de juiste categorieën binnen Sooqr.<br><br>"
|
84 |
+
"Price Rules","Prijsregels"
|
85 |
+
"Grouped Price","Gegroepeerde prijs"
|
86 |
+
"Prices and Tax","Prijs en BTW"
|
87 |
+
"Source","Bron"
|
88 |
+
"Base Image","Base afbeelding"
|
89 |
+
"Small Image (remommended)","Kleine afbeelding (aanbevolen)"
|
90 |
+
"Thumbnail","Thumbnail"
|
91 |
+
"Refurbished","Opgeknapt"
|
92 |
+
"Resize Image","Afbeelding schalen"
|
93 |
+
"Image Size","Afbeelding formaat"
|
94 |
+
"(recommended)","(Aanbevolen)"
|
95 |
+
"Required according to the Unique Product Identifier Rules for all target countries except for Austria, Belgium, Canada, Denmark, India, Mexico, Norway, Poland, Russia, Sweden, and Turkey. This attribute is recommended for Austria, Belgium, Canada, Denmark, India, Mexico, Norway, Poland, Russia, Sweden, and Turkey.<br><strong>Note:</strong> Don't provide your store name as the brand unless you manufacture the product.<br><br>","Dit is een vereise waarde volgens de Artikelnummer Regels voor alle landen behalve Oostenrijk, België, Canada, Denemarken, India, Mexico, Noorwegen, Polen, Rusland, Zweden en Turkije. Deze eigenschap wordt aanbevolen voor Oostenrijk, België, Canada, Denemarken, India, Mexico, Noorwegen, Polen, Rusland, Zweden en Turkije.<strong> Opmerking: </strong> gebruik de naam van uw winkel niet als merk tenzijn u zelf de producent bent van het product.<br><br>"
|
96 |
+
"Server Name","Servernaam"
|
97 |
+
"Select if you want to check all the products for special prices based on category price rules.<br>This can have some impact on the speed of the generation of the feed if there are many catalog price rules enabled.","Selecteer of de catalogus prijsregels meegenomen dienen te worden in de Sooqr Feed.<br>Indien er veel catalogus-regels actief zijn kan dit invloed op de snelheid van het generen van de Sooqr Feed."
|
98 |
+
"Set limit for testing, use 0 for all products","Stel een limiet in voor de testfeed, gebruik 0 om alle producten in te voegen."
|
99 |
+
"Select if you want to check all the products for special prices based on category price rules. This can have some impact on the speed of the generation of the feed if there are many catalog price rules enabled.","Selecteer of de producten moeten worden gecontroleerd op Catalogus prijs regels. Wanneer er veel prijsregels actief zijn kan dit enig effect hebben op de snelheid waarmee de Sooqr feed wordt gegeneerd."
|
100 |
+
"Select if you want to use your catalog price rules in your Sooqr Feed.","Selecteer of de catalogus prijsregels moeten worden meegenomen in de Sooqr Feed."
|
101 |
+
"Start Time","Starttijd"
|
102 |
+
"Staging Environment","Staging omgeving"
|
103 |
+
"Set the general settings to connect your store with the Sooqr API.","Stel de algemene instellingen in om de webwinkel te verbinden met de Sooqr API."
|
104 |
+
"Status","Status"
|
105 |
+
"Shipping","Verzending"
|
106 |
+
"Shipping Prices","Verzendkosten"
|
107 |
+
"Sooqr Account ID","Sooqr Account ID"
|
108 |
+
"Sooqr API Key","Sooqr API Key"
|
109 |
+
"Statistics","Statistieken"
|
110 |
+
"Tax Customization","Belasting aanpassingen"
|
111 |
+
"Text","Tekst"
|
112 |
+
"The Manufacturer Part Number is used to reference and identify a product using a manufacturer specific naming other than GTIN. MPNs are assigned by a manufacturer. MPNs should typically be specific to a single unique product. For example, different colors of a product should have different MPNs.<br><br>","Het fabrikant onderdeelnummer wordt gebruikt om te verwijzen naar een nummer om een product te identificeren met behulp van een specifieke andere naamgeving als GTIN. MPNs worden toegewezen door een fabrikant. MPNs is over het algemeen specifiek voor één uniek product. Als voorbeeld, verschillende kleuren binnen een artikel hebben verschillende MPNs.<br><br>"
|
113 |
+
"The ‘product type’ attribute also indicates the category of the product being sold.<br>However, unlike the ‘Google product category’ attribute, this refers to your own classification of the item.<br>Moreover, you can include more than one ‘product type’ attribute in your feed, if products apply to more than one category.<br>To determine the correct ‘product type’ Attribute, expand or browse the Google taxonomy (i.e. use one of the Google taxonomy values) or use your own categories.","Het kenmerk 'producttype': voor dit kenmerk kunt u een van de categorieën die zijn gedefinieerd<br>in de Google-producttaxonomie of uw eigen categorienamen gebruiken."
|
114 |
+
"The condition is an required field for the feed. Only three options are available: New, Refurbished & Used. Please select the default condition of your products, when you change the condition on product-level in the Sooqr Tab the product-condition will be overwritten.<br><br>","De conditie is een verplicht veld voor de Google SHoppin feed. Er zijn 3 verschillende condities; Nieuw, opgeknapt en gebruikt. Selecteer de standaard status van de aangeboden producten, het is mogelijk om afwijkende condities aan te geven op product niveau onder de Google Shoppin tab<br><br>"
|
115 |
+
"This option allows you to exclude product from the Sooqr Feed. To exclude certain products from the Sooqr feed you easily select yes in the Sooqr tab on your product configuration page.<br>","Deze optie maakt het mogelijk om producten uit te sluiten van de Sooqr feed. Om producten uit te sluiten is het mogelijk om op product-niveau via de Sooqr tab te kiezen voor uistluiten: ja."
|
116 |
+
"This new attribute was created for shops that offer custom goods without an identifier like GTIN or MPN.<br>Custom goods are hand knitted sweaters or antique furniture or vintage items. The ‘Identifier Exists’ field can be used to indicate<br>that an identifier does not exist for certain products: Identifier exists = false. Not required for regular goods.","De relatief nieuwe attribuut is speciaal voor winkels welke maatwerk producten aanbieden zonder GTIN of MPN.<br>Maatwerk goederen zijn vooral handgemaakte producten als truien, meubels of antiek. het 'Identifier Exists' kan worden gebruikt <br>als er geen identifier beschikbaar is voor de producten. Als er een identifier gebruikt wordt kies dan voor Nee.<br>Deze optie niet gebruiken bij normale producten."
|
117 |
+
"This section lists all the available attributes for the Sooqr Product Feed. Some attributes are required for all products and some are required for certain product types such as apparel, others are recommended. To get the best results with Sooqr lease make sure that you provide most of the attributes.","In deze sectie worden alle beschikbare attributen voor de Sooqr Feed ingesteld. Sommige eigenschappen zijn vereist voor alle producten en sommige zijn voor bepaalde typen producten zoals kleding aanbevolen. Om het maximale resultaat uit Sooqr te halen raden we aan om zoveel mogelijk data te gebruiken."
|
118 |
+
"This is the weight of the product used to calculate the shipping cost of the item. If you have specified a global shipping method that is dependent on shipping weight (Merchant Dashboard), this attribute will be used to calculate the shipping cost of the item automatically.","Dit is het gewicht om de verzendkosten van het artikel te berekenen. Wanneer er algemene verzendkosten zijn ingesteld in het Google Merchant account zal deze worden gebruikt om de verzendkosten van het item automatisch berekenen."
|
119 |
+
"This option allows you to include/exclude product from the Sooqr Feed. To exclude certain products from the Sooqr feed you easily select yes in the Sooqr tab on your product configuration page.<br>","Met deze optie is het mogelijk om producten in of uit te sluiten van de Feed. Door specifieke producten uit te sluiten van de Sooqr feed is het mogelijk om dit te doen via de Sooqr Tab op de productpagina.<br>"
|
120 |
+
"Type of filter","Type filter"
|
121 |
+
"Use the GTIN/Barcode attribute to submit Global Trade Item Numbers (GTINs) in one of the following formats: UPC (in North America), EAN (in Europe), JAN (in Japan) or ISBN (for books). Please select the attribute that provide these GTINs (for eg. SKU).<br><br>","Gebruik het GTIN/Barcode attribuut als Global Trade Item Numbers (GTIN) in één van de volgende formaten: UPC (in Noord-Amerika), EAN (in Europa), JAN (in Japan) of ISBN (voor boeken). Selecteer het attribuut dat deze GTIN's bieden (bijv. SKU)."
|
122 |
+
"Used","Gebruikt"
|
123 |
+
"Use Parent Data for Simple","Gebruik bovenliggende data voor producten"
|
124 |
+
"Use Product Type","Gebruik Product Type"
|
125 |
+
"Use parent data","Gebruik bovenliggende data"
|
126 |
+
"Use Identifier","Gebruik Identifier"
|
127 |
+
"Use catalog price rules","Gebruik Catalogus prijsregels"
|
128 |
+
"Visibility","Zichtbaarheid"
|
129 |
+
"Weight Units","Gewicht notitie"
|
130 |
+
"When using configurable or grouped products you can choose to pull information from the parent products. It's specified as 'Configurable products - non apparel' or 'Apparel' markup so activate the Apparel setting to enable the Apparel markup in your feed. Select in the multiple-select box below the fall-back data for the configurable / grouped products in the feed.","Bij het gebruik van configureerbare en gegroepeerde producten die u kunt ervoor kiezen om informatie te trekken vanuit de bovenliggende producten. Het wordt opgegeven in de feed als ''configureerbare producten - geen kleding'' of ''Kleding'', schakel ''kleding'' in om de kleding opmaakt te activeren in de feed. Selecteer in de onderstaande multiple-select de fall-back attributen data voor de configureerbare of gegroepeerde producten in de feed."
|
131 |
+
"When the tax percentage is 21% use 21.","Wanneer het BTW percentage 21% is gebruik 21."
|
132 |
+
"We recommend that you configure the shipping costs at your Google Merchant account but in some cases you want to add them into the feed.","We raden aan om de verzendkosten te configureren via het Google Merchant account, mocht het toch nodig zijn de verzendkosten op te nemen in de feed dan is dat hier mogelijk."
|
133 |
+
"You can add custom-fields to your feed when needed. Please make sure that your using the latest Custom Fields standards To prevent error messages in the feed. The guidelines for the custom-fields can be found right in our Knowledgebase.","Indien nodig is het mogelijk om aparte velden toe te voegen aan de Feed. Wees er zeker van dat deze velden deze velden voldoen aan de laatste feed regels.<br>Deze zijn te vinden in de Knowledgebase."
|
134 |
+
"You are recommended to provide the following product information for each unique item you submit if it exists, is relevant, and if the information fits into the accepted values for the following detailed product attributes:<br/><br/>","Het wordt aangeraden om de onderstaande informatie-attributen te verstrekken aan Google indien deze beschikbaar is en relevant is aan het product.:<br/><br/>"
|
135 |
+
"You can find your Sooqr Account ID in your Sooqr account, you can find the link in the information box at the top of this page.","Deze gegevens zijn op te vragen via het Sooqr account, zie een link in het informatieblok bovenaan deze configuratie pagina."
|
136 |
+
"Overwrite server settings","Overschrijf server instellingen"
|
137 |
+
"You can find your Sooqr API Key in your Sooqr account, you can find the link in the information box at the top of this page.","U kunt uw Sooqr API Key vinden in uw Sooqr-account, de link naar uw account is bovenaan deze pagina te vinden."
|
138 |
+
"Memory Limit","Geheugen limiet"
|
139 |
+
"This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg: 1024M.","Dit overschrijft de maximale hoeveelheid geheugen in bytes dat het script maximaal mag gebruiken, bijvoorbeeld: 1024M."
|
140 |
+
"Max Execution Time","Maximale uitvoer tijd"
|
141 |
+
"Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.","Gebruik deze optie alleen als het nodig is om de instelling van het geheugen limiet of uitvoertijd van je server te overschrijven."
|
142 |
+
"This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).","Dit overschrijft de maximale tijd in seconden dat het script mag draaien voordat het wordt beëindigd, bijvoorbeeld: 300 (5 minuten)."
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Magmodules_Sooqr</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Magmodules_Sooqr</summary>
|
10 |
+
<description>Magmodules_Sooqr</description>
|
11 |
+
<notes>Magmodules_Sooqr</notes>
|
12 |
+
<authors><author><name>Magmodules</name><user>auto-converted</user><email>info@magmodules.nl</email></author></authors>
|
13 |
+
<date>2016-04-14</date>
|
14 |
+
<time>11:14:40</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Sooqr"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Extra.php" hash="4badde6fc9e378180de9ffa45b5a6daa"/></dir><dir name="Renderer"><file name="Select.php" hash="69d71d66aaf7b842ef482affd484ec48"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Feeds.php" hash="74a7ce51274f0970165db6cb6275d4fb"/><file name="Heading.php" hash="a89db4f294f9c9e6785745163b1aed5f"/><file name="Note.php" hash="f131e40d8a0f4ed2e444d9e692a91ed5"/><file name="Version.php" hash="f71fe94b80dbcde3fbc6e763f5224f86"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="2e283e75b6af11273b34994894932132"/></dir></dir></dir><file name="Search.php" hash="ac26f28b9b19908e75a6631a89000a21"/></dir><dir name="Helper"><file name="Data.php" hash="79e8fbc4276ebe51b75086c879b32833"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Sooqr"><file name="Cron.php" hash="630c80fd165087f8a75a6c9fa3dad9b6"/></dir></dir><dir name="Source"><file name="Attribute.php" hash="6635c64d3b848940ec93213bdd95cf51"/><file name="Cacheresize.php" hash="86a916189abef3a670e58f3a8298f894"/><file name="Category.php" hash="92b245d0758fbe075b79c397a96d8567"/><file name="Categorytype.php" hash="8bc5f054db86f543019a6762a6a98562"/><file name="Condition.php" hash="bd66be4fe74f549d5fa6c213bd9b64f6"/><file name="Configurable.php" hash="34a165474618953e44fd1de305371907"/><file name="Frequency.php" hash="f03bd90b098412026b21884e72c89aaf"/><file name="Identifier.php" hash="cdf5bd32696cb92a6f3be396ce5b3a6d"/><file name="Images.php" hash="08658a5e913e334959ec476a61e2891f"/><file name="Pricemodel.php" hash="dbbeabc2853a7caecab3fc42a557766b"/><file name="Productid.php" hash="e4b431e0183d91bdd4f186f001119e77"/><file name="Producttype.php" hash="88d0e8386f59d7c0ea62a19cbf800fa4"/><file name="Resize.php" hash="1a0824757d8c87f85225f063de3a025b"/><file name="Selectattribute.php" hash="bcae6eff0788821f7d3dbf7d224b59e4"/><file name="Status.php" hash="2f474fe7188e3b1cf1d1714ffebcd9e8"/><file name="Textattribute.php" hash="9645d5652679a972a280cf337ab8662b"/><file name="Varcharattribute.php" hash="37a9253e8ea806f3402052a0b0744707"/><file name="Version.php" hash="906736f8f04f03421ab56a0c042639aa"/><file name="Visibility.php" hash="67f20c3b4581144b11ca8696c885b97d"/><file name="Weight.php" hash="fbc88d0b6bd073d00dc6e4a05ce1b4df"/></dir></dir></dir></dir><dir name="Source"><file name="Action.php" hash="ef9830d9c1a98c94991626c4cc4909c9"/><file name="Attribute.php" hash="53a0819bd628de1ea6926246555861b8"/><file name="Countries.php" hash="1113d53457ac12fd71703dbe1818705e"/><file name="Tax.php" hash="b5bb45e61f0be971777a57d4a58a6751"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Design"><file name="Extra.php" hash="a03fb78f2d5dae3b56900be199c43f0f"/></dir></dir></dir></dir><file name="Common.php" hash="13ff4e6a9232fadbb397bde5d2139e36"/><file name="Observer.php" hash="4dad399e52d181e3a4a24d12427c6d5e"/><file name="Sooqr.php" hash="86052922ba83eda080fdad464299719b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SooqrController.php" hash="826a7f29cd2909d222e8cd8f4966b146"/></dir><file name="InstallationController.php" hash="a96e58cbab2c7b6a3a4c9b42de62a59f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3f450c304adfd64d95814e552e41398d"/><file name="config.xml" hash="ddc7570421208c5af730b2e26de67171"/><file name="system.xml" hash="ee523176644512b2e73e01cd9f1827b7"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Magmodules_Sooqr.csv" hash="38992a5f4cf87eeee3d06ab38ead900b"/></dir><dir name="nl_NL"><file name="Magmodules_Sooqr.csv" hash="2fe3afa7c7597cf53c985aef2388ae24"/></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Sooqr.xml" hash="eeec89a005c4ccb1ed86bf90c446e3ef"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="magmodules"><dir name="sooqr"><file name="form.mini.phtml" hash="2776e200a99a369182599f6c9177e11b"/></dir></dir></dir><dir name="layout"><file name="magmodules_sooqr.xml" hash="ca15953b214016a800c5ef3aa8da4d19"/></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|