Beecoder_Beeshopy - Version 2.8.5

Version Notes

Adding support for discount codes

Download this release

Release Info

Developer Magento Core Team
Extension Beecoder_Beeshopy
Version 2.8.5
Comparing to
See all releases


Code changes from version 2.8.1 to 2.8.5

app/code/community/Beecoder/Beeshopy/Model/Api.php CHANGED
@@ -110,7 +110,7 @@ class Beecoder_Beeshopy_Model_Api extends Mage_Catalog_Model_Api_Resource
110
  /* Used to know if module is installed*/
111
  public function checkModule()
112
  {
113
- return array("api_version" => '2.8.1', "magento_version" => Mage::getVersion());
114
  }
115
 
116
  /*Auxiliar functions*/
@@ -164,6 +164,7 @@ class Beecoder_Beeshopy_Model_Api extends Mage_Catalog_Model_Api_Resource
164
  $regular_price = $product->getPrice();
165
 
166
  /* Prepare results */
 
167
  $result = array(
168
  'idx' => $product->getId(),
169
  'sku' => $product->getSku(),
@@ -172,7 +173,7 @@ class Beecoder_Beeshopy_Model_Api extends Mage_Catalog_Model_Api_Resource
172
  'description' => $product->getDescription(),
173
  'short_description' => $product->getShortDescription(),
174
  'title' => $product->getName(),
175
- 'in_stock' => $product->getStockItem()->getIsInStock(),
176
  'qty' => $product->getStockItem()->getQty(),
177
  'price' => $regular_price,
178
  'permalink' => $product->getUrlPath(),
@@ -186,7 +187,8 @@ class Beecoder_Beeshopy_Model_Api extends Mage_Catalog_Model_Api_Resource
186
  'status' => $product->getStatus(),
187
  'links' => $links,
188
  'manage_stock' => $product->getStockItem()->getManageStock(),
189
- 'updated_at' => $product->getUpdatedAt()
 
190
  );
191
 
192
  // Optional extra parameters
110
  /* Used to know if module is installed*/
111
  public function checkModule()
112
  {
113
+ return array("api_version" => '2.8.5', "magento_version" => Mage::getVersion());
114
  }
115
 
116
  /*Auxiliar functions*/
164
  $regular_price = $product->getPrice();
165
 
166
  /* Prepare results */
167
+ $in_stock = $product->getStockItem()->getIsInStock();
168
  $result = array(
169
  'idx' => $product->getId(),
170
  'sku' => $product->getSku(),
173
  'description' => $product->getDescription(),
174
  'short_description' => $product->getShortDescription(),
175
  'title' => $product->getName(),
176
+ 'in_stock' => $in_stock,
177
  'qty' => $product->getStockItem()->getQty(),
178
  'price' => $regular_price,
179
  'permalink' => $product->getUrlPath(),
187
  'status' => $product->getStatus(),
188
  'links' => $links,
189
  'manage_stock' => $product->getStockItem()->getManageStock(),
190
+ 'updated_at' => $product->getUpdatedAt(),
191
+ 'backorders' => ($in_stock != "0" ? NULL : Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . "backorders", $store))
192
  );
193
 
194
  // Optional extra parameters
app/code/community/Beecoder/Beeshopy/changelog.txt CHANGED
@@ -1,4 +1,12 @@
1
  == Module changelog ==
 
 
 
 
 
 
 
 
2
  === 2.8.1 (08-28-12) ===
3
 
4
  * Increasing the IFrame size
1
  == Module changelog ==
2
+ === 2.8.5 (10-30-12) ===
3
+
4
+ * Adding support to discount code applications on shopping cart
5
+
6
+ === 2.8.2 (10-09-12) ===
7
+
8
+ * Adding support to backorders
9
+
10
  === 2.8.1 (08-28-12) ===
11
 
12
  * Increasing the IFrame size
