OrganicInternet_SimpleConfigurableProducts - Version 0.7.4

Version Notes

See http://github.com/organicinternet/magento-configurable-simple/ for up-to-date documentation and to contribute!

Download this release

Release Info

Developer Magento Core Team
Extension OrganicInternet_SimpleConfigurableProducts
Version 0.7.4
Comparing to
See all releases


Code changes from version 0.7.3 to 0.7.4

app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Block/Product/View/Type/Configurable.php CHANGED
@@ -39,8 +39,7 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Block_Product_View_Type
39
  #but dont bother if fancy image changing is enabled
40
  if (!Mage::getStoreConfig('SCP_options/product_page/change_image_fancy')) {
41
  #If image is not placeholder...
42
- if(strpos((string)Mage::helper('catalog/image')->init($product, 'image'), (string)Mage::helper('catalog/image')->getPlaceHolder($product)) === FALSE) {
43
- #add child product image url to json spConfig var
44
  $childProducts[$productId]["imageUrl"] = (string)Mage::helper('catalog/image')->init($product, 'image');
45
  }
46
  }
@@ -74,7 +73,10 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Block_Product_View_Type
74
  $config['productName'] = $this->getProduct()->getName();
75
  $config['description'] = $this->getProduct()->getDescription();
76
  $config['shortDescription'] = $this->getProduct()->getShortDescription();
77
- $config["imageUrl"] = (string)Mage::helper('catalog/image')->init($this->getProduct(), 'image');
 
 
 
78
 
79
  $childBlock = $this->getLayout()->createBlock('catalog/product_view_attributes');
80
  $config["productAttributes"] = $childBlock->setTemplate('catalog/product/view/attributes.phtml')
@@ -93,9 +95,10 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Block_Product_View_Type
93
  if (Mage::getStoreConfig('SCP_options/product_page/show_price_ranges_in_options')) {
94
  $config['showPriceRangesInOptions'] = true;
95
  $config['rangeToLabel'] = $this->__('to');
96
-
97
  }
98
  //Mage::log($config);
99
  return Zend_Json::encode($config);
 
 
100
  }
101
  }
39
  #but dont bother if fancy image changing is enabled
40
  if (!Mage::getStoreConfig('SCP_options/product_page/change_image_fancy')) {
41
  #If image is not placeholder...
42
+ if($product->getImage()!=='no_selection') {
 
43
  $childProducts[$productId]["imageUrl"] = (string)Mage::helper('catalog/image')->init($product, 'image');
44
  }
45
  }
73
  $config['productName'] = $this->getProduct()->getName();
74
  $config['description'] = $this->getProduct()->getDescription();
75
  $config['shortDescription'] = $this->getProduct()->getShortDescription();
76
+
77
+ if (Mage::getStoreConfig('SCP_options/product_page/change_image')) {
78
+ $config["imageUrl"] = (string)Mage::helper('catalog/image')->init($this->getProduct(), 'image');
79
+ }
80
 
81
  $childBlock = $this->getLayout()->createBlock('catalog/product_view_attributes');
82
  $config["productAttributes"] = $childBlock->setTemplate('catalog/product/view/attributes.phtml')
95
  if (Mage::getStoreConfig('SCP_options/product_page/show_price_ranges_in_options')) {
96
  $config['showPriceRangesInOptions'] = true;
97
  $config['rangeToLabel'] = $this->__('to');
 
98
  }
99
  //Mage::log($config);
100
  return Zend_Json::encode($config);
101
+ //parent getJsonConfig uses the following instead, but it seems to just break inline translate of this json?
102
+ //return Mage::helper('core')->jsonEncode($config);
103
  }
104
  }
app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Product/Type/Configurable/Price.php CHANGED
@@ -93,7 +93,7 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product_Type_Conf
93
  }
94
 
95
  $childProducts = $product->getTypeInstance(true)->getUsedProductCollection($product);
96
- $childProducts->addAttributeToSelect(array('price', 'special_price', 'status'));
97
 
98
  if ($checkSalable) {
99
  $salableChildProducts = array();
@@ -109,7 +109,7 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product_Type_Conf
109
  return $childProducts;
110
  }
111
 
