Version Notes
Magmodules_Sooqr
Download this release
Release Info
Developer | Magmodules |
Extension | Magmodules_Sooqr |
Version | 1.1.9 |
Comparing to | |
See all releases |
Code changes from version 1.1.8 to 1.1.9
- app/code/community/Magmodules/Sooqr/Block/Adminhtml/Widget/Info/Info.php +1 -1
- app/code/community/Magmodules/Sooqr/Helper/Data.php +40 -12
- app/code/community/Magmodules/Sooqr/Model/Sooqr.php +2 -0
- app/code/community/Magmodules/Sooqr/data/magmodules_sooqr_setup/data-install-1.1.9.php +25 -0
- app/code/community/Magmodules/Sooqr/data/magmodules_sooqr_setup/data-upgrade-1.1.8-1.1.9.php +25 -0
- app/code/community/Magmodules/Sooqr/etc/config.xml +11 -1
- package.xml +4 -4
app/code/community/Magmodules/Sooqr/Block/Adminhtml/Widget/Info/Info.php
CHANGED
@@ -63,7 +63,7 @@ class Magmodules_Sooqr_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_B
|
|
63 |
<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>
|
64 |
</tr>
|
65 |
<tr>
|
66 |
-
<td height="30"><strong>Read everything about the extension configuration in our <a href="http://www.magmodules.eu/help/
|
67 |
<td> </td>
|
68 |
</tr>
|
69 |
</table>
|
63 |
<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>
|
64 |
</tr>
|
65 |
<tr>
|
66 |
+
<td height="30"><strong>Read everything about the extension configuration in our <a href="http://www.magmodules.eu/help/sooqr" target="_blank">Knowledgebase.</a></strong></td>
|
67 |
<td> </td>
|
68 |
</tr>
|
69 |
</table>
|
app/code/community/Magmodules/Sooqr/Helper/Data.php
CHANGED
@@ -674,7 +674,12 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
674 |
public function getTypePrices($config, $products)
|
675 |
{
|
676 |
$type_prices = array();
|
677 |
-
if(!empty($config['conf_enabled'])) {
|
|
|
|
|
|
|
|
|
|
|
678 |
foreach($products as $product) {
|
679 |
if($product->getTypeId() == 'configurable') {
|
680 |
$attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
@@ -682,15 +687,20 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
682 |
$base_price = $product->getFinalPrice();
|
683 |
$base_price_reg = $product->getPrice();
|
684 |
foreach ($attributes as $attribute){
|
|
|
685 |
$prices = $attribute->getPrices();
|
686 |
-
|
687 |
-
|
688 |
-
$
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
|
|
|
|
|
|
|
|
694 |
}
|
695 |
}
|
696 |
$simple = $product->getTypeInstance()->getUsedProducts();
|
@@ -700,9 +710,9 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
700 |
$total_price_reg = $base_price_reg;
|
701 |
foreach($attributes as $attribute) {
|
702 |
$value = $sProduct->getData($attribute->getProductAttribute()->getAttributeCode());
|
703 |
-
if(isset($
|
704 |
-
$total_price += $
|
705 |
-
$total_price_reg += $
|
706 |
}
|
707 |
}
|
708 |
$type_prices[$sProduct->getEntityId()] = number_format(($total_price * $config['markup']), 2, '.', '');
|
@@ -713,6 +723,24 @@ class Magmodules_Sooqr_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
713 |
}
|
714 |
return $type_prices;
|
715 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
716 |
|
717 |
public function checkOldVersion($dir)
|
718 |
{
|
674 |
public function getTypePrices($config, $products)
|
675 |
{
|
676 |
$type_prices = array();
|
677 |
+
if(!empty($config['conf_enabled'])) {
|
678 |
+
if(!empty($config['hide_currency'])) {
|
679 |
+
$currency = '';
|
680 |
+
} else {
|
681 |
+
$currency = ' ' . $config['currency'];
|
682 |
+
}
|
683 |
foreach($products as $product) {
|
684 |
if($product->getTypeId() == 'configurable') {
|
685 |
$attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
687 |
$base_price = $product->getFinalPrice();
|
688 |
$base_price_reg = $product->getPrice();
|
689 |
foreach ($attributes as $attribute){
|
690 |
+
$optionPrices = array();
|
691 |
$prices = $attribute->getPrices();
|
692 |
+
foreach ($prices as $value) {
|
693 |
+
$product->setConfigurablePrice(
|
694 |
+
$this->_preparePrice($value['pricing_value'], $value['is_percent'], $product)
|
695 |
+
);
|
696 |
+
$product->setParentId(true);
|
697 |
+
Mage::dispatchEvent(
|
698 |
+
'catalog_product_type_configurable_price',
|
699 |
+
array('product' => $product)
|
700 |
+
);
|
701 |
+
$configurablePrice = $product->getConfigurablePrice();
|
702 |
+
$optionPrices[$value['value_index']] = $configurablePrice;
|
703 |
+
$optionPrices[$value['value_index'] .'_reg'] = $this->_prepareOldPrice($value['pricing_value'], $value['is_percent'], $product);
|
704 |
}
|
705 |
}
|
706 |
$simple = $product->getTypeInstance()->getUsedProducts();
|
710 |
$total_price_reg = $base_price_reg;
|
711 |
foreach($attributes as $attribute) {
|
712 |
$value = $sProduct->getData($attribute->getProductAttribute()->getAttributeCode());
|
713 |
+
if(isset($optionPrices[$value])) {
|
714 |
+
$total_price += $optionPrices[$value];
|
715 |
+
$total_price_reg += $optionPrices[$value . '_reg'];
|
716 |
}
|
717 |
}
|
718 |
$type_prices[$sProduct->getEntityId()] = number_format(($total_price * $config['markup']), 2, '.', '');
|
723 |
}
|
724 |
return $type_prices;
|
725 |
}
|
726 |
+
|
727 |
+
protected function _preparePrice($price, $isPercent = false, $product)
|
728 |
+
{
|
729 |
+
if ($isPercent && !empty($price)) {
|
730 |
+
$price = $product->getFinalPrice() * $price / 100;
|
731 |
+
}
|
732 |
+
|
733 |
+
return $price;
|
734 |
+
}
|
735 |
+
|
736 |
+
protected function _prepareOldPrice($price, $isPercent = false, $product)
|
737 |
+
{
|
738 |
+
if ($isPercent && !empty($price)) {
|
739 |
+
$price = $product->getPrice() * $price / 100;
|
740 |
+
}
|
741 |
+
|
742 |
+
return $price;
|
743 |
+
}
|
744 |
|
745 |
public function checkOldVersion($dir)
|
746 |
{
|
app/code/community/Magmodules/Sooqr/Model/Sooqr.php
CHANGED
@@ -86,6 +86,7 @@ class Magmodules_Sooqr_Model_Sooqr extends Magmodules_Sooqr_Model_Common {
|
|
86 |
$config['product_url_suffix'] = $feed->getProductUrlSuffix($storeId);
|
87 |
$config['stock_manage'] = Mage::getStoreConfig('cataloginventory/item_options/manage_stock');
|
88 |
$config['backorders'] = Mage::getStoreConfig('cataloginventory/item_options/backorders');
|
|
|
89 |
|
90 |
// PRICE
|
91 |
$config['price_scope'] = Mage::getStoreConfig('catalog/price/scope');
|
@@ -323,6 +324,7 @@ class Magmodules_Sooqr_Model_Sooqr extends Magmodules_Sooqr_Model_Common {
|
|
323 |
$header['extension_version'] = $config['version'];
|
324 |
$header['store'] = $config['website_name'];
|
325 |
$header['url'] = $config['website_url'];
|
|
|
326 |
$header['products_total'] = $count;
|
327 |
$header['products_limit'] = $config['limit'];
|
328 |
$header['date_created'] = Mage::getModel('core/date')->date('Y-m-d H:i:s');
|
86 |
$config['product_url_suffix'] = $feed->getProductUrlSuffix($storeId);
|
87 |
$config['stock_manage'] = Mage::getStoreConfig('cataloginventory/item_options/manage_stock');
|
88 |
$config['backorders'] = Mage::getStoreConfig('cataloginventory/item_options/backorders');
|
89 |
+
$config['token'] = Mage::getStoreConfig('sooqr_connect/generate/token');
|
90 |
|
91 |
// PRICE
|
92 |
$config['price_scope'] = Mage::getStoreConfig('catalog/price/scope');
|
324 |
$header['extension_version'] = $config['version'];
|
325 |
$header['store'] = $config['website_name'];
|
326 |
$header['url'] = $config['website_url'];
|
327 |
+
$header['token'] = $config['token'];
|
328 |
$header['products_total'] = $count;
|
329 |
$header['products_limit'] = $config['limit'];
|
330 |
$header['date_created'] = Mage::getModel('core/date')->date('Y-m-d H:i:s');
|
app/code/community/Magmodules/Sooqr/data/magmodules_sooqr_setup/data-install-1.1.9.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 |
+
$token = '';
|
19 |
+
$chars = str_split("abcdefghijklmnopqrstuvwxyz0123456789");
|
20 |
+
for($i = 0; $i < 16; $i++) {
|
21 |
+
$token .= $chars[array_rand($chars)];
|
22 |
+
}
|
23 |
+
|
24 |
+
$config = new Mage_Core_Model_Config();
|
25 |
+
$config->saveConfig('sooqr_connect/generate/token', $token, 'default', 0);
|
app/code/community/Magmodules/Sooqr/data/magmodules_sooqr_setup/data-upgrade-1.1.8-1.1.9.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 |
+
$token = '';
|
19 |
+
$chars = str_split("abcdefghijklmnopqrstuvwxyz0123456789");
|
20 |
+
for($i = 0; $i < 16; $i++) {
|
21 |
+
$token .= $chars[array_rand($chars)];
|
22 |
+
}
|
23 |
+
|
24 |
+
$config = new Mage_Core_Model_Config();
|
25 |
+
$config->saveConfig('sooqr_connect/generate/token', $token, 'default', 0);
|
app/code/community/Magmodules/Sooqr/etc/config.xml
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magmodules_Sooqr>
|
22 |
-
<version>1.1.
|
23 |
</Magmodules_Sooqr>
|
24 |
</modules>
|
25 |
<global>
|
@@ -38,6 +38,16 @@
|
|
38 |
<class>Magmodules_Sooqr_Model</class>
|
39 |
</sooqr>
|
40 |
</models>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</global>
|
42 |
<frontend>
|
43 |
<routers>
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magmodules_Sooqr>
|
22 |
+
<version>1.1.9</version>
|
23 |
</Magmodules_Sooqr>
|
24 |
</modules>
|
25 |
<global>
|
38 |
<class>Magmodules_Sooqr_Model</class>
|
39 |
</sooqr>
|
40 |
</models>
|
41 |
+
<resources>
|
42 |
+
<magmodules_sooqr_setup>
|
43 |
+
<setup>
|
44 |
+
<module>Magmodules_Sooqr</module>
|
45 |
+
</setup>
|
46 |
+
<connection>
|
47 |
+
<use>core_setup</use>
|
48 |
+
</connection>
|
49 |
+
</magmodules_sooqr_setup>
|
50 |
+
</resources>
|
51 |
</global>
|
52 |
<frontend>
|
53 |
<routers>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Sooqr</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Magmodules_Sooqr</description>
|
11 |
<notes>Magmodules_Sooqr</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
-
<date>2016-11-
|
14 |
-
<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="e583284820c631015ed78c131bf3cfa8"/><file name="Filter.php" hash="e21c1f53da21d4f3afbfe7691efce06e"/></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="2106ad07090060ed232ef4f77bc0e309"/><file name="Heading.php" hash="a89db4f294f9c9e6785745163b1aed5f"/><file name="Note.php" hash="f131e40d8a0f4ed2e444d9e692a91ed5"/><file name="Version.php" hash="5832a42f30122977420d722683211f66"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>7.9.9</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Sooqr</name>
|
4 |
+
<version>1.1.9</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Magmodules_Sooqr</description>
|
11 |
<notes>Magmodules_Sooqr</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
+
<date>2016-11-29</date>
|
14 |
+
<time>18:33:20</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="e583284820c631015ed78c131bf3cfa8"/><file name="Filter.php" hash="e21c1f53da21d4f3afbfe7691efce06e"/></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="2106ad07090060ed232ef4f77bc0e309"/><file name="Heading.php" hash="a89db4f294f9c9e6785745163b1aed5f"/><file name="Note.php" hash="f131e40d8a0f4ed2e444d9e692a91ed5"/><file name="Version.php" hash="5832a42f30122977420d722683211f66"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="ee3ef0f3d785a28e73d313ecbb5da325"/></dir></dir></dir><file name="Search.php" hash="2acb516fec2f419e260240e8647c5999"/></dir><dir name="Helper"><file name="Data.php" hash="8a2fe0a8cb53c868bbe49e9fdb7341b6"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Design"><file name="Extra.php" hash="3e262b80ccc673e415bf51bf172c72d4"/><file name="Filter.php" hash="e6fac56290f6d0d7be78553e75cb18a3"/></dir><dir name="Sooqr"><file name="Cron.php" hash="113b2d8de9349fd393c54ff7b59ff91d"/></dir></dir><dir name="Source"><file name="Action.php" hash="ef9830d9c1a98c94991626c4cc4909c9"/><file name="Attribute.php" hash="6f3736cd2f7de23b9d74356d7c1c557f"/><file name="Cacheresize.php" hash="86a916189abef3a670e58f3a8298f894"/><file name="Category.php" hash="92b245d0758fbe075b79c397a96d8567"/><file name="Categorytype.php" hash="8bc5f054db86f543019a6762a6a98562"/><file name="Cms.php" hash="34197c03a013a67112fa4f2c8415ed2b"/><file name="Cmspages.php" hash="d9cc6034c3d777cc896ff28f1a29f88d"/><file name="Condition.php" hash="bd66be4fe74f549d5fa6c213bd9b64f6"/><file name="Conditions.php" hash="502fe20b60e397240b8d552fd5ea4d81"/><file name="Configurable.php" hash="34a165474618953e44fd1de305371907"/><file name="Frequency.php" hash="b7518824f5cb60d13e9d6564a383dcc9"/><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="Tax.php" hash="c6e19d702751bc0c616768fceaf53855"/><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><file name="Common.php" hash="f9c26c5efa9dafe962c48654db7120c1"/><file name="Observer.php" hash="7df2ecf06c93f5a2c0a00981ff8db76f"/><file name="Sooqr.php" hash="92247eda9ba119ac35a761953be768e9"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SooqrController.php" hash="0fbb61bf89e06ee0c2a07b4859104c49"/></dir><file name="InstallationController.php" hash="a96e58cbab2c7b6a3a4c9b42de62a59f"/></dir><dir name="data"><dir name="magmodules_sooqr_setup"><file name="data-install-1.1.9.php" hash="448fcd59b4bd3492006bd26083188888"/><file name="data-upgrade-1.1.8-1.1.9.php" hash="448fcd59b4bd3492006bd26083188888"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="cf4313a4daa72837c48e137b51b11eba"/><file name="config.xml" hash="68abc08e76442bd8f6d8593669df5bf2"/><file name="system.xml" hash="eeeed98810a90bc96a2144a9b6481f38"/></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Magmodules_Sooqr.csv" hash="38992a5f4cf87eeee3d06ab38ead900b"/></dir><dir name="nl_NL"><file name="Magmodules_Sooqr.csv" hash="7f45989fad8c6e6ad552a827757d5161"/></dir></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="dfb86fc52128baeef3c81f1f1eb6cc1c"/></dir></dir></dir><dir name="layout"><file name="magmodules_sooqr.xml" hash="62a14cd61d3d74653b8d883d4d6b9d8d"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>7.9.9</max></php></required></dependencies>
|
18 |
</package>
|