Version Notes
Adding new Configurable products implementation
Download this release
Release Info
Developer | Magento Core Team |
Extension | Beecoder_Beeshopy |
Version | 2.7.0 |
Comparing to | |
See all releases |
Code changes from version 2.6.0 to 2.7.0
app/code/community/Beecoder/Beeshopy/Model/.Api.php.swp
DELETED
Binary file
|
app/code/community/Beecoder/Beeshopy/Model/Api.php
CHANGED
@@ -111,7 +111,7 @@ class Beecoder_Beeshopy_Model_Api extends Mage_Catalog_Model_Api_Resource
|
|
111 |
/* Used to know if module is installed*/
|
112 |
public function checkModule()
|
113 |
{
|
114 |
-
return array("api_version" => '2.
|
115 |
}
|
116 |
|
117 |
/*Auxiliar functions*/
|
@@ -207,33 +207,45 @@ class Beecoder_Beeshopy_Model_Api extends Mage_Catalog_Model_Api_Resource
|
|
207 |
foreach ($children[0] as $i => $value) {
|
208 |
$product = $this->_getProduct($value, $store, $identifierType);
|
209 |
/* Initial Price */
|
210 |
-
|
211 |
$price = $use_simple_configurable ? $product->getFinalPrice() : $parent->getFinalPrice();
|
212 |
/* Price Difference */
|
213 |
$difference = 0;
|
|
|
214 |
//Generate caption_name
|
215 |
-
$caption = "";
|
216 |
-
$configurable_options = array();
|
217 |
-
foreach($attrs_codes as $code){
|
218 |
|
219 |
-
|
|
|
|
|
220 |
$attr_value = $product->getData($code['attribute_code']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
/* Calculate price */
|
|
|
222 |
foreach($code['values'] as $value){
|
223 |
if($value['value_index'] == $attr_value) {
|
224 |
-
$configurable_options[$code['attribute_id']] = $attr_value;
|
225 |
if($value["is_percent"] == 1){
|
226 |
-
$
|
227 |
}else{
|
228 |
-
$
|
229 |
}
|
|
|
|
|
230 |
}
|
|
|
231 |
}
|
|
|
232 |
}
|
233 |
-
|
234 |
if($product->isSalable() != false){
|
235 |
-
array_push($res, $this->getProductInfo($product, $store, array(
|
236 |
-
'configurable_price' => $price + $difference, '
|
237 |
}
|
238 |
}
|
239 |
return $res;
|
111 |
/* Used to know if module is installed*/
|
112 |
public function checkModule()
|
113 |
{
|
114 |
+
return array("api_version" => '2.7.0', "magento_version" => Mage::getVersion());
|
115 |
}
|
116 |
|
117 |
/*Auxiliar functions*/
|
207 |
foreach ($children[0] as $i => $value) {
|
208 |
$product = $this->_getProduct($value, $store, $identifierType);
|
209 |
/* Initial Price */
|
|
|
210 |
$price = $use_simple_configurable ? $product->getFinalPrice() : $parent->getFinalPrice();
|
211 |
/* Price Difference */
|
212 |
$difference = 0;
|
213 |
+
|
214 |
//Generate caption_name
|
215 |
+
/* $caption = ""; */
|
216 |
+
/* $configurable_options = array(); */
|
|
|
217 |
|
218 |
+
$configurable_attributes = array();
|
219 |
+
foreach($attrs_codes as $code){
|
220 |
+
/* Product attribute and value */
|
221 |
$attr_value = $product->getData($code['attribute_code']);
|
222 |
+
$attribute = $product->getResource()->getAttribute($code['attribute_code'])->setStoreId($this->_getStoreId($store));
|
223 |
+
$value_label = $attribute->getFrontend()->getValue($product);
|
224 |
+
|
225 |
+
/* Attribute name */
|
226 |
+
$labels = $attribute->getStoreLabels();
|
227 |
+
$label = $labels[$this->_getStoreId($store)];
|
228 |
+
|
229 |
+
$product_attribute = array('mgnt_id' => $code['attribute_id'], 'label' => ($label ? $label : $attribute->getFrontendLabel()), 'position' => $code['position']);
|
230 |
/* Calculate price */
|
231 |
+
$pos = 1;
|
232 |
foreach($code['values'] as $value){
|
233 |
if($value['value_index'] == $attr_value) {
|
|
|
234 |
if($value["is_percent"] == 1){
|
235 |
+
$absolute_price = ($price * $value['pricing_value']) / 100;
|
236 |
}else{
|
237 |
+
$absolute_price = $value['pricing_value'];
|
238 |
}
|
239 |
+
$difference += $absolute_price;
|
240 |
+
$product_attribute['value'] = array('mgnt_id' => $value['value_index'], 'label' => $value['label'], 'pricing_value' => $value['pricing_value'], 'is_percent' => $value['is_percent'], 'position' => $pos, 'absolute_price' => $absolute_price);
|
241 |
}
|
242 |
+
$pos++;
|
243 |
}
|
244 |
+
array_push($configurable_attributes, $product_attribute);
|
245 |
}
|
|
|
246 |
if($product->isSalable() != false){
|
247 |
+
array_push($res, $this->getProductInfo($product, $store, array(
|
248 |
+
'configurable_price' => $price + $difference, 'configurable_attributes' => $configurable_attributes)));
|
249 |
}
|
250 |
}
|
251 |
return $res;
|
app/code/community/Beecoder/Beeshopy/changelog.txt
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
== Module changelog ==
|
2 |
+
|
3 |
+
=== 2.7.0 (05-09-12) ===
|
4 |
+
|
5 |
+
* New configurable products system
|
6 |
+
|
7 |
+
=== 2.6.0 (03-21-12) ===
|
8 |
+
|
9 |
+
* Added language/store view support for configurable attributes
|
10 |
+
|
11 |
+
=== 2.5.2 (12-14-11) ===
|
12 |
+
|
13 |
+
* Uploading a new version because of Magento Connect error
|
14 |
+
|
15 |
+
=== 2.5.1 (12-02-11) ===
|
16 |
+
|
17 |
+
* Fixing javascript reference
|
18 |
+
|
19 |
+
=== 2.5.0 (11-15-11) ===
|
20 |
+
|
21 |
+
* Adding base URL
|
22 |
+
|
23 |
+
...
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Beecoder_Beeshopy</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -11,11 +11,11 @@ Beeshopy extension for Magento, it allows you to integrates your magento store w
|
|
11 |
<description>Custom Module that allows you to connect with beeshopy service and integrates your magento store with Facebook. 
|
12 |

|
13 |
It contains a custom API and cart processing.</description>
|
14 |
-
<notes>Adding
|
15 |
<authors><author><name>Miguel Ángel Martínez Triviño</name><user>auto-converted</user><email>migmartri@gmail.com</email></author></authors>
|
16 |
-
<date>2012-
|
17 |
-
<time>
|
18 |
-
<contents><target name="magecommunity"><dir name="Beecoder"><dir name="Beeshopy"><dir name="Block"><file name="Track.php" hash="a40d400b02f73d5b4dea35c348ffee00"/></dir><dir name="Helper"><file name="Data.php" hash="ead88c0b629856526d39e7fb6f3a4ca5"/></dir><dir name="Model"><file name="Api.php" hash="
|
19 |
<compatible/>
|
20 |
<dependencies/>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Beecoder_Beeshopy</name>
|
4 |
+
<version>2.7.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
11 |
<description>Custom Module that allows you to connect with beeshopy service and integrates your magento store with Facebook. 
|
12 |

|
13 |
It contains a custom API and cart processing.</description>
|
14 |
+
<notes>Adding new Configurable products implementation</notes>
|
15 |
<authors><author><name>Miguel Ángel Martínez Triviño</name><user>auto-converted</user><email>migmartri@gmail.com</email></author></authors>
|
16 |
+
<date>2012-05-09</date>
|
17 |
+
<time>10:27:57</time>
|
18 |
+
<contents><target name="magecommunity"><dir name="Beecoder"><dir name="Beeshopy"><dir name="Block"><file name="Track.php" hash="a40d400b02f73d5b4dea35c348ffee00"/></dir><dir name="Helper"><file name="Data.php" hash="ead88c0b629856526d39e7fb6f3a4ca5"/></dir><dir name="Model"><file name="Api.php" hash="712da837eb9b4e5241836bc658b09732"/></dir><dir name="controllers"><file name="AdminController.php" hash="1b343fe1ef8ae5fafc5d355844e3f508"/><file name="IndexController.php" hash="bad3391bb742a55a2ee62895cb723e87"/></dir><dir name="etc"><file name="api.xml" hash="507ae656ea724a77def33efd8429d674"/><file name="config.xml" hash="2fcfaeccb838771505e12715c9618c3d"/></dir><file name="changelog.txt" hash="7c63fea23b96400469f7ee1ed48469c5"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Beecoder_Beeshopy.xml" hash="55666ef45f08dab44b138e49532ca3b8"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="beeshopy.xml" hash="e4e7f6be0be0ff27b98d8011f3772f56"/></dir><dir name="template"><dir name="beeshopy"><file name="track.phtml" hash="47c95001bb55042c5ae7d8ee4b03cccf"/></dir></dir></dir></dir></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies/>
|
21 |
</package>
|