Rejoiner - Version 1.1.7

Version Notes

Issue caused by "Simple Configurable Products" extension was fixed.

Download this release

Release Info

Developer Mike
Extension Rejoiner
Version 1.1.7
Comparing to
See all releases


Code changes from version 1.1.6 to 1.1.7

app/code/community/Rejoiner/Acr/Block/Snippets.php CHANGED
@@ -38,7 +38,7 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
38
// get thumbnail from configurable product
39
if ($product->getData('thumbnail') && ($product->getData('thumbnail') != 'no_selection')) {
40
$thumbnail = $mediaUrl . 'catalog/product' . $product->getData('thumbnail');
41
- // or try finding it in the simple one
42
} elseif ($item->getProductType() == Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE) {
43
/** @var Mage_Sales_Model_Quote_Item $simpleItem */
44
$simpleItem = $parentToChild[$item->getId()];
@@ -46,6 +46,15 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
46
if ($simpleProduct->getData('thumbnail') && ($simpleProduct->getData('thumbnail') != 'no_selection')) {
47
$thumbnail = $mediaUrl . 'catalog/product' . $simpleProduct->getData('thumbnail');
48
}
49
}
50
// use placeholder image if nor simple nor configurable products does not have images
51
if ($thumbnail == 'no_selection') {
@@ -54,7 +63,7 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
54
}
55
56
$newItem = array();
57
- $newItem['name'] = htmlspecialchars($item->getName());
58
$newItem['image_url'] = $thumbnail;
59
$newItem['price'] = (string) $this->_convertPriceToCents($item->getBaseCalculationPrice());
60
$newItem['product_id'] = (string) $item->getSku();
@@ -69,8 +78,8 @@ class Rejoiner_Acr_Block_Snippets extends Mage_Core_Block_Template
69
public function getCartData()
70
{
71
if ($quote = $this->_getQuote()) {
72
- return '"totalItems":"'.$this->_getQuote()->getItemsQty().'","value":"'.$this->_convertPriceToCents($this->_getQuote()->getBaseSubtotal()).'","returnUrl":"'.Mage::helper('rejoiner_acr')->getRestoreUrl().'"';
73
- }
74
return '';
75
}
76
38
// get thumbnail from configurable product
39
if ($product->getData('thumbnail') && ($product->getData('thumbnail') != 'no_selection')) {
40
$thumbnail = $mediaUrl . 'catalog/product' . $product->getData('thumbnail');
41
+ // or try finding it in the simple one
42
} elseif ($item->getProductType() == Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE) {
43
/** @var Mage_Sales_Model_Quote_Item $simpleItem */
44
$simpleItem = $parentToChild[$item->getId()];
46
if ($simpleProduct->getData('thumbnail') && ($simpleProduct->getData('thumbnail') != 'no_selection')) {
47
$thumbnail = $mediaUrl . 'catalog/product' . $simpleProduct->getData('thumbnail');
48
}
49
+ } elseif ($productId = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getEntityId())) {
50
+ if (isset($productId[0])) {
51
+ $configurableProduct = Mage::getModel('catalog/product')
52
+ ->getCollection()
53
+ ->addAttributeToSelect('thumbnail')
54
+ ->addAttributeToFilter('entity_id', $productId)
55
+ ->getFirstItem();
56
+ $thumbnail = $mediaUrl . 'catalog/product' . $configurableProduct->getData('thumbnail');
57
+ }
58
}
59
// use placeholder image if nor simple nor configurable products does not have images
60
if ($thumbnail == 'no_selection') {
63
}
64
65
$newItem = array();
66
+ $newItem['name'] = $item->getName();
67
$newItem['image_url'] = $thumbnail;
68
$newItem['price'] = (string) $this->_convertPriceToCents($item->getBaseCalculationPrice());
69
$newItem['product_id'] = (string) $item->getSku();
78
public function getCartData()
79
{
80
if ($quote = $this->_getQuote()) {
81
+ return '"totalItems":"'.$this->_getQuote()->getItemsQty().'","value":"'.$this->_convertPriceToCents($this->_getQuote()->getBaseSubtotal()).'","returnUrl":"'.Mage::helper('rejoiner_acr')->getRestoreUrl().'"';
82
+ }
83
return '';
84
}
85
package.xml CHANGED
@@ -1,18 +1,18 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Rejoiner</name>
4
- <version>1.1.6</version>
5
<stability>stable</stability>
6
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Rejoiner Cart Abandonment Remarketing</summary>
10
<description>Minor changes in rejoiner notifications functionality.</description>
11
- <notes>Fixed bug that caused exception when adding product to cart with not available quantity.</notes>
12
- <authors><author><name>Mike</name><user>auto-converted</user><email>mike@rejoiner.com</email></author></authors>
13
- <date>2014-07-28</date>
14
- <time>14:19:41</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Rejoiner_Acr.xml" hash="1aad3601804cead81b6e687dfcb5b83f"/></dir></target><target name="magecommunity"><dir name="Rejoiner"><dir name="Acr"><dir name="Block"><dir name="Adminhtml"><file name="Notification.php" hash="4b4837b59ab85fa886e65be49d511490"/></dir><file name="Snippets.php" hash="01213375204319c257a3b11e8a04e735"/></dir><dir name="Helper"><file name="Data.php" hash="bb0962b1d17663b9b8013b93390cc799"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="48f66ad159e3d10a21cc04a980ca923e"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Salesrule.php" hash="1b6a8d728b5fa308b18a222c5981ed52"/></dir></dir></dir><file name="Notification.php" hash="a03d68e9bbaa820ce87557fca9f8f811"/><file name="Observer.php" hash="4709c0114a9f95c455eccc3ef731f2ec"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RejoinerController.php" hash="c2e5fea12a2fc23905d86f119c2baa39"/></dir><file name="AddtocartController.php" hash="4777a4c68b3693738a3409c95c7596eb"/></dir><dir name="etc"><file name="config.xml" hash="7599dc7571149cb04bc66061590d9207"/><file name="system.xml" hash="2a128aff548ea844225e7d7eb7cd814b"/></dir><dir name="sql"><dir name="rejoiner_setup"><file name="mysql4-install-1.0.0.0.php" hash="8d9a21c9c09fe44c6fe51ddd2106e3e0"/><file name="mysql4-upgrade-1.0.0.0-1.0.1.0.php" hash="36cc70cc6dd37aab7f3c460e0af58d59"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="ac5de6f021a440fe3bc1359133406ba7"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="conversion.phtml" hash="13a53b2f28e5f5fa6e0644ea9cf5a6a4"/><file name="email.phtml" hash="05e54d0999953acf865b6a439c4bb6b5"/><file name="tracking.phtml" hash="1fb47f23cd14449a3978c12bb320fdd4"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="3181cf1ca63813a9ce633ed3268659f4"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="notification.phtml" hash="3a3872e6434bf7d2ca7fa0edfe6f9726"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Rejoiner_Acr.csv" hash="9015e31d97b9bc4746bc0a5241f8013b"/></dir></target></contents>
16
<compatible/>
17
- <dependencies/>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Rejoiner</name>
4
+ <version>1.1.7</version>
5
<stability>stable</stability>
6
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Rejoiner Cart Abandonment Remarketing</summary>
10
<description>Minor changes in rejoiner notifications functionality.</description>
11
+ <notes>Issue caused by "Simple Configurable Products" extension was fixed.</notes>
12
+ <authors><author><name>Mike</name><user>rejoiner</user><email>mike@rejoiner.com</email></author></authors>
13
+ <date>2014-08-18</date>
14
+ <time>08:21:04</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Rejoiner_Acr.xml" hash="1aad3601804cead81b6e687dfcb5b83f"/></dir></target><target name="magecommunity"><dir name="Rejoiner"><dir name="Acr"><dir name="Block"><dir name="Adminhtml"><file name="Notification.php" hash="4b4837b59ab85fa886e65be49d511490"/></dir><file name="Snippets.php" hash="3b0330f2aebf9c797455d6081f56df35"/></dir><dir name="Helper"><file name="Data.php" hash="bb0962b1d17663b9b8013b93390cc799"/></dir><dir name="Model"><file name="Notification.php" hash="a03d68e9bbaa820ce87557fca9f8f811"/><file name="Observer.php" hash="4709c0114a9f95c455eccc3ef731f2ec"/><dir name="Resource"><file name="Setup.php" hash="48f66ad159e3d10a21cc04a980ca923e"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Salesrule.php" hash="1b6a8d728b5fa308b18a222c5981ed52"/></dir></dir></dir></dir><dir name="controllers"><file name="AddtocartController.php" hash="4777a4c68b3693738a3409c95c7596eb"/><dir name="Adminhtml"><file name="RejoinerController.php" hash="c2e5fea12a2fc23905d86f119c2baa39"/></dir></dir><dir name="etc"><file name="config.xml" hash="7599dc7571149cb04bc66061590d9207"/><file name="system.xml" hash="2a128aff548ea844225e7d7eb7cd814b"/></dir><dir name="sql"><dir name="rejoiner_setup"><file name="mysql4-install-1.0.0.0.php" hash="8d9a21c9c09fe44c6fe51ddd2106e3e0"/><file name="mysql4-upgrade-1.0.0.0-1.0.1.0.php" hash="36cc70cc6dd37aab7f3c460e0af58d59"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="ac5de6f021a440fe3bc1359133406ba7"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="conversion.phtml" hash="13a53b2f28e5f5fa6e0644ea9cf5a6a4"/><file name="email.phtml" hash="05e54d0999953acf865b6a439c4bb6b5"/><file name="tracking.phtml" hash="1fb47f23cd14449a3978c12bb320fdd4"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="rejoiner_acr.xml" hash="3181cf1ca63813a9ce633ed3268659f4"/></dir><dir name="template"><dir name="rejoiner_acr"><file name="notification.phtml" hash="3a3872e6434bf7d2ca7fa0edfe6f9726"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Rejoiner_Acr.csv" hash="9015e31d97b9bc4746bc0a5241f8013b"/></dir></target></contents>
16
<compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
</package>