Cybage_Swatches - Version 1.0.1

Version Notes

After installation of the Color Swatches plug-in, please clear the cache.

Download this release

Release Info

Developer Cybage Software Pvt. Ltd.
Extension Cybage_Swatches
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Cybage/Swatches/Block/Adminhtml/Catalog/Product/Attribute/Edit/Tab/Super/Config/Grid/Renderer.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Cybage_Swatches_Block_Adminhtml_Catalog_Product_Attribute_Edit_Tab_Super_Config_Grid_Renderer extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox {
3
+ /**
4
+ * Renders grid column
5
+ *
6
+ * @param Varien_Object $row
7
+ * @return string
8
+ */
9
+ public function render(Varien_Object $row)
10
+ {
11
+ $result = parent::render($row);
12
+ return $result.'<input type="hidden" class="value-json" value="'.htmlspecialchars($this->getAttributesJson($row)).'" />';
13
+ }
14
+ public function getAttributesJson(Varien_Object $row)
15
+ {
16
+ if(!$this->getColumn()->getAttributes()) {
17
+ return '[]';
18
+ }
19
+
20
+ $result = array();
21
+ foreach($this->getColumn()->getAttributes() as $attribute) {
22
+ $productAttribute = $attribute->getProductAttribute();
23
+ if($productAttribute->getSourceModel()) {
24
+ $label = $productAttribute->getSource()->getOptionText($row->getData($productAttribute->getAttributeCode()));
25
+ } else {
26
+ $label = $row->getData($productAttribute->getAttributeCode());
27
+ }
28
+ $item = array();
29
+ $item['label'] = $label;
30
+ $item['attribute_id'] = $productAttribute->getId();
31
+ $item['value_index'] = $row->getData($productAttribute->getAttributeCode());
32
+ $item['option_img'] = Mage::helper('swatches')->getUploadedImageUrl($item['value_index']);
33
+ $result[] = $item;
34
+ }
35
+
36
+ return Mage::helper('core')->jsonEncode($result);
37
+ }
38
+ }
package.xml CHANGED
@@ -1,32 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cybage_Swatches</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Administrator can use the Color Swatch plug-in for configurable products to define their color, related size, and price at Magento store. For example, you can sell t-shirts in two colors and three sizes. The plug-in is used to define any type of attribute such as size, price, manufacturer, and color.</summary>
10
- <description>Administrator can use the Color Swatch plug-in for configurable products to define their color, related size, and price at Magento store. For example, you can sell t-shirts in two colors and three sizes. The plug-in is used to define any type of attribute such as size, price, manufacturer, and color. &#xD;
11
- Features&#xD;
12
- &#x2022; Support multiple swatch images for attribute options &#xD;
13
- &#x2022; Easy management of width and height of swatches &#xD;
14
- &#x2022; Organization of images for the configurable product attributes&#xD;
15
- &#x2022; Support for multiple attribute options&#xD;
16
- &#x2022; Easy management of multiple attributes on a single product &#xD;
17
- &#x2022; Convert product attribute options as swatches on configurable products&#xD;
18
- &#x2022; Customers can view the simple products images based on their selection of Configurable products options.&#xD;
19
- Benefits&#xD;
20
- &#x2022; Easy installation and integration&#xD;
21
- &#x2022; Configure products easily to get more business&#xD;
22
- &#x2022; Open source implementation&#xD;
23
- &#x2022; Easy management of color swatches at attribute and product level&#xD;
24
- &#x2022; Customers can view different images based on their selection of the configurable product options</description>
25
  <notes>After installation of the Color Swatches plug-in, please clear the cache.</notes>
26
  <authors><author><name>Cybage Software Pvt. Ltd.</name><user>cybage</user><email>Support_Magento@cybage.com</email></author></authors>