112
-
113
  public function getLowestChildPrice($product, $priceType, $checkSalable=true)
114
  {
115
  $childProduct = $this->getChildProductWithLowestPrice($product, $priceType, $checkSalable);
@@ -124,7 +124,7 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product_Type_Conf
124
  }
125
  return $childPrice;
126
  }
127
-
128
  #Could no doubt add highest/lowest as param to save 2 near-identical functions
129
  public function getChildProductWithHighestPrice($product, $priceType, $checkSalable=true)
130
  {
93
  }
94
 
95
  $childProducts = $product->getTypeInstance(true)->getUsedProductCollection($product);
96
+ $childProducts->addAttributeToSelect(array('price', 'special_price', 'status', 'special_from_date', 'special_to_date'));
97
 
98
  if ($checkSalable) {
99
  $salableChildProducts = array();
109
  return $childProducts;
110
  }
111
 
112
+ /*
113
  public function getLowestChildPrice($product, $priceType, $checkSalable=true)
114
  {
115
  $childProduct = $this->getChildProductWithLowestPrice($product, $priceType, $checkSalable);
124
  }
125
  return $childPrice;
126
  }
127
+ */
128
  #Could no doubt add highest/lowest as param to save 2 near-identical functions
129
  public function getChildProductWithHighestPrice($product, $priceType, $checkSalable=true)
130
  {
app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php CHANGED
@@ -13,47 +13,13 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Resource_Eav_Mysq
13
  return $this;
14
  }
15
 
16
- #Has extra col 'child_entity_id' so that it's possible to join correctly against the child's
17
- #price rules (other wise any rules applying to the conf parent are used, which is incorrect with SCP
18
- /*
19
- protected function _prepareSCPFinalPriceTable()
20
- {
21
- $write = $this->_getWriteAdapter();
22
- $table = $this->_getDefaultFinalPriceTable();
23
-
24
- $query = sprintf('DROP TABLE IF EXISTS %s', $write->quoteIdentifier($table));
25
- $write->query($query);
26
-
27
- $query = sprintf('CREATE TABLE %s ('
28
- . ' `entity_id` INT(10) UNSIGNED NOT NULL,'
29
- . ' `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,'
30
- . ' `website_id` SMALLINT(5) UNSIGNED NOT NULL,'
31
- . ' `tax_class_id` SMALLINT(5) UNSIGNED DEFAULT \'0\','
32
- . ' `orig_price` DECIMAL(12,4) DEFAULT NULL,'
33
- . ' `price` DECIMAL(12,4) DEFAULT NULL,'
34
- . ' `min_price` DECIMAL(12,4) DEFAULT NULL,'
35
- . ' `max_price` DECIMAL(12,4) DEFAULT NULL,'
36
- . ' `tier_price` DECIMAL(12,4) DEFAULT NULL,'
37
- . ' `base_tier` DECIMAL(12,4) DEFAULT NULL,'
38
- . ' `child_entity_id` INT(10) UNSIGNED DEFAULT NULL,'
39
- . ' PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)'
40
- . ') ENGINE=MYISAM DEFAULT CHARSET=utf8',
41
- $write->quoteIdentifier($table));
42
- $write->query($query);
43
-
44
- return $this;
45
- }
46
- */
47
-
48
  #This calculates final price using SCP logic: minimal child product finalprice
49
  #instead of the just the entered configurable price
50
  #It uses a subquery/group-by hack to ensure that the various column values are all from the row with the lowest final price.
51
  #See Kasey Speakman comment here: http://dev.mysql.com/doc/refman/5.1/en/example-maximum-column-group-row.html
52
  #It's all quite complicated. :/
53
-
54
  protected function _prepareFinalPriceData($entityIds = null)
55
  {
56
- # $this->_prepareSCPFinalPriceTable();
57
  $this->_prepareDefaultFinalPriceTable();
58
 
59
  $write = $this->_getWriteAdapter();
@@ -75,7 +41,7 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Resource_Eav_Mysq
75
  array())
76
  ->join(
77
  array('cw' => $this->getTable('core/website')),
78
- '',
79
  array())
