SooqrSearch - Version 1.0.4.4

Version Notes

Changes since 1.0.4.3
- Better support for multiselect attributefields.

Changes since 1.0.4
- Better support for additional product types.

Changes since 1.0.3.1
- Plugin now reports basic configuration settings to the mySooqr backend.

Changes since 1.0.3
- Small bugfix for new installations

Changes since 1.0.2
- New price option for Grouped products.
- Input validation for account information.

Changes since 1.0.1
- Bugfix: default field mapping was incorrect
- Images are now scaled to 120x120 pixels

Changes since 0.4.5
- First public release of SooqrSearch plugin.

Changes since 0.4.4
- Grouping configurable products into one item.

Changes since 0.4.3
- Improved support for configurable products

Changes since 0.4.2
- Bugfix: tax class was named incorrectly
- Feed is now generated for the active (of specified) store.

Changes since 0.4.1
- Added configuration option to export all custom attributes

Changes since 0.4.0
- Support for exporting all user defined attributes

Changes since 0.3.5
- Complete rebuild of the module. Custom fields can now be specified in the configuration screen.

Changes since 0.3.4
- Additional checks on attribute existence

Changes since 0.3.3
- Debugging option added

Changes since 0.3.2
- Bugfix: manufacterer field is not always available
- Changes to the visibility of configuration fields

Download this release

Release Info

Developer internetbureau Websight
Extension SooqrSearch
Version 1.0.4.4
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.4.4

app/code/community/Sooqr/Feed/Model/Generator.php CHANGED
@@ -269,7 +269,10 @@ class Sooqr_Feed_Model_Generator extends Varien_Object
269
  $parentEntityId = null;
270
 
271
  // Initialize the mapping for this product type
272
- $oProductMap = $this->_getProductMapModel($row['type_id'], array());
 
 
 
273
 
274
  // Load the current product
275
  $oProduct = Mage::getModel('catalog/product');
@@ -604,10 +607,6 @@ class Sooqr_Feed_Model_Generator extends Varien_Object
604
 
605
  switch ($typeId)
606
  {
607
- case 'abstract':
608
- $oProductMap = Mage::getModel('feed/map_product_abstract', $params);
609
- break;
610
-
611
  case 'simple':
612
  if ($isAssoc)
613
  {
@@ -619,20 +618,17 @@ class Sooqr_Feed_Model_Generator extends Varien_Object
619
  }
620
  break;
621
 
 
622
  case 'configurable':
623
- $oProductMap = Mage::getModel('feed/map_product_configurable', $params);
624
- break;
625
-
626
  case 'bundle':
627
- $oProductMap = Mage::getModel('feed/map_product_bundle', $params);
 
 
 
628
  break;
629
-
630
  default:
631
- $oProductMap = Mage::getModel('feed/map_product_'.$typeId, $params);
632
- if ($oProductMap === false)
633
- {
634
- Mage::throwException(sprintf('Product type \'%s\' isn\'t allowed.', $typeId));
635
- }
636
  }
637
 
638
  return $oProductMap;
269
  $parentEntityId = null;
270
 
271
  // Initialize the mapping for this product type
272
+ if (is_null($oProductMap = $this->_getProductMapModel($row['type_id'], array())))
273
+ {
274
+ return false;
275
+ }
276
 
277
  // Load the current product
278
  $oProduct = Mage::getModel('catalog/product');
607
 
608
  switch ($typeId)
609
  {
 
 
 
 
610
  case 'simple':
611
  if ($isAssoc)
612
  {
618
  }
619
  break;
620
 
621
+ case 'abstract':
622
  case 'configurable':
 
 
 
623
  case 'bundle':
624
+ case 'downloadable':
625
+ case 'grouped':
626
+ case 'virtual':
627
+ $oProductMap = Mage::getModel('feed/map_product_'.$typeId, $params);
628
  break;
629
+
630
  default:
631
+ return null;
 
 
 
 
632
  }
633
 
634
  return $oProductMap;
app/code/community/Sooqr/Feed/Model/Map/Product/Abstract.php CHANGED
@@ -370,16 +370,17 @@ class Sooqr_Feed_Model_Map_Product_Abstract extends Varien_Object
370
  $product = $this->getProduct();