27
- <date>2015-01-30</date>
28
- <time>06:15:11</time>
29
- <contents><target name="magecommunity"><dir name="Cybage"><dir name="Swatches"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Attribute"><dir name="Edit"><file name="Form.php" hash="af7cbe62251e2eb2f5e9162bf6755b76"/><dir name="Tab"><file name="Main.php" hash="55239421ceeb962578b256d29157e837"/><file name="Options.php" hash="138f7133fc9a1ecc6d7a8dc1893bb731"/></dir></dir></dir><dir name="Edit"><dir name="Tab"><dir name="Super"><file name="Config.php" hash="b2634a1dc8dc6052883c22fecefc99a9"/></dir></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="View"><dir name="Type"><file name="Configurable.php" hash="32e6d9d638e4f1ddf6be7079ae5b1503"/><file name="ConfigurableList.php" hash="33202ef00c1b86bb5859ca33954f7fc6"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="718831a5462ff7051714a0bcb4f71e86"/><file name="Product.php" hash="85d86882c9a3d298c05f9be1a1868827"/></dir><dir name="Model"><file name="Attribute.php" hash="60cc2983759612b61dfae72f815dc488"/><dir name="Mysql4"><dir name="Attribute"><file name="Collection.php" hash="cc7f8e3c49ec5f19077bba7252316940"/></dir><file name="Attribute.php" hash="4d555f2b0df3ffbb10c082f0cb079887"/></dir><file name="Observer.php" hash="2e4b2600689dc800516450a75ab73154"/></dir><dir name="etc"><file name="adminhtml.xml" hash="02949e28fff6bb938f048c9edd89fd24"/><file name="config.xml" hash="501d31296fdd889d190d561935ef82b2"/><file name="system.xml" hash="135b73951746c4a5a04ccd4c0a5c5ae3"/></dir><dir name="sql"><dir name="swatches_setup"><file name="mysql4-install-1.0.0.php" hash="879f4dbc6b4a0a764e57f80f3510483f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cybage_Swatches.xml" hash="3bbc5c26a2ebd202911b7fdee78991f5"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="cybage_swatches.xml" hash="96adb24ca6a7d410e493a2aed65f594f"/></dir><dir name="template"><dir name="cybage"><dir name="catalog"><dir name="product"><dir name="edit"><dir name="super"><file name="config.phtml" hash="428c8fbfec9435f55de21fb32cf84123"/></dir></dir></dir></dir><dir name="swatches"><file name="options.phtml" hash="7456ca85bb090ec4bb79737b83e0b20d"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cybage_swatches.xml" hash="0eab22119365021d4583f3d2e5f59a24"/></dir><dir name="template"><dir name="cybage"><dir name="swatches"><file name="configurable.phtml" hash="a2da9222d4e004a664a0ba6f108df23c"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="cybage"><dir name="swatches"><file name="configurable.js" hash="1f98e78d7d2254ea2da52a83325e98f7"/><file name="configurableList.js" hash="c76ac5ca86c8d8baf725f11e546a97b6"/><dir name="css"><file name="swatches.css" hash="66dd4b9ec053b84574dc91e59cb25b5b"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="swatches"><dir name="images"><file name=".htaccess" hash="08de5b2f5ea1ce6f51f40a19bacbf42e"/></dir><dir name="products"><file name=".htaccess" hash="08de5b2f5ea1ce6f51f40a19bacbf42e"/></dir><file name=".htaccess" hash="08de5b2f5ea1ce6f51f40a19bacbf42e"/></dir></target></contents>
30
  <compatible/>
31
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
32
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cybage_Swatches</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Administrator can use the Color Swatch plug-in for configurable products to define their color, related size, and price at Magento store. For example, you can sell t-shirts in two colors and three sizes. The plug-in is used to define any type of attribute such as size, price, manufacturer, and color.</summary>
10
+ <description>Color swatch is a free Magento extension that can be used to display any of the product attributes as thumbnail images instead of showing as dropdown on product pages on your commerce website. Not only color but any of the custom options like color, size, etc. can be shown as swatches. It has a support for storing multiple images for each attribute and can be easily manageable from the admin panel. Color swatch plugin can be easily installed and integrated on your website using Magento connect. It can be applied to single attribute or multiple attributes of a single product and different swatch images can be uploaded for each of those attribute options. Detailed setup instructions and user guide is also available for this plugin.</description>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  <notes>After installation of the Color Swatches plug-in, please clear the cache.</notes>
12
  <authors><author><name>Cybage Software Pvt. Ltd.</name><user>cybage</user><email>Support_Magento@cybage.com</email></author></authors>