80
  ->join(
81
  array('csg' => $this->getTable('core/store_group')),
@@ -112,7 +78,6 @@ class OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Resource_Eav_Mysq
112
  'customer_group_id' => new Zend_Db_Expr('pi.customer_group_id'),
113
  'website_id' => new Zend_Db_Expr('cw.website_id'),
114
  'tax_class_id' => new Zend_Db_Expr('pi.tax_class_id'),
115
- # 'child_entity_id' => new Zend_Db_Expr('ce.entity_id'),
116
  'orig_price' => new Zend_Db_Expr('pi.price'),
117
  'price' => new Zend_Db_Expr('pi.final_price'),
118
  'min_price' => new Zend_Db_Expr('pi.final_price'),
13
  return $this;
14
  }
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  #This calculates final price using SCP logic: minimal child product finalprice
17
  #instead of the just the entered configurable price
18
  #It uses a subquery/group-by hack to ensure that the various column values are all from the row with the lowest final price.
19
  #See Kasey Speakman comment here: http://dev.mysql.com/doc/refman/5.1/en/example-maximum-column-group-row.html
20
  #It's all quite complicated. :/
 
21
  protected function _prepareFinalPriceData($entityIds = null)
22
  {
 
23
  $this->_prepareDefaultFinalPriceTable();
24
 
25
  $write = $this->_getWriteAdapter();
41
  array())
42
  ->join(
43
  array('cw' => $this->getTable('core/website')),
44
+ 'pi.website_id = cw.website_id',
45
  array())
46
  ->join(
47
  array('csg' => $this->getTable('core/store_group')),
78
  'customer_group_id' => new Zend_Db_Expr('pi.customer_group_id'),
79
  'website_id' => new Zend_Db_Expr('cw.website_id'),
80
  'tax_class_id' => new Zend_Db_Expr('pi.tax_class_id'),
 
81
  'orig_price' => new Zend_Db_Expr('pi.price'),
82
  'price' => new Zend_Db_Expr('pi.final_price'),
83
  'min_price' => new Zend_Db_Expr('pi.final_price'),
app/code/community/OrganicInternet/SimpleConfigurableProducts/Checkout/Block/Cart/Item/Renderer.php CHANGED
@@ -79,21 +79,36 @@ class OrganicInternet_SimpleConfigurableProducts_Checkout_Block_Cart_Item_Render
79
  return $options;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
82
  public function getProductThumbnail()
83
  {
 
 
 
 
 
 
 
84
  if (!Mage::getStoreConfig('SCP_options/cart/show_configurable_product_image')) {
85
- $childThumbnail = parent::getProductThumbnail();
86
- #If image is not placeholder...
87
- if(strpos($childThumbnail, Mage::helper('catalog/image')->getPlaceHolder($this->getProduct())) === FALSE) {
88
- return $childThumbnail;
89
  }
90
  }
91
 
92
- #If we're showing parents anyway, or we can't show the child, show the parent.
93
- #If there's no image then a placeholder will be shown
94
- if ($this->getConfigurableProductParentId()) {
95
- $parentProduct = $this->getConfigurableProductParent();
96
- return $this->helper('catalog/image')->init($parentProduct, 'thumbnail');
97
- }
98
  }
99
  }
79
  return $options;
80
  }
81
 
82
+ /*
83
+ Logic is:
84
+ If not SCP product, use normal thumbnail behaviour
85
+ If is SCP product, and admin value is set to use configurable image, do so
86
+ If is SCP product, and admin value is set to use simple image, do so,
87
+ but 'fail back' to configurable image if simple image is placeholder
88
+ If logic says to use it, but configurable product image is placeholder, then
89
+ just display placeholder
90
+
91
+ */
92
  public function getProductThumbnail()
93
  {
94
+ #If product not added via SCP, use default behaviour
95
+ if (!$this->getConfigurableProductParentId()) {
96
+ return parent::getProductThumbnail();
97
+ }
98
+
99
+
100
+ #If showing simple product image
101
  if (!Mage::getStoreConfig('SCP_options/cart/show_configurable_product_image')) {
102
+ $product = $this->getProduct();
103
+ #if product image is not a thumbnail
104
+ if($product->getData('thumbnail') && ($product->getData('thumbnail') != 'no_selection')) {
105
+ return $this->helper('catalog/image')->init($product, 'thumbnail');
106
  }
107
  }
108
 
109
+ #If simple prod thumbnail image is placeholder, or we're not using simple product image
110
+ #show configurable product image
111
+ $product = $this->getConfigurableProductParent();
112
+ return $this->helper('catalog/image')->init($product, 'thumbnail');
 
 
113
  }