371
  /* @var $product Mage_Catalog_Model_Product */
372
  $fieldData = "";
373
- if (!$this->hasSpecialPrice())
374
  {
375
  // Return the normal price
376
  return $this->mapDirectiveNormalPrice($params);
377
  }
378
-
379
- $helper = Mage::helper('feed/tax');
380
  $priceIncludesTax = ( $helper->priceIncludesTax($this->getStoreId()) ? true : false);
381
  $includingTax = true;
382
- $price = $helper->getPrice($product, $this->getSpecialPrice(), $includingTax, false, false, null, $this->getStoreId(), $priceIncludesTax);
 
383
  $fieldData = $price;
384
 
385
  $fieldData = $this->cleanField($fieldData);
@@ -395,6 +396,7 @@ class Sooqr_Feed_Model_Map_Product_Abstract extends Varien_Object
395
  {
396
  $has = false;
397
  $product = $this->getProduct();
 
398
  if ($this->getSpecialPrice() <= 0)
399
  return $has;
400
  if (is_empty_date($product->getSpecialFromDate()))
@@ -626,13 +628,31 @@ class Sooqr_Feed_Model_Map_Product_Abstract extends Varien_Object
626
  return html_entity_decode($value);
627
  }
628
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
629
  /**
630
  * Cleans field by Google Base specs.
631
  *
632
  * @param string $field
633
  * @return string
634
  */