13
+ <date>2015-03-10</date>
14
+ <time>11:49:48</time>
15
+ <contents><target name="magecommunity"><dir name="Cybage"><dir name="Swatches"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Attribute"><dir name="Edit"><file name="Form.php" hash="af7cbe62251e2eb2f5e9162bf6755b76"/><dir name="Tab"><file name="Main.php" hash="55239421ceeb962578b256d29157e837"/><file name="Options.php" hash="138f7133fc9a1ecc6d7a8dc1893bb731"/><dir name="Super"><dir name="Config"><dir name="Grid"><file name="Renderer.php" hash="a502af0887ab515df51060c3a6844d79"/></dir></dir></dir></dir></dir></dir><dir name="Edit"><dir name="Tab"><dir name="Super"><file name="Config.php" hash="b2634a1dc8dc6052883c22fecefc99a9"/></dir></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="View"><dir name="Type"><file name="Configurable.php" hash="32e6d9d638e4f1ddf6be7079ae5b1503"/><file name="ConfigurableList.php" hash="33202ef00c1b86bb5859ca33954f7fc6"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="718831a5462ff7051714a0bcb4f71e86"/><file name="Product.php" hash="85d86882c9a3d298c05f9be1a1868827"/></dir><dir name="Model"><file name="Attribute.php" hash="60cc2983759612b61dfae72f815dc488"/><dir name="Mysql4"><dir name="Attribute"><file name="Collection.php" hash="cc7f8e3c49ec5f19077bba7252316940"/></dir><file name="Attribute.php" hash="4d555f2b0df3ffbb10c082f0cb079887"/></dir><file name="Observer.php" hash="2e4b2600689dc800516450a75ab73154"/></dir><dir name="etc"><file name="adminhtml.xml" hash="02949e28fff6bb938f048c9edd89fd24"/><file name="config.xml" hash="501d31296fdd889d190d561935ef82b2"/><file name="system.xml" hash="135b73951746c4a5a04ccd4c0a5c5ae3"/></dir><dir name="sql"><dir name="swatches_setup"><file name="mysql4-install-1.0.0.php" hash="879f4dbc6b4a0a764e57f80f3510483f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cybage_Swatches.xml" hash="3bbc5c26a2ebd202911b7fdee78991f5"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="cybage_swatches.xml" hash="96adb24ca6a7d410e493a2aed65f594f"/></dir><dir name="template"><dir name="cybage"><dir name="catalog"><dir name="product"><dir name="edit"><dir name="super"><file name="config.phtml" hash="428c8fbfec9435f55de21fb32cf84123"/></dir></dir></dir></dir><dir name="swatches"><file name="options.phtml" hash="7456ca85bb090ec4bb79737b83e0b20d"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cybage_swatches.xml" hash="0eab22119365021d4583f3d2e5f59a24"/></dir><dir name="template"><dir name="cybage"><dir name="swatches"><file name="configurable.phtml" hash="a2da9222d4e004a664a0ba6f108df23c"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="cybage"><dir name="swatches"><file name="configurable.js" hash="1f98e78d7d2254ea2da52a83325e98f7"/><file name="configurableList.js" hash="c76ac5ca86c8d8baf725f11e546a97b6"/><dir name="css"><file name="swatches.css" hash="66dd4b9ec053b84574dc91e59cb25b5b"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="swatches"><dir name="images"><file name=".htaccess" hash="08de5b2f5ea1ce6f51f40a19bacbf42e"/></dir><dir name="products"><file name=".htaccess" hash="08de5b2f5ea1ce6f51f40a19bacbf42e"/></dir><file name=".htaccess" hash="08de5b2f5ea1ce6f51f40a19bacbf42e"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>