Version Notes
New multisite module
Download this release
Release Info
| Developer | addwish |
| Extension | addwish |
| Version | 0.19.2 |
| Comparing to | |
| See all releases | |
Code changes from version 0.19.1 to 0.19.2
- app/code/local/Addwish/Awext/.DS_Store +0 -0
- app/code/local/Addwish/Awext/Block/Adminhtml/Awext/View/.DS_Store +0 -0
- app/code/local/Addwish/Awext/Block/Adminhtml/Awext/View/Tab/.DS_Store +0 -0
- app/code/local/Addwish/Awext/Helper/Data.php +46 -15
- app/code/local/Addwish/Awext/Model/Observer.php +16 -5
- app/code/local/Addwish/Awext/controllers/IndexController.php +13 -2
- app/code/local/Addwish/Awext/etc/.DS_Store +0 -0
- app/code/local/Addwish/Awext/etc/config.xml +11 -3
- app/design/frontend/base/default/layout/awext.xml +1 -5
- app/design/frontend/base/default/template/addwish/conversion-span.phtml +26 -29
- app/design/frontend/base/default/template/addwish/integrator.phtml +1 -1
- package.xml +1 -1
app/code/local/Addwish/Awext/.DS_Store
CHANGED
|
Binary file
|
app/code/local/Addwish/Awext/Block/Adminhtml/Awext/View/.DS_Store
DELETED
|
Binary file
|
app/code/local/Addwish/Awext/Block/Adminhtml/Awext/View/Tab/.DS_Store
DELETED
|
Binary file
|
app/code/local/Addwish/Awext/Helper/Data.php
CHANGED
|
@@ -36,6 +36,9 @@ class Addwish_Awext_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 36 |
foreach($extraAttributes as $attribute) {
|
| 37 |
try {
|
| 38 |
$data[$attribute] = $product->getAttributeText($attribute);
|
|
|
|
|
|
|
|
|
|
| 39 |
} catch(Exception $e) {
|
| 40 |
// Ignore attribute errors
|
| 41 |
}
|
|
@@ -51,13 +54,17 @@ class Addwish_Awext_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 51 |
}
|
| 52 |
|
| 53 |
public function getProductPrice($product, $discountPrice = false) {
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
if ($discountPrice) {
|
| 57 |
-
$price =
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
}
|
| 61 |
}
|
| 62 |
|
| 63 |
$pricesIncludeTax = Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX);
|
|
@@ -74,35 +81,43 @@ class Addwish_Awext_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 74 |
|
| 75 |
}
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
public function getProductHierarchies($product) {
|
| 78 |
$cats = $product->getCategoryIds();
|
| 79 |
|
| 80 |
// Remove category id's that are parent of others
|
|
|
|
| 81 |
foreach ($cats as $categoryId) {
|
| 82 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 83 |
$parentCategories = $category->getParentCategories();
|
| 84 |
foreach ($parentCategories as $parent) {
|
|
|
|
| 85 |
if($categoryId == $parent->getId()) {
|
| 86 |
continue;
|
| 87 |
}
|
|
|
|
| 88 |
$key = array_search($parent->getId(),$cats);
|
| 89 |
if($key !== false) {
|
| 90 |
unset($cats[$key]);
|
| 91 |
}
|
| 92 |
}
|
| 93 |
}
|
| 94 |
-
|
| 95 |
$hierarchies = array();
|
| 96 |
foreach ($cats as $categoryId) {
|
| 97 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 98 |
-
$
|
| 99 |
-
$hierarchy = array();
|
| 100 |
-
foreach ($parentCategories as $parent) {
|
| 101 |
-
$name = trim($parent->getName());
|
| 102 |
-
if($name != "") {
|
| 103 |
-
$hierarchy[] = $name;
|
| 104 |
-
}
|
| 105 |
-
}
|
| 106 |
if(count($hierarchy) > 0) {
|
| 107 |
$hierarchies[] = $hierarchy;
|
| 108 |
}
|
|
@@ -110,6 +125,22 @@ class Addwish_Awext_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 110 |
return $hierarchies;
|
| 111 |
}
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
public function getProductInStock($product) {
|
| 114 |
$inStock = false;
|
| 115 |
if($product->isConfigurable()) {
|
| 36 |
foreach($extraAttributes as $attribute) {
|
| 37 |
try {
|
| 38 |
$data[$attribute] = $product->getAttributeText($attribute);
|
| 39 |
+
if($data[$attribute] === false) {
|
| 40 |
+
$data[$attribute] = $product->getData($attribute);
|
| 41 |
+
}
|
| 42 |
} catch(Exception $e) {
|
| 43 |
// Ignore attribute errors
|
| 44 |
}
|
| 54 |
}
|
| 55 |
|
| 56 |
public function getProductPrice($product, $discountPrice = false) {
|
| 57 |
+
if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_GROUPED) {
|
| 58 |
+
$p = $this->cheapestProductFromGroup($product);
|
| 59 |
+
if (isset($p)) {
|
| 60 |
+
$product = $p;
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
if ($discountPrice) {
|
| 65 |
+
$price = $product->getFinalPrice();
|
| 66 |
+
} else {
|
| 67 |
+
$price = $product->getPrice();
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
$pricesIncludeTax = Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX);
|
| 81 |
|
| 82 |
}
|
| 83 |
|
| 84 |
+
private function cheapestProductFromGroup($product) {
|
| 85 |
+
$cheapest = null;
|
| 86 |
+
$associated = $product->getTypeInstance(true)->getAssociatedProducts($product);
|
| 87 |
+
foreach ($associated as $p) {
|
| 88 |
+
if ($cheapest == null || $cheapest->getFinalPrice() > $p->getFinalPrice()) {
|
| 89 |
+
$cheapest = $p;
|
| 90 |
+
}
|
| 91 |
+
}
|
| 92 |
+
return $cheapest;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
|
| 96 |
public function getProductHierarchies($product) {
|
| 97 |
$cats = $product->getCategoryIds();
|
| 98 |
|
| 99 |
// Remove category id's that are parent of others
|
| 100 |
+
$whiteList = array();
|
| 101 |
foreach ($cats as $categoryId) {
|
| 102 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 103 |
$parentCategories = $category->getParentCategories();
|
| 104 |
foreach ($parentCategories as $parent) {
|
| 105 |
+
$whiteList[] = $parent->getId();
|
| 106 |
if($categoryId == $parent->getId()) {
|
| 107 |
continue;
|
| 108 |
}
|
| 109 |
+
|
| 110 |
$key = array_search($parent->getId(),$cats);
|
| 111 |
if($key !== false) {
|
| 112 |
unset($cats[$key]);
|
| 113 |
}
|
| 114 |
}
|
| 115 |
}
|
| 116 |
+
|
| 117 |
$hierarchies = array();
|
| 118 |
foreach ($cats as $categoryId) {
|
| 119 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 120 |
+
$hierarchy = $this->getParentCategory($category, $whiteList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
if(count($hierarchy) > 0) {
|
| 122 |
$hierarchies[] = $hierarchy;
|
| 123 |
}
|
| 125 |
return $hierarchies;
|
| 126 |
}
|
| 127 |
|
| 128 |
+
private function getParentCategory($category, $whiteList) {
|
| 129 |
+
$parent = $category->getParentCategory();
|
| 130 |
+
if($parent->getParentId()) {
|
| 131 |
+
$list = $this->getParentCategory($parent, $whiteList);
|
| 132 |
+
} else {
|
| 133 |
+
$list = array();
|
| 134 |
+
}
|
| 135 |
+
if(in_array($category->getId(), $whiteList)) {
|
| 136 |
+
$name = trim($category->getName());
|
| 137 |
+
if($name != "") {
|
| 138 |
+
$list[] = $name;
|
| 139 |
+
}
|
| 140 |
+
}
|
| 141 |
+
return $list;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
public function getProductInStock($product) {
|
| 145 |
$inStock = false;
|
| 146 |
if($product->isConfigurable()) {
|
app/code/local/Addwish/Awext/Model/Observer.php
CHANGED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
<?php
|
| 2 |
class Addwish_Awext_Model_Observer
|
| 3 |
-
|
| 4 |
|
| 5 |
public function inspectCartAddData($observer=null){
|
| 6 |
$model = Mage::getModel('awext/awext')->load(1);
|
| 7 |
-
if($model->getData('enableUpsells')==1){
|
| 8 |
$request = $observer->getEvent()->getRequest();
|
| 9 |
|
| 10 |
$url = Mage::getUrl('awext/index/upsells');
|
| 11 |
Mage::getSingleton('core/session')->addSuccess('Product Added to Cart!');
|
| 12 |
$request->setParam('return_url',$url);
|
| 13 |
-
}else{
|
| 14 |
return;
|
| 15 |
}
|
| 16 |
}
|
|
@@ -21,16 +21,27 @@ class Addwish_Awext_Model_Observer
|
|
| 21 |
$email = $customer->getEmail();
|
| 22 |
Mage::getSingleton('core/session')->setAddWishEmail($email);
|
| 23 |
}
|
|
|
|
| 24 |
public function addwishHeader($observer=null){
|
| 25 |
$update=Mage::getSingleton('core/layout')->getUpdate();
|
| 26 |
$update->addHandle('addwish_head_add');
|
| 27 |
}
|
|
|
|
| 28 |
public function getbillingData($observer=null){
|
| 29 |
$addressObject=$observer->getEvent()->getQuoteAddress();
|
| 30 |
$quote = $observer->getEvent()->getQuoteAddress()->getQuote();
|
| 31 |
$email=$quote->getBillingAddress()->getEmail();
|
| 32 |
Mage::getSingleton('core/session')->setAddWishEmail($email);
|
| 33 |
}
|
| 34 |
-
}
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<?php
|
| 2 |
class Addwish_Awext_Model_Observer
|
| 3 |
+
{
|
| 4 |
|
| 5 |
public function inspectCartAddData($observer=null){
|
| 6 |
$model = Mage::getModel('awext/awext')->load(1);
|
| 7 |
+
if($model->getData('enableUpsells')==1) {
|
| 8 |
$request = $observer->getEvent()->getRequest();
|
| 9 |
|
| 10 |
$url = Mage::getUrl('awext/index/upsells');
|
| 11 |
Mage::getSingleton('core/session')->addSuccess('Product Added to Cart!');
|
| 12 |
$request->setParam('return_url',$url);
|
| 13 |
+
} else {
|
| 14 |
return;
|
| 15 |
}
|
| 16 |
}
|
| 21 |
$email = $customer->getEmail();
|
| 22 |
Mage::getSingleton('core/session')->setAddWishEmail($email);
|
| 23 |
}
|
| 24 |
+
|
| 25 |
public function addwishHeader($observer=null){
|
| 26 |
$update=Mage::getSingleton('core/layout')->getUpdate();
|
| 27 |
$update->addHandle('addwish_head_add');
|
| 28 |
}
|
| 29 |
+
|
| 30 |
public function getbillingData($observer=null){
|
| 31 |
$addressObject=$observer->getEvent()->getQuoteAddress();
|
| 32 |
$quote = $observer->getEvent()->getQuoteAddress()->getQuote();
|
| 33 |
$email=$quote->getBillingAddress()->getEmail();
|
| 34 |
Mage::getSingleton('core/session')->setAddWishEmail($email);
|
| 35 |
}
|
|
|
|
| 36 |
|
| 37 |
+
public function orderSuccess($observer) {
|
| 38 |
+
$orderIds = $observer->getEvent()->getOrderIds();
|
| 39 |
+
if (empty($orderIds) || !is_array($orderIds)) {
|
| 40 |
+
return;
|
| 41 |
+
}
|
| 42 |
+
$block = Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('addwish-conversion');
|
| 43 |
+
if ($block) {
|
| 44 |
+
$block->setOrderIds($orderIds);
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
}
|
app/code/local/Addwish/Awext/controllers/IndexController.php
CHANGED
|
@@ -52,6 +52,7 @@ class Addwish_Awext_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 52 |
|
| 53 |
// No access control on this method
|
| 54 |
public function infoAction() {
|
|
|
|
| 55 |
header("Content-type: text/xml");
|
| 56 |
echo '<?xml version="1.0" encoding="UTF-8"?><info>';
|
| 57 |
echo self::toXmlTag('version', $this->getExtensionVersion());
|
|
@@ -75,6 +76,8 @@ class Addwish_Awext_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 75 |
}
|
| 76 |
|
| 77 |
public function storesAction() {
|
|
|
|
|
|
|
| 78 |
$this->verifyAccess();
|
| 79 |
|
| 80 |
header("Content-type: text/xml");
|
|
@@ -95,6 +98,8 @@ class Addwish_Awext_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 95 |
}
|
| 96 |
|
| 97 |
public function orderListAction(){
|
|
|
|
|
|
|
| 98 |
$this->verifyAccess();
|
| 99 |
if($this->model->getData('enable_order_export')==0) {
|
| 100 |
echo "Access Denied";
|
|
@@ -158,6 +163,8 @@ class Addwish_Awext_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 158 |
|
| 159 |
public function indexAction()
|
| 160 |
{
|
|
|
|
|
|
|
| 161 |
$this->verifyAccess();
|
| 162 |
if($this->model->getData('enable_product_feed') == 0){
|
| 163 |
echo "Access Denied";
|
|
@@ -169,9 +176,11 @@ class Addwish_Awext_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 169 |
|
| 170 |
$products = Mage::getModel('catalog/product')
|
| 171 |
->getCollection()
|
|
|
|
| 172 |
->addStoreFilter(Mage::app()->getStore()->getStoreId())
|
| 173 |
->addAttributeToFilter('visibility', 4)
|
| 174 |
-
->addAttributeToSelect('*')
|
|
|
|
| 175 |
|
| 176 |
header("Content-type: text/xml");
|
| 177 |
|
|
@@ -226,7 +235,9 @@ class Addwish_Awext_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 226 |
if(is_bool($value)) {
|
| 227 |
$value = $value ? 'true' : 'false';
|
| 228 |
} else {
|
| 229 |
-
|
|
|
|
|
|
|
| 230 |
}
|
| 231 |
return "<$tag>".$value."</$tag>";
|
| 232 |
}
|
| 52 |
|
| 53 |
// No access control on this method
|
| 54 |
public function infoAction() {
|
| 55 |
+
ob_clean();
|
| 56 |
header("Content-type: text/xml");
|
| 57 |
echo '<?xml version="1.0" encoding="UTF-8"?><info>';
|
| 58 |
echo self::toXmlTag('version', $this->getExtensionVersion());
|
| 76 |
}
|
| 77 |
|
| 78 |
public function storesAction() {
|
| 79 |
+
ob_clean();
|
| 80 |
+
|
| 81 |
$this->verifyAccess();
|
| 82 |
|
| 83 |
header("Content-type: text/xml");
|
| 98 |
}
|
| 99 |
|
| 100 |
public function orderListAction(){
|
| 101 |
+
ob_clean();
|
| 102 |
+
|
| 103 |
$this->verifyAccess();
|
| 104 |
if($this->model->getData('enable_order_export')==0) {
|
| 105 |
echo "Access Denied";
|
| 163 |
|
| 164 |
public function indexAction()
|
| 165 |
{
|
| 166 |
+
ob_clean();
|
| 167 |
+
|
| 168 |
$this->verifyAccess();
|
| 169 |
if($this->model->getData('enable_product_feed') == 0){
|
| 170 |
echo "Access Denied";
|
| 176 |
|
| 177 |
$products = Mage::getModel('catalog/product')
|
| 178 |
->getCollection()
|
| 179 |
+
->addWebsiteFilter(array(Mage::app()->getStore()->getWebsiteId()))
|
| 180 |
->addStoreFilter(Mage::app()->getStore()->getStoreId())
|
| 181 |
->addAttributeToFilter('visibility', 4)
|
| 182 |
+
->addAttributeToSelect('*')
|
| 183 |
+
->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED));
|
| 184 |
|
| 185 |
header("Content-type: text/xml");
|
| 186 |
|
| 235 |
if(is_bool($value)) {
|
| 236 |
$value = $value ? 'true' : 'false';
|
| 237 |
} else {
|
| 238 |
+
// Remove control characters
|
| 239 |
+
$value = preg_replace('/[\x00-\x1F]/', '', $value);
|
| 240 |
+
$value = htmlspecialchars($value, ENT_XML1);
|
| 241 |
}
|
| 242 |
return "<$tag>".$value."</$tag>";
|
| 243 |
}
|
app/code/local/Addwish/Awext/etc/.DS_Store
DELETED
|
Binary file
|
app/code/local/Addwish/Awext/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Addwish_Awext>
|
| 5 |
-
<version>0.19.
|
| 6 |
</Addwish_Awext>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
|
@@ -25,10 +25,10 @@
|
|
| 25 |
</controller_action_layout_load_before>
|
| 26 |
<customer_register_success>
|
| 27 |
<observers>
|
| 28 |
-
<
|
| 29 |
<class>Addwish_Awext_Model_Observer</class>
|
| 30 |
<method>customerRegisterData</method>
|
| 31 |
-
</
|
| 32 |
</observers>
|
| 33 |
</customer_register_success>
|
| 34 |
<checkout_cart_add_product_complete>
|
|
@@ -39,6 +39,14 @@
|
|
| 39 |
</inspectCartAddData>
|
| 40 |
</observers>
|
| 41 |
</checkout_cart_add_product_complete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
</events>
|
| 43 |
<routers>
|
| 44 |
<awext>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Addwish_Awext>
|
| 5 |
+
<version>0.19.2</version>
|
| 6 |
</Addwish_Awext>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 25 |
</controller_action_layout_load_before>
|
| 26 |
<customer_register_success>
|
| 27 |
<observers>
|
| 28 |
+
<customerRegisterData>
|
| 29 |
<class>Addwish_Awext_Model_Observer</class>
|
| 30 |
<method>customerRegisterData</method>
|
| 31 |
+
</customerRegisterData>
|
| 32 |
</observers>
|
| 33 |
</customer_register_success>
|
| 34 |
<checkout_cart_add_product_complete>
|
| 39 |
</inspectCartAddData>
|
| 40 |
</observers>
|
| 41 |
</checkout_cart_add_product_complete>
|
| 42 |
+
<checkout_onepage_controller_success_action>
|
| 43 |
+
<observers>
|
| 44 |
+
<orderSuccess>
|
| 45 |
+
<class>Addwish_Awext_Model_Observer</class>
|
| 46 |
+
<method>orderSuccess</method>
|
| 47 |
+
</orderSuccess>
|
| 48 |
+
</observers>
|
| 49 |
+
</checkout_onepage_controller_success_action>
|
| 50 |
</events>
|
| 51 |
<routers>
|
| 52 |
<awext>
|
app/design/frontend/base/default/layout/awext.xml
CHANGED
|
@@ -12,6 +12,7 @@
|
|
| 12 |
<default>
|
| 13 |
<reference name="before_body_end">
|
| 14 |
<block type="core/template" name="addwish-tracking" template="addwish/integrator.phtml" />
|
|
|
|
| 15 |
</reference>
|
| 16 |
</default>
|
| 17 |
<catalog_product_view>
|
|
@@ -24,11 +25,6 @@
|
|
| 24 |
<block type="core/template" name="addwish-basket" template="addwish/basket-span.phtml" after="-" />
|
| 25 |
</reference>
|
| 26 |
</checkout_cart_index>
|
| 27 |
-
<checkout_onepage_success>
|
| 28 |
-
<reference name="before_body_end">
|
| 29 |
-
<block type="core/template" name="addwish-conversion" template="addwish/conversion-span.phtml" after="-" />
|
| 30 |
-
</reference>
|
| 31 |
-
</checkout_onepage_success>
|
| 32 |
<awext_index_search>
|
| 33 |
<reference name="content">
|
| 34 |
<block type="core/template" name="addwish-search-page" template="addwish/search-result-page.phtml" />
|
| 12 |
<default>
|
| 13 |
<reference name="before_body_end">
|
| 14 |
<block type="core/template" name="addwish-tracking" template="addwish/integrator.phtml" />
|
| 15 |
+
<block type="core/template" name="addwish-conversion" template="addwish/conversion-span.phtml"/>
|
| 16 |
</reference>
|
| 17 |
</default>
|
| 18 |
<catalog_product_view>
|
| 25 |
<block type="core/template" name="addwish-basket" template="addwish/basket-span.phtml" after="-" />
|
| 26 |
</reference>
|
| 27 |
</checkout_cart_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
<awext_index_search>
|
| 29 |
<reference name="content">
|
| 30 |
<block type="core/template" name="addwish-search-page" template="addwish/search-result-page.phtml" />
|
app/design/frontend/base/default/template/addwish/conversion-span.phtml
CHANGED
|
@@ -1,30 +1,27 @@
|
|
| 1 |
<?php
|
| 2 |
-
$
|
| 3 |
-
$
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
data-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
<?php
|
| 12 |
-
$cartItems
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
data-
|
| 19 |
-
data-
|
| 20 |
-
data-
|
| 21 |
-
data-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
}
|
| 28 |
-
?>
|
| 29 |
-
|
| 30 |
-
</span>
|
| 1 |
<?php
|
| 2 |
+
$orderIds = $this->getOrderIds();
|
| 3 |
+
if($orderIds && count($orderIds)) {
|
| 4 |
+
$orderId = $orderIds[0];
|
| 5 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
| 6 |
+
if($order && $order->getId()):?>
|
| 7 |
+
<span class="addwish-conversion" style="display:none;"
|
| 8 |
+
data-tax="<?php echo number_format(Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount'), 2, '.', '');?>"
|
| 9 |
+
data-ordernumber="<?php echo $order->getIncrementId();?>"
|
| 10 |
+
data-total="<?php echo number_format($order->getSubtotal(), 2, '.', '');?>">
|
| 11 |
+
<?php $cartItems= $order->getAllItems();
|
| 12 |
+
foreach($cartItems as $cartProduct):
|
| 13 |
+
$product=Mage::getModel('catalog/product')->load($cartProduct->getData('product_id'));
|
| 14 |
+
if($product->isVisibleInSiteVisibility()):?>
|
| 15 |
+
<span class="addwish-product"
|
| 16 |
+
data-unit-price="<?php echo number_format(Mage::getModel('directory/currency')->formatTxt($cartProduct->getData('price'), array('display' => Zend_Currency::NO_SYMBOL)), 2, '.', '');?>"
|
| 17 |
+
data-url="<?php echo $product->getProductUrl();?>"
|
| 18 |
+
data-id="<?php echo $product->getId();?>"
|
| 19 |
+
data-productnumber="<?php echo $product->getSku();?>"
|
| 20 |
+
data-quantity="<?php echo (int)$cartProduct->getData('qty_ordered');?>"
|
| 21 |
+
data-unit-tax="<?php echo number_format($cartProduct->getData('tax_amount'), 2, '.', '');?>">
|
| 22 |
+
</span>
|
| 23 |
+
<?php endif; ?>
|
| 24 |
+
<?php endforeach; ?>
|
| 25 |
+
</span>
|
| 26 |
+
<?php endif;
|
| 27 |
+
}
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/addwish/integrator.phtml
CHANGED
|
@@ -21,4 +21,4 @@ s.parentNode.insertBefore(aws, s);
|
|
| 21 |
<span id="addwish-data" data-formkey="<?php echo Mage::getSingleton('core/session')->getFormKey();?>" style="display:none"></span>
|
| 22 |
<?php
|
| 23 |
}
|
| 24 |
-
|
| 21 |
<span id="addwish-data" data-formkey="<?php echo Mage::getSingleton('core/session')->getFormKey();?>" style="display:none"></span>
|
| 22 |
<?php
|
| 23 |
}
|
| 24 |
+
|
package.xml
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
-
<package><name>addwish</name><version>0.19.
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
+
<package><name>addwish</name><version>0.19.2</version><stability>stable</stability><license>GNU General Public License (GPL)</license><channel>community</channel><extends></extends><summary>New multisite module</summary><description>New multisite module</description><notes>New multisite module</notes><authors><author><name>addwish</name><user>addwish</user><email>krj@addwish.com</email></author></authors><date>2017-01-17</date><time>4:56:47</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Addwish"><dir name="Awext"><dir name="Block"><dir name="Adminhtml"><dir name="Awext"><file name="View.php" hash="a5a5aa835bdbaf1102b50e90dec526a8"/><dir name="View"><file name="Tabs.php" hash="b68e152475528d168d92ca6e8ad6eafc"/><dir name="Tab"><file name="Details.php" hash="eff51a28eacafbe07577af60237ad9c4"/><file name="Recommend.php" hash="02d71705312a1de1da6445027bb0926d"/><file name="Search.php" hash="c94f0146c7529f0542100a871446c4f0"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="60c87f21438dc4a5f246b5d0e8036715"/><dir name="Adminhtml"><file name="AwextController.php" hash="1cb7469bcc2761763c27756a691b8a32"/></dir></dir><dir name="etc"><file name="config.xml" hash="fe666b82601dcb9a8019544ea99e3c78"/></dir><dir name="Helper"><file name="Data.php" hash="e28c77e3e311516bcc7c59009715e088"/></dir><dir name="Model"><file name="Awext.php" hash="1925cb6fd94cc7cd6baecda71964a424"/><file name="Observer.php" hash="510c80ff97a3d611f1f6bb9b54d486bb"/><dir name="Mysql4"><file name="Awext.php" hash="acd112233e367ebe80caf114f5dfe653"/><dir name="Awext"><file name="Collection.php" hash="12afe62372c67a5bd9154695c8d095f3"/></dir></dir></dir><dir name="sql"><dir name="addwish_setup"><file name="mysql4-install-0.0.4.php" hash="77a5d3d50380396c9bd2a9dfdfea8905"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="awext.xml" hash="b632bf4a38cfb992303f97cd7a449a15"/></dir><dir name="template"><dir name="awext"><file name="list.phtml" hash="36b662e22b3586bc1cb601c6e1fb9392"/><file name="recommendations.phtml" hash="f8e63393c235903babd5a27a68b4a054"/><file name="search.phtml" hash="82d7130e256b0689d3b1682bf097fa55"/><file name="store-selector.phtml" hash="275b91522d136265f22de6550c7ca6dc"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="awext.xml" hash="d9e749008e9d97afd7b75855857a18b3"/></dir><dir name="template"><dir name="addwish"><file name="addwish-head.phtml" hash="c5b6fa2cae55ad1ddd4a5c64f8d532f6"/><file name="basket-span.phtml" hash="e94f8c7f460ab66e3906fcc0e3fdf76b"/><file name="conversion-span.phtml" hash="0d9368e73977b4e9c1c0fb00d34cb01c"/><file name="integrator.phtml" hash="0a41e4e5c3f63f05dfce43040e52dd53"/><file name="product-span.phtml" hash="4d2e243368b2ece3f8126400bdce6413"/><file name="search-result-page.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="upsells-page.phtml" hash="ac41002da8c7bb57233599a00053ef77"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Addwish_Awext.xml" hash="fea2883f86536f249670eea31980f72c"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="addwish.css" hash="df6e33a58cf2381ceaba72253a29796d"/></dir><dir name="images"><dir name="addwish"><file name="addwish.png" hash="a588d24d1919d9206eff40a886b88ef1"/></dir></dir></dir></dir></dir></dir></target></contents></package>
|
