Version Notes
No comments
Download this release
Release Info
Developer | Remarkety |
Extension | Remarkety_Mgconnector |
Version | 1.4.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.5.0 to 1.4.6.1
CHANGELOG.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1.4.5.0
|
2 |
-------
|
3 |
- bugfix in install model
|
1 |
+
1.4.6.1
|
2 |
+
-------
|
3 |
+
- bugfix - Send products which have become disabled
|
4 |
+
- Efficiently query and send inventory information
|
5 |
+
|
6 |
+
1.4.6.0
|
7 |
+
-------
|
8 |
+
- bugfix - customer email address on webtracking bypass cache
|
9 |
+
|
10 |
1.4.5.0
|
11 |
-------
|
12 |
- bugfix in install model
|
app/code/community/Remarkety/Mgconnector/Model/Core.php
CHANGED
@@ -173,6 +173,7 @@ class Remarkety_Mgconnector_Model_Core extends Mage_Core_Model_Abstract {
|
|
173 |
'cost',
|
174 |
'url_path',
|
175 |
'is_in_stock',
|
|
|
176 |
'parent_id'
|
177 |
)
|
178 |
);
|
@@ -824,7 +825,7 @@ class Remarkety_Mgconnector_Model_Core extends Mage_Core_Model_Abstract {
|
|
824 |
|
825 |
try {
|
826 |
$this->_debug(__FUNCTION__, REMARKETY_MGCONNECTOR_CALLED_STATUS, null, $myArgs);
|
827 |
-
$
|
828 |
->getCollection()
|
829 |
->setStoreId($mage_store_id)
|
830 |
->applyFrontendPriceLimitations()
|
@@ -834,28 +835,42 @@ class Remarkety_Mgconnector_Model_Core extends Mage_Core_Model_Abstract {
|
|
834 |
// ->addUrlRewrite()
|
835 |
->addAttributeToSelect('*');
|
836 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
837 |
if ($updated_at_min != null) {
|
838 |
-
$
|
|
|
839 |
}
|
840 |
|
841 |
if ($updated_at_max != null) {
|
842 |
-
$
|
|
|
843 |
}
|
844 |
|
845 |
if ($since_id != null) {
|
846 |
-
$
|
|
|
847 |
}
|
848 |
|
849 |
if ($created_at_min != null) {
|
850 |
-
$
|
|
|
851 |
}
|
852 |
|
853 |
if ($created_at_max != null) {
|
854 |
-
$
|
|
|
855 |
}
|
856 |
|
857 |
if ($product_id != null) {
|
858 |
-
$
|
|
|
859 |
}
|
860 |
|
861 |
if ($limit != null) {
|
@@ -869,20 +884,47 @@ class Remarkety_Mgconnector_Model_Core extends Mage_Core_Model_Abstract {
|
|
869 |
}
|
870 |
}
|
871 |
|
872 |
-
if (!is_null($pageSize))
|
|
|
|
|
|
|
873 |
|
874 |
$storeUrl = Mage::app()->getStore($mage_store_id)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, true);
|
875 |
|
876 |
$productIds = array();
|
877 |
-
|
878 |
-
|
|
|
|
|
|
|
|
|
|
|
879 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
880 |
$this->loadProducts($mage_store_id, $productIds);
|
881 |
|
882 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
// $product->setStoreId($mage_store_view_id)->load($product->getId());
|
884 |
$productData = $product->toArray();
|
885 |
-
|
886 |
$productData['base_image'] = $this->getImageUrl($product, 'image', $mage_store_id); //will bring base image (for backwards compatibility)
|
887 |
$productData['small_image'] = $this->getImageUrl($product, 'small', $mage_store_id);
|
888 |
$productData['thumbnail_image'] = $this->getImageUrl($product, 'thumbnail', $mage_store_id);
|
@@ -895,6 +937,8 @@ class Remarkety_Mgconnector_Model_Core extends Mage_Core_Model_Abstract {
|
|
895 |
$productData['name'] = $this->getProductName($product, $mage_store_id);
|
896 |
$productData['is_salable'] = $product->isSalable();
|
897 |
$productData['visibility'] = $product->getVisibility();
|
|
|
|
|
898 |
|
899 |
/*
|
900 |
VISIBILITY_BOTH = 4
|
173 |
'cost',
|
174 |
'url_path',
|
175 |
'is_in_stock',
|
176 |
+
'inventory',
|
177 |
'parent_id'
|
178 |
)
|
179 |
);
|
825 |
|
826 |
try {
|
827 |
$this->_debug(__FUNCTION__, REMARKETY_MGCONNECTOR_CALLED_STATUS, null, $myArgs);
|
828 |
+
$productCollectionWithPrices = Mage::getModel("catalog/product")
|
829 |
->getCollection()
|
830 |
->setStoreId($mage_store_id)
|
831 |
->applyFrontendPriceLimitations()
|
835 |
// ->addUrlRewrite()
|
836 |
->addAttributeToSelect('*');
|
837 |
|
838 |
+
$productCollectionWithoutPrices = Mage::getModel("catalog/product")
|
839 |
+
->getCollection()
|
840 |
+
->setStoreId($mage_store_id)
|
841 |
+
// ->applyFrontendPriceLimitations()
|
842 |
+
->addOrder('updated_at', 'ASC')
|
843 |
+
->addCategoryIds()
|
844 |
+
// ->addUrlRewrite()
|
845 |
+
->addAttributeToSelect('*');
|
846 |
if ($updated_at_min != null) {
|
847 |
+
$productCollectionWithPrices->addAttributeToFilter('updated_at', array('gt' => $updated_at_min));
|
848 |
+
$productCollectionWithoutPrices->addAttributeToFilter('updated_at', array('gt' => $updated_at_min));
|
849 |
}
|
850 |
|
851 |
if ($updated_at_max != null) {
|
852 |
+
$productCollectionWithPrices->addAttributeToFilter('updated_at', array('lt' => $updated_at_max));
|
853 |
+
$productCollectionWithoutPrices->addAttributeToFilter('updated_at', array('lt' => $updated_at_max));
|
854 |
}
|
855 |
|
856 |
if ($since_id != null) {
|
857 |
+
$productCollectionWithPrices->addAttributeToFilter('entity_id', array('gt' => $since_id));
|
858 |
+
$productCollectionWithoutPrices->addAttributeToFilter('entity_id', array('gt' => $since_id));
|
859 |
}
|
860 |
|
861 |
if ($created_at_min != null) {
|
862 |
+
$productCollectionWithPrices->addAttributeToFilter('created_at', array('gt' => $created_at_min));
|
863 |
+
$productCollectionWithoutPrices->addAttributeToFilter('created_at', array('gt' => $created_at_min));
|
864 |
}
|
865 |
|
866 |
if ($created_at_max != null) {
|
867 |
+
$productCollectionWithPrices->addAttributeToFilter('created_at', array('lt' => $created_at_max));
|
868 |
+
$productCollectionWithoutPrices->addAttributeToFilter('created_at', array('lt' => $created_at_max));
|
869 |
}
|
870 |
|
871 |
if ($product_id != null) {
|
872 |
+
$productCollectionWithPrices->addAttributeToFilter('entity_id', $product_id);
|
873 |
+
$productCollectionWithoutPrices->addAttributeToFilter('entity_id', $product_id);
|
874 |
}
|
875 |
|
876 |
if ($limit != null) {
|
884 |
}
|
885 |
}
|
886 |
|
887 |
+
if (!is_null($pageSize)) {
|
888 |
+
$productCollectionWithPrices->setPage($pageNumber, $pageSize);
|
889 |
+
$productCollectionWithoutPrices->setPage($pageNumber, $pageSize);
|
890 |
+
}
|
891 |
|
892 |
$storeUrl = Mage::app()->getStore($mage_store_id)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, true);
|
893 |
|
894 |
$productIds = array();
|
895 |
+
$products = array();
|
896 |
+
foreach ($productCollectionWithPrices as $product) {
|
897 |
+
$productId = $product->getId();
|
898 |
+
if (!in_array($productId, $productIds)) {
|
899 |
+
$productIds[] = $productId;
|
900 |
+
$products[] = $product;
|
901 |
+
}
|
902 |
}
|
903 |
+
|
904 |
+
foreach ($productCollectionWithoutPrices as $product) {
|
905 |
+
$productId = $product->getId();
|
906 |
+
if (!in_array($productId, $productIds)) {
|
907 |
+
$productIds[] = $productId;
|
908 |
+
$products[] = $product;
|
909 |
+
}
|
910 |
+
}
|
911 |
+
|
912 |
$this->loadProducts($mage_store_id, $productIds);
|
913 |
|
914 |
+
$stockItemCollection = Mage::getModel('cataloginventory/stock_item')
|
915 |
+
->getCollection()
|
916 |
+
->addProductsFilter($productIds);
|
917 |
+
$inventories = array();
|
918 |
+
foreach ($stockItemCollection as $stockItem) {
|
919 |
+
$productId = $stockItem->getProductId();
|
920 |
+
$qty = $stockItem->getQty();
|
921 |
+
$inventories[$productId] = $qty;
|
922 |
+
}
|
923 |
+
|
924 |
+
foreach ($products as $product) {
|
925 |
// $product->setStoreId($mage_store_view_id)->load($product->getId());
|
926 |
$productData = $product->toArray();
|
927 |
+
$productId = $product->getId();
|
928 |
$productData['base_image'] = $this->getImageUrl($product, 'image', $mage_store_id); //will bring base image (for backwards compatibility)
|
929 |
$productData['small_image'] = $this->getImageUrl($product, 'small', $mage_store_id);
|
930 |
$productData['thumbnail_image'] = $this->getImageUrl($product, 'thumbnail', $mage_store_id);
|
937 |
$productData['name'] = $this->getProductName($product, $mage_store_id);
|
938 |
$productData['is_salable'] = $product->isSalable();
|
939 |
$productData['visibility'] = $product->getVisibility();
|
940 |
+
if (key_exists($productId, $inventories))
|
941 |
+
$productData['inventory'] = $inventories[$productId];
|
942 |
|
943 |
/*
|
944 |
VISIBILITY_BOTH = 4
|
app/code/community/Remarkety/Mgconnector/controllers/WebtrackingController.php
CHANGED
@@ -23,7 +23,8 @@ class Remarkety_Mgconnector_WebtrackingController extends Mage_Core_Controller_F
|
|
23 |
|
24 |
private function getEmail(){
|
25 |
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
26 |
-
|
|
|
27 |
}
|
28 |
$email = Mage::getSingleton('customer/session')->getSubscriberEmail();
|
29 |
return empty($email) ? false : $email;
|
23 |
|
24 |
private function getEmail(){
|
25 |
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
26 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
27 |
+
return $customer->getEmail();
|
28 |
}
|
29 |
$email = Mage::getSingleton('customer/session')->getSubscriberEmail();
|
30 |
return empty($email) ? false : $email;
|
app/code/community/Remarkety/Mgconnector/etc/config.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<config>
|
2 |
<modules>
|
3 |
<Remarkety_Mgconnector>
|
4 |
-
<version>1.4.
|
5 |
</Remarkety_Mgconnector>
|
6 |
</modules>
|
7 |
<global>
|
1 |
<config>
|
2 |
<modules>
|
3 |
<Remarkety_Mgconnector>
|
4 |
+
<version>1.4.6.1</version>
|
5 |
</Remarkety_Mgconnector>
|
6 |
</modules>
|
7 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Remarkety_Mgconnector</name>
|
4 |
-
<version>1.4.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
|
7 |
<channel>community</channel>
|
@@ -9,11 +9,11 @@
|
|
9 |
<summary>Remarkety Magento Connector</summary>
|
10 |
<description>Remarkety Magento Connector</description>
|
11 |
<notes>No comments</notes>
|
12 |
-
<date>2016-06-
|
13 |
-
<time>
|
14 |
<contents>
|
15 |
<target name="magecommunity">
|
16 |
-
<dir name="Remarkety"><dir name="Mgconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><dir name="Complete"><file name="Form.php" hash="dc799532128513364fc3afd17eabb78b"/></dir><file name="Complete.php" hash="b9f7b4ecbd2be587c0efbd16523b167e"/><dir name="Configuration"><file name="Form.php" hash="89b286409ad9d64ae8e51e314198f427"/></dir><file name="Configuration.php" hash="67b3b564c2c3123301f5f97b2b258a7a"/><dir name="Install"><file name="Form.php" hash="59541fe2ad9a49b9fb56a41f00e6a591"/></dir><file name="Install.php" hash="f631fcdfd86d2bc416eb1ad4422fc20c"/><dir name="Upgrade"><file name="Form.php" hash="598f83eca99d0153537e22f9ee6b1934"/></dir><file name="Upgrade.php" hash="c672741b0407f108d2266dd939590846"/></dir><file name="Configuration.php" hash="bf0c9aabe92f669694e0699c009b2a9c"/><dir name="Install"><dir name="Complete"><file name="Form.php" hash="5992149b9ff2d2a7c2b008d98098362d"/></dir><file name="Complete.php" hash="452944c613b88ede358ee4dacd562d05"/><dir name="Install"><dir name="Create"><file name="Form.php" hash="65d98f1449ce6af413a3185692e07533"/></dir><file name="Create.php" hash="0d3182923fd5542e3d0a757625a85ae4"/><dir name="Login"><file name="Form.php" hash="a58c19056e47c7851eb6a5f40517f757"/></dir><file name="Login.php" hash="3ee61a883f843c55b1b32a328af84322"/></dir><dir name="Upgrade"><file name="Form.php" hash="6f4e2ac19d30115de4e275fdb8dca5b6"/></dir><file name="Upgrade.php" hash="f16ba61a8c86007bbc0a980e8faeade1"/><dir name="Welcome"><file name="Form.php" hash="58cb26cc7555498bd0367c77a99c8d60"/><file name="Store.php" hash="9f3b5c7bbd9f4d7201189598e5a64cc4"/></dir><file name="Welcome.php" hash="86589c79b5c38ea5f25d58ac932f33cb"/></dir><dir name="Queue"><dir name="Configure"><file name="Form.php" hash="9f754c625055984f7c145e56aaf46245"/></dir><file name="Configure.php" hash="03d5ebf7644462904c439d172cde3afc"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="EventType.php" hash="4ac5971c368b70efa96b4c8297c85c3c"/><file name="Status.php" hash="ec57ddafc2515b952958e6ace6de22ec"/></dir></dir></dir><file name="Grid.php" hash="74d5f3b18d76cdf8219e2d39a83a2f7c"/></dir><file name="Queue.php" hash="2c905cc54a6c08d4d73a392d5b95a25c"/></dir><dir name="Tracking"><file name="Base.php" hash="5e0f245ac5ee59d2f6c6f35087059b56"/><file name="General.php" hash="9ca2796c6f2bf9233553e6b782f3722b"/><file name="Product.php" hash="3a0c1b1a5fcbd23d1dcd04714742ebe9"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b27f970b943e6e989e9061275cc25c7b"/><file name="Links.php" hash="8bb36c918e956663113646183bd33c4c"/><file name="Urls.php" hash="ce396940c96bf8139da8ec59bb498acf"/></dir><dir name="Model"><dir name="Core"><file name="Api.php" hash="948c7965f7fe9d044b532314aaa8e0f9"/></dir><file name="Core.php" hash="
|
17 |
<target name="mageetc">
|
18 |
<dir name="modules"><file name="Remarkety_Mgconnector.xml" hash="d584b234f653fbf34376e7dcb8caf117"/></dir></target>
|
19 |
<target name="magedesign">
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Remarkety_Mgconnector</name>
|
4 |
+
<version>1.4.6.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>Remarkety Magento Connector</summary>
|
10 |
<description>Remarkety Magento Connector</description>
|
11 |
<notes>No comments</notes>
|
12 |
+
<date>2016-06-29</date>
|
13 |
+
<time>14-48-52</time>
|
14 |
<contents>
|
15 |
<target name="magecommunity">
|
16 |
+
<dir name="Remarkety"><dir name="Mgconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><dir name="Complete"><file name="Form.php" hash="dc799532128513364fc3afd17eabb78b"/></dir><file name="Complete.php" hash="b9f7b4ecbd2be587c0efbd16523b167e"/><dir name="Configuration"><file name="Form.php" hash="89b286409ad9d64ae8e51e314198f427"/></dir><file name="Configuration.php" hash="67b3b564c2c3123301f5f97b2b258a7a"/><dir name="Install"><file name="Form.php" hash="59541fe2ad9a49b9fb56a41f00e6a591"/></dir><file name="Install.php" hash="f631fcdfd86d2bc416eb1ad4422fc20c"/><dir name="Upgrade"><file name="Form.php" hash="598f83eca99d0153537e22f9ee6b1934"/></dir><file name="Upgrade.php" hash="c672741b0407f108d2266dd939590846"/></dir><file name="Configuration.php" hash="bf0c9aabe92f669694e0699c009b2a9c"/><dir name="Install"><dir name="Complete"><file name="Form.php" hash="5992149b9ff2d2a7c2b008d98098362d"/></dir><file name="Complete.php" hash="452944c613b88ede358ee4dacd562d05"/><dir name="Install"><dir name="Create"><file name="Form.php" hash="65d98f1449ce6af413a3185692e07533"/></dir><file name="Create.php" hash="0d3182923fd5542e3d0a757625a85ae4"/><dir name="Login"><file name="Form.php" hash="a58c19056e47c7851eb6a5f40517f757"/></dir><file name="Login.php" hash="3ee61a883f843c55b1b32a328af84322"/></dir><dir name="Upgrade"><file name="Form.php" hash="6f4e2ac19d30115de4e275fdb8dca5b6"/></dir><file name="Upgrade.php" hash="f16ba61a8c86007bbc0a980e8faeade1"/><dir name="Welcome"><file name="Form.php" hash="58cb26cc7555498bd0367c77a99c8d60"/><file name="Store.php" hash="9f3b5c7bbd9f4d7201189598e5a64cc4"/></dir><file name="Welcome.php" hash="86589c79b5c38ea5f25d58ac932f33cb"/></dir><dir name="Queue"><dir name="Configure"><file name="Form.php" hash="9f754c625055984f7c145e56aaf46245"/></dir><file name="Configure.php" hash="03d5ebf7644462904c439d172cde3afc"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="EventType.php" hash="4ac5971c368b70efa96b4c8297c85c3c"/><file name="Status.php" hash="ec57ddafc2515b952958e6ace6de22ec"/></dir></dir></dir><file name="Grid.php" hash="74d5f3b18d76cdf8219e2d39a83a2f7c"/></dir><file name="Queue.php" hash="2c905cc54a6c08d4d73a392d5b95a25c"/></dir><dir name="Tracking"><file name="Base.php" hash="5e0f245ac5ee59d2f6c6f35087059b56"/><file name="General.php" hash="9ca2796c6f2bf9233553e6b782f3722b"/><file name="Product.php" hash="3a0c1b1a5fcbd23d1dcd04714742ebe9"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b27f970b943e6e989e9061275cc25c7b"/><file name="Links.php" hash="8bb36c918e956663113646183bd33c4c"/><file name="Urls.php" hash="ce396940c96bf8139da8ec59bb498acf"/></dir><dir name="Model"><dir name="Core"><file name="Api.php" hash="948c7965f7fe9d044b532314aaa8e0f9"/></dir><file name="Core.php" hash="7f1989c8e305138d72aaf28239fa2813"/><file name="Install.php" hash="fc260ea02ba27273cd51e7051c953cce"/><file name="Observer.php" hash="8975e5b8d9802b616d9b177cd1e58599"/><file name="Queue.php" hash="3a0fda4b18ec947c20e6e81cc1e995de"/><file name="Recovery.php" hash="bd856fdd5788e00bcf29a67446ad8ef1"/><file name="Request.php" hash="47e81216d7bca3f0aba93bf816298221"/><dir name="Resource"><file name="Coupon.php" hash="6079c05e422e9c1ad5327fc881cee7e3"/><dir name="Queue"><file name="Collection.php" hash="ce59b04c8a8146f5094d6622134885d3"/></dir><file name="Queue.php" hash="971a539849d0cde2e413b0642403a6ca"/><dir name="Rule"><file name="Collection.php" hash="d57fff76c25dab67dbdbbd57b3afdfdf"/></dir><file name="Setup.php" hash="13253a5b7a2749f4a3bc84e32e31e27c"/></dir><file name="Webtracking.php" hash="4b2d9d73dcc8d68b40f375f6c55c4999"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConfigureController.php" hash="b4e51acf22ea798e2d2144a4672bc30f"/><file name="InstallController.php" hash="cebbe5f80c59d6fbc18eecff20e7d432"/><file name="MgconnectorController.php" hash="a8e55464624c5fa9e9641cf97f963b3b"/><file name="QueueController.php" hash="5de347b6e0f6d04a19817097ab44bff3"/></dir><file name="RecoveryController.php" hash="0a53efaef9019c6b661fe494067473e3"/><file name="WebtrackingController.php" hash="fd2c5034d94161c0e6f7f4e6b5816a55"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c555aaf95943f74e1c29032e3ed385a1"/><file name="api.xml" hash="9f6d5fd3330bb0640f97efc3f819e684"/><file name="config.xml" hash="7a4bf2ed3f8bd6955a3f9e97c0639ccd"/></dir><dir name="sql"><dir name="mgconnector_setup"><file name="mysql4-install-1.0.0.13.php" hash="d1033ffd3d6b13af28ad4082d5744c25"/><file name="mysql4-upgrade-1.0.0.13-1.0.0.14.php" hash="db871ba73f3dcc7abfb806991edc12f1"/><file name="mysql4-upgrade-1.0.0.14-1.0.0.15.php" hash="c9ced7a4a2e85c9d594e9f97320cab58"/><file name="mysql4-upgrade-1.0.0.14-1.1.0.0.php" hash="fd445e8c179cdb2718a85adec05c5343"/><file name="mysql4-upgrade-1.1.0.5-1.1.0.6.php" hash="e24831cfd077827ba545f7ea71669729"/><file name="mysql4-upgrade-1.1.2.8-1.3.0.0.php" hash="97bbb9e411bcd45f875f29fcc8c8b420"/></dir></dir></dir></dir></target>
|
17 |
<target name="mageetc">
|
18 |
<dir name="modules"><file name="Remarkety_Mgconnector.xml" hash="d584b234f653fbf34376e7dcb8caf117"/></dir></target>
|
19 |
<target name="magedesign">
|