app/code/community/Beecoder/Beeshopy/controllers/.IndexController.php.swp ADDED
Binary file
app/code/community/Beecoder/Beeshopy/controllers/IndexController.php CHANGED
@@ -18,6 +18,7 @@ class Beecoder_Beeshopy_IndexController extends Mage_Core_Controller_Front_Actio
18
  /* Fill shopping cart */
19
  $cart = Mage::getSingleton('checkout/cart');
20
  $products = $this->getRequest()->getParam('products');
 
21
  $sview = $this->getRequest()->getParam('store_view');
22
 
23
  foreach($products as $attrs){
@@ -38,6 +39,15 @@ class Beecoder_Beeshopy_IndexController extends Mage_Core_Controller_Front_Actio
38
  ));
39
  }catch (Mage_Core_Exception $e) { }
40
  }
 
 
 
 
 
 
 
 
 
41
  $cart->save();
42
  Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
43
 
18
  /* Fill shopping cart */
19
  $cart = Mage::getSingleton('checkout/cart');
20
  $products = $this->getRequest()->getParam('products');
21
+ $coupons = $this->getRequest()->getParam('coupons');
22
  $sview = $this->getRequest()->getParam('store_view');
23
 
24
  foreach($products as $attrs){
39
  ));
40
  }catch (Mage_Core_Exception $e) { }
41
  }
42
+
43
+ /* Add coupon codes, NOTE, It is ready for multiple, but we can only apply one (Magento limitaion)*/
44
+ foreach($coupons as $couponCode){
45
+ $cart->getQuote()->getShippingAddress()->setCollectShippingRates(true);
46
+ $cart->getQuote()->setCouponCode(strlen($couponCode) ? $couponCode : '')
47
+ ->collectTotals()
48
+ ->save();
49
+ }
50
+
51
  $cart->save();
52
  Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
53
 
app/code/community/Beecoder/Beeshopy/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Beecoder_Beeshopy>
5
- <version>0.1.0</version>
6
  </Beecoder_Beeshopy>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Beecoder_Beeshopy>
5
+ <version>2.8.5</version>
6
  </Beecoder_Beeshopy>
7
  </modules>
8
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Beecoder_Beeshopy</name>
4
- <version>2.8.1</version>
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. &#xD;
12
  &#xD;
13
  It contains a custom API and cart processing.</description>
14
- <notes>Increasing Admin Iframe height.</notes>
15
  <authors><author><name>Miguel &#xC1;ngel Mart&#xED;nez Trivi&#xF1;o</name><user>auto-converted</user><email>migmartri@gmail.com</email></author></authors>
16
- <date>2012-08-28</date>
17
- <time>09:45:06</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="6756001e997dd4d76994184f672ed73b"/></dir><dir name="controllers"><file name="AdminController.php" hash="ec76e2b55bb772b244d9fc2e06a2223e"/><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="278262e5d7e6767f2c22d53b35212267"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Beecoder_Beeshopy</name>
4
+ <version>2.8.5</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. &#xD;
12
  &#xD;
13
  It contains a custom API and cart processing.</description>
14
+ <notes>Adding support for discount codes</notes>
15
  <authors><author><name>Miguel &#xC1;ngel Mart&#xED;nez Trivi&#xF1;o</name><user>auto-converted</user><email>migmartri@gmail.com</email></author></authors>
16
+ <date>2012-10-30</date>
17
+ <time>14:38:37</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="64ea69acf45821c18aba696526428ac9"/></dir><dir name="controllers"><file name="AdminController.php" hash="ec76e2b55bb772b244d9fc2e06a2223e"/><file name="IndexController.php" hash="0c177b543cf62d6bcd5617c6713032d3"/><file name=".IndexController.php.swp" hash="fd72fd6ae2d990bd388812d4b885b78d"/></dir><dir name="etc"><file name="api.xml" hash="507ae656ea724a77def33efd8429d674"/><file name="config.xml" hash="1abbaa83f8ce922322007d06933909ac"/></dir><file name="changelog.txt" hash="b0a66bc2029cdf5a064b9ac23dcab7a1"/></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>