635
- protected function cleanField($field)
636
  {
637
  $field = strtr($field, array(
638
  "\"" => " ",
370
  $product = $this->getProduct();
371
  /* @var $product Mage_Catalog_Model_Product */
372
  $fieldData = "";
373
+ if ($product->getSpecialPrice() == 0)
374
  {
375
  // Return the normal price
376
  return $this->mapDirectiveNormalPrice($params);
377
  }
378
+
379
+ /*$helper = Mage::helper('feed/tax');
380
  $priceIncludesTax = ( $helper->priceIncludesTax($this->getStoreId()) ? true : false);
381
  $includingTax = true;
382
+ $price = $helper->getPrice($product, $this->getSpecialPrice(), $includingTax, false, false, null, $this->getStoreId(), $priceIncludesTax);*/
383
+ $price = $product->getFinalPrice();
384
  $fieldData = $price;
385
 
386
  $fieldData = $this->cleanField($fieldData);
396
  {
397
  $has = false;
398
  $product = $this->getProduct();
399
+
400
  if ($this->getSpecialPrice() <= 0)
401
  return $has;
402
  if (is_empty_date($product->getSpecialFromDate()))
628
  return html_entity_decode($value);
629
  }
630
 
631
+ protected function cleanField($field)
632
+ {
633
+ if (is_array($field))
634
+ {
635
+ foreach ($field as &$value)
636
+ {
637
+ $value = $this->cleanFieldValue($value);
638
+ unset($value);
639
+ }
640
+ }
641
+ else
642
+ {
643
+ $field = $this->cleanFieldValue($field);
644
+ }
645
+
646
+ return $field;
647
+ }
648
+
649
  /**
650
  * Cleans field by Google Base specs.
651
  *
652
  * @param string $field
653
  * @return string
654
  */
655
+ protected function cleanFieldValue($field)
656
  {
657
  $field = strtr($field, array(
658
  "\"" => " ",
app/code/community/Sooqr/Feed/Model/System/Config/Backend/Serialized/Fieldmap.php CHANGED
@@ -46,11 +46,14 @@ class Sooqr_Feed_Model_System_Config_Backend_Serialized_Fieldmap extends Mage_Ad
46
 
47
  $dbValues = $this->getValue();
48
  $tmpValues = array();
49
- foreach ($dbValues as $valueData)
50
  {
51
- $tmpValues[$valueData['field']] = $valueData['attribute'];
 
 
 
52
  }
53
-
54
  foreach ($values as &$valueData)
55
  {
56
  if (array_key_exists($valueData['field'], $tmpValues))
46
 
47
  $dbValues = $this->getValue();
48
  $tmpValues = array();
49
+ if (is_array($dbValues))
50
  {
51
+ foreach ($dbValues as $valueData)
52
+ {
53
+ $tmpValues[$valueData['field']] = $valueData['attribute'];
54
+ }
55
  }
56
+
57
  foreach ($values as &$valueData)
58
  {
59
  if (array_key_exists($valueData['field'], $tmpValues))
app/code/community/Sooqr/Feed/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Sooqr_Feed>
5
- <version>1.0.4</version>
6
  </Sooqr_Feed>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Sooqr_Feed>
5
+ <version>1.0.4.4</version>
6
  </Sooqr_Feed>
7
  </modules>
8
  <frontend>
app/code/community/Sooqr/Search/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Sooqr_Search>
5
- <version>1.0.4</version>
6
  </Sooqr_Search>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Sooqr_Search>
5
+ <version>1.0.4.4</version>
6
  </Sooqr_Search>
7
  </modules>
8
  <frontend>
package.xml CHANGED
@@ -1,14 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SooqrSearch</name>
4
- <version>1.0.4</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>Extension to link your Magento shop to the Sooqr.com onSite Search sollution.</summary>
10
  <description>Provides an interface to implement the Sooqr onSite Search from sooqr.com. Sooqr.com is a paid service that enabled fast searches in your webshop for a monthly fee.</description>
11
- <notes>Changes since 1.0.3.1&#xD;
 
 
 
 
 
 
12
  - Plugin now reports basic configuration settings to the mySooqr backend.&#xD;
13
  &#xD;
14
  Changes since 1.0.3&#xD;
@@ -54,9 +60,9 @@ Changes since 0.3.2&#xD;
54
  - Bugfix: manufacterer field is not always available&#xD;
55
  - Changes to the visibility of configuration fields</notes>
56
  <authors><author><name>internetbureau Websight</name><user>MAG001537415</user><email>info@websight.nl</email></author></authors>
57
- <date>2013-02-20</date>
58
- <time>11:45:59</time>
59
- <contents><target name="magecommunity"><dir name="Sooqr"><dir name="Feed"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Customfieldmap.php" hash="d97b98a3d7124a79cc392b28ce2a1cfe"/><file name="Fieldmap.php" hash="dd8c9702387d90f299b6a5455d325433"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="0532014143c11589f849f518268666ad"/><file name="SimpleXml.php" hash="d1a96945172013ac9300c2d49ed02272"/><file name="Tax.php" hash="ced1a074e7e104ada5b925bd64feac1d"/></dir><dir name="Model"><file name="Batch.php" hash="a855b80d9f52a39f672433f338730e77"/><file name="Config.php" hash="e4f4913671b94b0cfc544e020a625e0a"/><file name="Generator.php" hash="5b3167692109b9d29b89ab6d5077036a"/><dir name="Map"><dir name="Product"><file name="Abstract.php" hash="96b8f479db8ca6262881225d4233edb3"/><file name="Associated.php" hash="2d283bccff7d6877af3821a46e7eb45e"/><file name="Bundle.php" hash="b60c6693ee23f46ef8a50dbb1d9b8d0f"/><file name="Configurable.php" hash="3de638ac19855a7cbb22f9f081cdff37"/><file name="Downloadable.php" hash="9b27773f6ff9a1b3735ecbbdab81dfef"/><file name="Grouped.php" hash="2f601ee768bdbe52aa2cf132ec7f43f8"/><file name="Simple.php" hash="f03e7d90056b504d55421c830de832f6"/><file name="Virtual.php" hash="e4dc62af4843bcb04910f8e9643f2707"/></dir></dir><dir name="Source"><file name="Producttypes.php" hash="ab9ccbf7457485bbfa659a0315b8459b"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Serialized"><file name="Customfieldmap.php" hash="6dbe62d8c85410adcc3e70cf022fed2e"/><file name="Fieldmap.php" hash="cd6b747e1084d0b78db508e7cbcef747"/></dir></dir><file name="Minmax.php" hash="f8d72832fd7bab8c0ebd7771271e4566"/></dir></dir><file name="Tools.php" hash="79e0621c9ed2f8713332a976f5580a5a"/></dir><dir name="controllers"><file name="IndexController.php" hash="1e5dfb6b6ca7669474b8ebc997556e61"/><file name="InstallationController.php" hash="14af7b0f8de13e7b750cbe3a4d2afc53"/></dir><dir name="etc"><file name="adminhtml.xml" hash="caee7117f32a2d2876d8dc1ecb65b242"/><file name="config.xml" hash="45ba3e8a2096fe2715ce6183450d6308"/><file name="system.xml" hash="512e026374bb7326c907a47a61031935"/></dir><dir name="scripts"><file name="generate_sooqr_feed.php" hash="ed419d31d0a99b31411fef1c97e54e20"/></dir></dir><dir name="Search"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Info.php" hash="ba0e6b2b6e89c74df1307402f1cb06a9"/><file name="Subscription.php" hash="d7e2f80aefca37ffa529ca0cc0e6628b"/></dir></dir></dir></dir><file name="Form.php" hash="1fa0ccfc5d74f73ff1f83343ef4eac38"/></dir><dir name="Helper"><file name="Data.php" hash="56efae35a7098b6fd3e5320978ca4033"/></dir><dir name="Model"><file name="Accountid.php" hash="dbcdf5cc551f290f2956d3f7d4cce80e"/><file name="Apikey.php" hash="ac8dff7af6eccbfd02377b9646141724"/></dir><dir name="controllers"><file name="IndexController.php" hash="5312ccf85d0a100b7012e1b09ba3c154"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a78e427e0f53e805fb006add7d97a1de"/><file name="config.xml" hash="a10579a03f649534688b99e9a75c01c4"/><file name="system.xml" hash="d023a96a29ac009bb534d03ed6c170d2"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="catalogsearch"><file name="form.mini.phtml" hash="1b873015cd5f53c265918321ad282d29"/></dir></dir><dir name="layout"><file name="sooqr_catalogsearch.xml" hash="72678b32666d8e337a84628272f9d32f"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="sooqr"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array.phtml" hash="7ffbc4fe410e27973225df4d660c21a6"/><file name="customarray.phtml" hash="a228172a2d611c8825a721d81db03610"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sooqr_All.xml" hash="d11d8aab88e28336bae51c325d043a59"/></dir></target></contents>
60
  <compatible/>
61
  <dependencies><required><php><min>5.2.6</min><max>6.0.0</max></php><extension><name>dom</name><min></min><max></max></extension><extension><name>SimpleXML</name><min></min><max></max></extension><extension><name>curl</name><min></min><max></max></extension></required></dependencies>
62
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SooqrSearch</name>
4
+ <version>1.0.4.4</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>Extension to link your Magento shop to the Sooqr.com onSite Search sollution.</summary>
10
  <description>Provides an interface to implement the Sooqr onSite Search from sooqr.com. Sooqr.com is a paid service that enabled fast searches in your webshop for a monthly fee.</description>
11
+ <notes>Changes since 1.0.4.3&#xD;
12
+ - Better support for multiselect attributefields.&#xD;
13
+ &#xD;
14
+ Changes since 1.0.4&#xD;
15
+ - Better support for additional product types.&#xD;
16
+ &#xD;
17
+ Changes since 1.0.3.1&#xD;
18
  - Plugin now reports basic configuration settings to the mySooqr backend.&#xD;
19
  &#xD;
20
  Changes since 1.0.3&#xD;
60
  - Bugfix: manufacterer field is not always available&#xD;
61
  - Changes to the visibility of configuration fields</notes>
62
  <authors><author><name>internetbureau Websight</name><user>MAG001537415</user><email>info@websight.nl</email></author></authors>
63
+ <date>2013-04-08</date>
64
+ <time>08:44:36</time>
65
+ <contents><target name="magecommunity"><dir name="Sooqr"><dir name="Feed"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Customfieldmap.php" hash="d97b98a3d7124a79cc392b28ce2a1cfe"/><file name="Fieldmap.php" hash="dd8c9702387d90f299b6a5455d325433"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="0532014143c11589f849f518268666ad"/><file name="SimpleXml.php" hash="d1a96945172013ac9300c2d49ed02272"/><file name="Tax.php" hash="ced1a074e7e104ada5b925bd64feac1d"/></dir><dir name="Model"><file name="Batch.php" hash="a855b80d9f52a39f672433f338730e77"/><file name="Config.php" hash="e4f4913671b94b0cfc544e020a625e0a"/><file name="Generator.php" hash="fd1af7250796badb568feb86da421b66"/><dir name="Map"><dir name="Product"><file name="Abstract.php" hash="3a4e4780af924afaafc953805def3ac7"/><file name="Associated.php" hash="2d283bccff7d6877af3821a46e7eb45e"/><file name="Bundle.php" hash="b60c6693ee23f46ef8a50dbb1d9b8d0f"/><file name="Configurable.php" hash="3de638ac19855a7cbb22f9f081cdff37"/><file name="Downloadable.php" hash="9b27773f6ff9a1b3735ecbbdab81dfef"/><file name="Grouped.php" hash="2f601ee768bdbe52aa2cf132ec7f43f8"/><file name="Simple.php" hash="f03e7d90056b504d55421c830de832f6"/><file name="Virtual.php" hash="e4dc62af4843bcb04910f8e9643f2707"/></dir></dir><dir name="Source"><file name="Producttypes.php" hash="ab9ccbf7457485bbfa659a0315b8459b"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Serialized"><file name="Customfieldmap.php" hash="6dbe62d8c85410adcc3e70cf022fed2e"/><file name="Fieldmap.php" hash="d1f135a74f9a8525b173ef083c2f86e5"/></dir></dir><file name="Minmax.php" hash="f8d72832fd7bab8c0ebd7771271e4566"/></dir></dir><file name="Tools.php" hash="79e0621c9ed2f8713332a976f5580a5a"/></dir><dir name="controllers"><file name="IndexController.php" hash="1e5dfb6b6ca7669474b8ebc997556e61"/><file name="InstallationController.php" hash="14af7b0f8de13e7b750cbe3a4d2afc53"/></dir><dir name="etc"><file name="adminhtml.xml" hash="caee7117f32a2d2876d8dc1ecb65b242"/><file name="config.xml" hash="f0e24acc985d87c39085f15717519b6e"/><file name="system.xml" hash="512e026374bb7326c907a47a61031935"/></dir><dir name="scripts"><file name="generate_sooqr_feed.php" hash="ed419d31d0a99b31411fef1c97e54e20"/></dir></dir><dir name="Search"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Info.php" hash="ba0e6b2b6e89c74df1307402f1cb06a9"/><file name="Subscription.php" hash="d7e2f80aefca37ffa529ca0cc0e6628b"/></dir></dir></dir></dir><file name="Form.php" hash="1fa0ccfc5d74f73ff1f83343ef4eac38"/></dir><dir name="Helper"><file name="Data.php" hash="56efae35a7098b6fd3e5320978ca4033"/></dir><dir name="Model"><file name="Accountid.php" hash="dbcdf5cc551f290f2956d3f7d4cce80e"/><file name="Apikey.php" hash="ac8dff7af6eccbfd02377b9646141724"/></dir><dir name="controllers"><file name="IndexController.php" hash="5312ccf85d0a100b7012e1b09ba3c154"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a78e427e0f53e805fb006add7d97a1de"/><file name="config.xml" hash="ea298c1d7252b5ede4eefdba0333a03b"/><file name="system.xml" hash="d023a96a29ac009bb534d03ed6c170d2"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="catalogsearch"><file name="form.mini.phtml" hash="1b873015cd5f53c265918321ad282d29"/></dir></dir><dir name="layout"><file name="sooqr_catalogsearch.xml" hash="72678b32666d8e337a84628272f9d32f"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="sooqr"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array.phtml" hash="7ffbc4fe410e27973225df4d660c21a6"/><file name="customarray.phtml" hash="a228172a2d611c8825a721d81db03610"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sooqr_All.xml" hash="d11d8aab88e28336bae51c325d043a59"/></dir></target></contents>
66
  <compatible/>
67
  <dependencies><required><php><min>5.2.6</min><max>6.0.0</max></php><extension><name>dom</name><min></min><max></max></extension><extension><name>SimpleXML</name><min></min><max></max></extension><extension><name>curl</name><min></min><max></max></extension></required></dependencies>
68
  </package>