Version Notes
Minor fixes
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Atosho |
| Version | 1.1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.0 to 1.1.1
app/code/community/Atosho/Integration/controllers/FeedController.php
CHANGED
|
@@ -464,6 +464,35 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
|
|
| 464 |
$collection->addAttributeToFilter('type_id', array('in' => array('simple', 'configurable')));
|
| 465 |
}
|
| 466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 467 |
if (isset($params['page'])) {
|
| 468 |
$page = $params['page'];
|
| 469 |
$size = (isset($params['size']) ? $params['size'] : 100);
|
|
@@ -695,11 +724,15 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
|
|
| 695 |
// Images
|
| 696 |
$images = array();
|
| 697 |
if (!in_array($product->getImage(), array('no_selection', ''))) {
|
| 698 |
-
$
|
|
|
|
|
|
|
| 699 |
}
|
| 700 |
foreach ($product->getMediaGalleryImages() as $image) {
|
| 701 |
if (!$image['disabled']) {
|
| 702 |
-
$
|
|
|
|
|
|
|
| 703 |
}
|
| 704 |
}
|
| 705 |
|
|
@@ -708,10 +741,14 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
|
|
| 708 |
$p['reusefrommaster'] = true;
|
| 709 |
$parentProduct = Mage::getModel('catalog/product');
|
| 710 |
$parentProduct->load($parentId);
|
| 711 |
-
$
|
|
|
|
|
|
|
| 712 |
foreach ($parentProduct->getMediaGalleryImages() as $image) {
|
| 713 |
if (!$image['disabled']) {
|
| 714 |
-
$
|
|
|
|
|
|
|
| 715 |
}
|
| 716 |
}
|
| 717 |
|
| 464 |
$collection->addAttributeToFilter('type_id', array('in' => array('simple', 'configurable')));
|
| 465 |
}
|
| 466 |
|
| 467 |
+
if (isset($params['title'])) {
|
| 468 |
+
$collection->addAttributeToFilter('name', array('like' => $params['title']));
|
| 469 |
+
}
|
| 470 |
+
if (isset($params['description'])) {
|
| 471 |
+
$collection->addAttributeToFilter('description', array('like' => $params['description']));
|
| 472 |
+
}
|
| 473 |
+
if (isset($params['price'])) {
|
| 474 |
+
var_dump(is_numeric($params['price']));
|
| 475 |
+
$price = $params['price'];
|
| 476 |
+
if (is_numeric($price)) {
|
| 477 |
+
$collection->addAttributeToFilter('price', array('eq' => $price));
|
| 478 |
+
}
|
| 479 |
+
else {
|
| 480 |
+
$modifiers = array(
|
| 481 |
+
'<=' => 'lteq',
|
| 482 |
+
'>=' => 'gteq',
|
| 483 |
+
'<' => 'lt',
|
| 484 |
+
'>' => 'gt',
|
| 485 |
+
);
|
| 486 |
+
foreach ($modifiers as $search => $use) {
|
| 487 |
+
if (strpos($price, $search) === 0) {
|
| 488 |
+
$price = substr($price, strlen($search));
|
| 489 |
+
echo $use;
|
| 490 |
+
$collection->addAttributeToFilter('price', array($use => $price));
|
| 491 |
+
break;
|
| 492 |
+
}
|
| 493 |
+
}
|
| 494 |
+
}
|
| 495 |
+
}
|
| 496 |
if (isset($params['page'])) {
|
| 497 |
$page = $params['page'];
|
| 498 |
$size = (isset($params['size']) ? $params['size'] : 100);
|
| 724 |
// Images
|
| 725 |
$images = array();
|
| 726 |
if (!in_array($product->getImage(), array('no_selection', ''))) {
|
| 727 |
+
$imageUrl = $product->getImage();
|
| 728 |
+
if (substr($imageUrl, 0, 1) != '/') $imageUrl = '/'.$imageUrl;
|
| 729 |
+
$images[$product->getImage()] = $this->mediaUrl.'catalog/product'.$imageUrl;
|
| 730 |
}
|
| 731 |
foreach ($product->getMediaGalleryImages() as $image) {
|
| 732 |
if (!$image['disabled']) {
|
| 733 |
+
$imageUrl = $image['file'];
|
| 734 |
+
if (substr($imageUrl, 0, 1) != '/') $imageUrl = '/'.$imageUrl;
|
| 735 |
+
$images[$image['file']] = $this->mediaUrl.'catalog/product'.$imageUrl;
|
| 736 |
}
|
| 737 |
}
|
| 738 |
|
| 741 |
$p['reusefrommaster'] = true;
|
| 742 |
$parentProduct = Mage::getModel('catalog/product');
|
| 743 |
$parentProduct->load($parentId);
|
| 744 |
+
$imageUrl = $parentProduct->getImage();
|
| 745 |
+
if (substr($imageUrl, 0, 1) != '/') $imageUrl = '/'.$imageUrl;
|
| 746 |
+
$parentImages[$parentProduct->getImage()] = $this->mediaUrl.'catalog/product'.$imageUrl;
|
| 747 |
foreach ($parentProduct->getMediaGalleryImages() as $image) {
|
| 748 |
if (!$image['disabled']) {
|
| 749 |
+
$imageUrl = $image['file'];
|
| 750 |
+
if (substr($imageUrl, 0, 1) != '/') $imageUrl = '/'.$imageUrl;
|
| 751 |
+
$parentImages[$image['file']] = $this->mediaUrl.'catalog/product'.$imageUrl;
|
| 752 |
}
|
| 753 |
}
|
| 754 |
|
app/code/community/Atosho/Integration/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Atosho_Integration>
|
| 5 |
-
<version>1.1.
|
| 6 |
</Atosho_Integration>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Atosho_Integration>
|
| 5 |
+
<version>1.1.1</version>
|
| 6 |
</Atosho_Integration>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
app/code/community/Atosho/Integration/sql/atosho_integration_setup/mysql4-install-1.0.2.php
CHANGED
|
@@ -11,7 +11,10 @@ foreach ($stores as $store) {
|
|
| 11 |
}
|
| 12 |
}
|
| 13 |
|
| 14 |
-
$body = 'Magento '.Mage::getVersion().PHP_EOL.PHP_EOL
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
$mail = new Zend_Mail();
|
| 17 |
$mail->setFrom('magento@atosho.com', $host);
|
| 11 |
}
|
| 12 |
}
|
| 13 |
|
| 14 |
+
$body = 'Magento '.Mage::getVersion().PHP_EOL.PHP_EOL
|
| 15 |
+
.implode(PHP_EOL, $storeUrls).PHP_EOL.PHP_EOL
|
| 16 |
+
.$_SERVER['SERVER_NAME'].' ('.$_SERVER['SERVER_ADDR'].')'
|
| 17 |
+
.PHP_EOL.$_SERVER['HTTP_HOST'];
|
| 18 |
|
| 19 |
$mail = new Zend_Mail();
|
| 20 |
$mail->setFrom('magento@atosho.com', $host);
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Atosho</name>
|
| 4 |
-
<version>1.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL-3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Atosho.com product and order integration</summary>
|
| 10 |
<description>Exposes product catalog to Atosho in the form of an XML feed. Creates a new payment method called 'Atosho Payment' which indicates that an order has been paid through Atosho.</description>
|
| 11 |
-
<notes>
|
| 12 |
<authors><author><name>Atosho</name><user>auto-converted</user><email>magento@atosho.com</email></author></authors>
|
| 13 |
-
<date>2012-
|
| 14 |
-
<time>12:
|
| 15 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Atosho_All.xml" hash="80137c2c28f206ab9a22ffe1f9dbb58b"/></dir></target><target name="magecommunity"><dir name="Atosho"><dir name="Integration"><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="814ccf08196d33a81a8a70485b7c6a2c"/></dir></dir><dir name="controllers"><file name="FeedController.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Atosho</name>
|
| 4 |
+
<version>1.1.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL-3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Atosho.com product and order integration</summary>
|
| 10 |
<description>Exposes product catalog to Atosho in the form of an XML feed. Creates a new payment method called 'Atosho Payment' which indicates that an order has been paid through Atosho.</description>
|
| 11 |
+
<notes>Minor fixes</notes>
|
| 12 |
<authors><author><name>Atosho</name><user>auto-converted</user><email>magento@atosho.com</email></author></authors>
|
| 13 |
+
<date>2012-06-04</date>
|
| 14 |
+
<time>12:04:54</time>
|
| 15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Atosho_All.xml" hash="80137c2c28f206ab9a22ffe1f9dbb58b"/></dir></target><target name="magecommunity"><dir name="Atosho"><dir name="Integration"><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="814ccf08196d33a81a8a70485b7c6a2c"/></dir></dir><dir name="controllers"><file name="FeedController.php" hash="b1942ad58cbf0e484571b50f1cdf9231"/></dir><dir name="etc"><file name="config.xml" hash="2b124fee13c4cae7e097a8e05a775ea0"/></dir><dir name="sql"><dir name="atosho_integration_setup"><file name="mysql4-install-1.0.2.php" hash="02d4fc9fdd1a0fc74a6199409c9ce8a6"/></dir></dir></dir><dir name="AtoshoPayment"><dir name="Model"><file name="AtoshoPayment.php" hash="7d9afd8abc45ca252ccf36ed7f70c27f"/></dir><dir name="etc"><file name="config.xml" hash="30b5190de1b9b2cb1d3759995ca7c2ff"/><file name="system.xml" hash="ca3e25cb7ceef0da772eb88f91dd32cc"/></dir></dir><dir name="Shipping"><dir name="Model"><dir name="Carrier"><file name="Atosho.php" hash="dcd80ea031ec160eadadac847e80973b"/></dir></dir><dir name="etc"><file name="config.xml" hash="6770b1b833aa1454da307015fdbe5216"/><file name="system.xml" hash="96c2ade90fd06ab5bc3ef787a2af029a"/></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