114
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>OrganicInternet_SimpleConfigurableProducts</name>
4
- <version>0.7.3</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
@@ -34,9 +34,9 @@ Version 0.7 of SCP is not compatible with Magento versions prior to 1.4.0.1
34
  See the documentation for more details.</description>
35
  <notes>See http://github.com/organicinternet/magento-configurable-simple/ for up-to-date documentation and to contribute!</notes>
36
  <authors><author><name>OrganicInternet - Matt Dean</name><user>auto-converted</user><email>matt@organicinternet.co.uk</email></author></authors>
37
- <date>2010-06-15</date>
38
- <time>17:28:53</time>
39
- <contents><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="scp-ajax-loader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/></dir><dir name="js"><file name="scp_product_extension.js" hash="822dabea0f73993e481dc1c3a678cee8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="simpleconfigurableproducts.xml" hash="1d6d42e7ea6b8a3b5b18b08c34c5f5f9"/></dir><dir name="template"><dir name="catalog"><dir name="product"><dir name="view"><dir name="options"><file name="scpwrapper.phtml" hash="707e2a23b01c7f44ec207327770cf19d"/></dir><file name="scpajaxoptions.phtml" hash="b82c5ca0da007693e4e33623fb946f45"/><file name="scpoptions.phtml" hash="5f299a1bcc37cbb51ab65a939a249c8d"/></dir></dir></dir><dir name="page"><file name="scpcontentonly.phtml" hash="af6c1e1249fd89bf5fcac3783ca59eb6"/></dir><dir name="sales"><dir name="reorder"><file name="scpsidebar.phtml" hash="366a8a6ffe3c3dc6d9c65c78e46fd175"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="OrganicInternet_SimpleConfigurableProducts.xml" hash="9940c9361821c51b912ba2d3f9995b24"/></dir></target><target name="magecommunity"><dir name="OrganicInternet"><dir name="SimpleConfigurableProducts"><dir name="Adminhtml"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Super"><dir name="Config"><file name="Grid.php" hash="b4d05499ae5dfd05e15bd5b637b99a6b"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Block"><dir name="Product"><dir name="View"><dir name="Type"><file name="Configurable.php" hash="41438f7c29b4c9175b85a9d064f8bb6d"/></dir><file name="Attributes.php" hash="8fa06a35201f4adf46bd0fee0588e79e"/><file name="Media.php" hash="ffc632c64c4cae0f00d228541de0b8a4"/></dir><file name="Price.php" hash="183eadc7b59e1836a8a84aea5bdf04d1"/></dir></dir><dir name="Model"><dir name="Product"><dir name="Type"><dir name="Configurable"><file name="Price.php" hash="c964fbf22c94941e7e6d6bbb19e668f4"/></dir><file name="Configurable.php" hash="7443a0698eb7b137f72dfc15725a4e96"/><file name="Simple.php" hash="8ef7b9a3c0f915681eb0c9eb88eae7e1"/><file name="Virtual.php" hash="1d9b3d5302852a673e622b4b4354ba54"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><dir name="Indexer"><dir name="Price"><file name="Configurable.php" hash="6c6d4eb205557ca6022b3b5cdb372670"/></dir><file name="Price.php" hash="8b2f2fb56f94bf164fd159a19043315e"/></dir><file name="Collection.php" hash="47f49718bedbba0a2ea860cf93b4faba"/></dir></dir></dir></dir><file name="Product.php" hash="1a6dfedacb38df8e720f119f510d9525"/></dir></dir><dir name="CatalogIndex"><dir name="Model"><dir name="Data"><file name="Configurable.php" hash="75a683207aa2096a03e07346d19d5622"/></dir></dir></dir><dir name="CatalogInventory"><dir name="Model"><dir name="Mysql4"><dir name="Indexer"><dir name="Stock"><file name="Configurable.php" hash="61e9ba65a896fce97934af234773793e"/></dir></dir></dir></dir></dir><dir name="CatalogRule"><dir name="Model"><dir name="Mysql4"><file name="Rule.php" hash="e4ff4119ed9da11ccee2a6c14e2e56aa"/></dir></dir></dir><dir name="Checkout"><dir name="Block"><dir name="Cart"><dir name="Item"><file name="Renderer.php" hash="9bb08bc293451e057895d0706d0b3000"/></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="bb9b20bc5284c32a8e60febe7e9803c2"/></dir><dir name="etc"><file name="config.xml" hash="4c50c1ae23882257f4f7d51acd745482"/><file name="system.xml" hash="9fec5c9d7e354cd120fe18f63f3eccdc"/></dir><dir name="Helper"><file name="Data.php" hash="5f91b08d83b0f5211ba48bb9e57a73b7"/></dir><dir name="Rss"><dir name="Block"><dir name="Catalog"><file name="Category.php" hash="8bd374355b28204b872a460f1df726ee"/><file name="New.php" hash="d4bf513c1d1b80a8c6f35b50e364c932"/><file name="Special.php" hash="f8d21afb44bb4f3313ca2eb892063b75"/><file name="Tag.php" hash="f11184d72153579620183e0df9616341"/></dir><file name="Wishlist.php" hash="930698cb4ceac56a64fa010ce8304386"/></dir></dir></dir></dir></target></contents>
40
  <compatible/>
41
  <dependencies/>
42
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>OrganicInternet_SimpleConfigurableProducts</name>
4
+ <version>0.7.4</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
34
  See the documentation for more details.</description>
35
  <notes>See http://github.com/organicinternet/magento-configurable-simple/ for up-to-date documentation and to contribute!</notes>
36
  <authors><author><name>OrganicInternet - Matt Dean</name><user>auto-converted</user><email>matt@organicinternet.co.uk</email></author></authors>
37
+ <date>2010-08-15</date>
38
+ <time>11:11:25</time>
39
+ <contents><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="scp-ajax-loader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/></dir><dir name="js"><file name="scp_product_extension.js" hash="85d51a75f1674c85287b71fe2f9dad55"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="simpleconfigurableproducts.xml" hash="1d6d42e7ea6b8a3b5b18b08c34c5f5f9"/></dir><dir name="template"><dir name="catalog"><dir name="product"><dir name="view"><dir name="options"><file name="scpwrapper.phtml" hash="707e2a23b01c7f44ec207327770cf19d"/></dir><file name="scpajaxoptions.phtml" hash="b82c5ca0da007693e4e33623fb946f45"/><file name="scpoptions.phtml" hash="5f299a1bcc37cbb51ab65a939a249c8d"/></dir></dir></dir><dir name="page"><file name="scpcontentonly.phtml" hash="af6c1e1249fd89bf5fcac3783ca59eb6"/></dir><dir name="sales"><dir name="reorder"><file name="scpsidebar.phtml" hash="366a8a6ffe3c3dc6d9c65c78e46fd175"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="OrganicInternet_SimpleConfigurableProducts.xml" hash="9940c9361821c51b912ba2d3f9995b24"/></dir></target><target name="magecommunity"><dir name="OrganicInternet"><dir name="SimpleConfigurableProducts"><dir name="Adminhtml"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Super"><dir name="Config"><file name="Grid.php" hash="b4d05499ae5dfd05e15bd5b637b99a6b"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Block"><dir name="Product"><dir name="View"><dir name="Type"><file name="Configurable.php" hash="3e1ce7ebc3fd2809f61fc2bfd68a5468"/></dir><file name="Attributes.php" hash="8fa06a35201f4adf46bd0fee0588e79e"/><file name="Media.php" hash="ffc632c64c4cae0f00d228541de0b8a4"/></dir><file name="Price.php" hash="183eadc7b59e1836a8a84aea5bdf04d1"/></dir></dir><dir name="Model"><dir name="Product"><dir name="Type"><dir name="Configurable"><file name="Price.php" hash="e107c13eb1dcc51337ce45de7ff17141"/></dir><file name="Configurable.php" hash="7443a0698eb7b137f72dfc15725a4e96"/><file name="Simple.php" hash="8ef7b9a3c0f915681eb0c9eb88eae7e1"/><file name="Virtual.php" hash="1d9b3d5302852a673e622b4b4354ba54"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><dir name="Indexer"><dir name="Price"><file name="Configurable.php" hash="59a75a07d2d6e9c2a7f4fc5e842ec817"/></dir><file name="Price.php" hash="8b2f2fb56f94bf164fd159a19043315e"/></dir><file name="Collection.php" hash="47f49718bedbba0a2ea860cf93b4faba"/></dir></dir></dir></dir><file name="Product.php" hash="1a6dfedacb38df8e720f119f510d9525"/></dir></dir><dir name="CatalogIndex"><dir name="Model"><dir name="Data"><file name="Configurable.php" hash="75a683207aa2096a03e07346d19d5622"/></dir></dir></dir><dir name="CatalogInventory"><dir name="Model"><dir name="Mysql4"><dir name="Indexer"><dir name="Stock"><file name="Configurable.php" hash="61e9ba65a896fce97934af234773793e"/></dir></dir></dir></dir></dir><dir name="CatalogRule"><dir name="Model"><dir name="Mysql4"><file name="Rule.php" hash="e4ff4119ed9da11ccee2a6c14e2e56aa"/></dir></dir></dir><dir name="Checkout"><dir name="Block"><dir name="Cart"><dir name="Item"><file name="Renderer.php" hash="85b2a7c9e5883d981e4c91da6e53e3a9"/></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="bb9b20bc5284c32a8e60febe7e9803c2"/></dir><dir name="etc"><file name="config.xml" hash="4c50c1ae23882257f4f7d51acd745482"/><file name="system.xml" hash="9fec5c9d7e354cd120fe18f63f3eccdc"/></dir><dir name="Helper"><file name="Data.php" hash="5f91b08d83b0f5211ba48bb9e57a73b7"/></dir><dir name="Rss"><dir name="Block"><dir name="Catalog"><file name="Category.php" hash="8bd374355b28204b872a460f1df726ee"/><file name="New.php" hash="d4bf513c1d1b80a8c6f35b50e364c932"/><file name="Special.php" hash="f8d21afb44bb4f3313ca2eb892063b75"/><file name="Tag.php" hash="f11184d72153579620183e0df9616341"/></dir><file name="Wishlist.php" hash="930698cb4ceac56a64fa010ce8304386"/></dir></dir></dir></dir></target></contents>
40
  <compatible/>
41
  <dependencies/>
42
  </package>
skin/frontend/base/default/js/scp_product_extension.js CHANGED
@@ -207,6 +207,10 @@ Product.Config.prototype.updateProductImage = function(productId) {
207
  imageUrl = this.config.childProducts[productId].imageUrl;
208
  }
209
 
 
 
 
 
210
  if($('image')) {
211
  $('image').src = imageUrl;
212
  } else {
@@ -254,8 +258,12 @@ Product.Config.prototype.updateProductAttributes = function(productId) {
254
  if (productId && this.config.childProducts[productId].productAttributes) {
255
  productAttributes = this.config.childProducts[productId].productAttributes;
256
  }
 
 
 
257
  $$('div.product-collateral div.box-additional').each(function(el) {
258
  el.innerHTML = productAttributes;
 
259
  });
260
  };
261
 
207
  imageUrl = this.config.childProducts[productId].imageUrl;
208
  }
209
 
210
+ if (!imageUrl) {
211
+ return;
212
+ }
213
+
214
  if($('image')) {
215
  $('image').src = imageUrl;
216
  } else {
258
  if (productId && this.config.childProducts[productId].productAttributes) {
259
  productAttributes = this.config.childProducts[productId].productAttributes;
260
  }
261
+ //If config product doesn't already have an additional information section,
262
+ //it won't be shown for associated product either. It's too hard to work out
263
+ //where to place it given that different themes use very different html here
264
  $$('div.product-collateral div.box-additional').each(function(el) {
265
  el.innerHTML = productAttributes;
266
+ decorateTable('product-attribute-specs-table');
267
  });
268
  };
269