Chaordic_Base - Version 1.0.4

Version Notes

Pequenas correções de configurações e tratamento de preços.

Download this release

Release Info

Developer Chaordic
Extension Chaordic_Base
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.4

app/code/community/Chaordic/Base/.DS_Store CHANGED
Binary file
app/code/community/Chaordic/Base/Helper/Data.php CHANGED
@@ -41,7 +41,7 @@ class Chaordic_Base_Helper_Data extends Mage_Core_Helper_Abstract
41
 
42
  public function getSecretKey()
43
  {
44
- $config = Mage::getStoreConfig('chaordic_onsite/options/secret_key');
45
 
46
  if (empty($config)) {
47
  return null;
@@ -55,8 +55,8 @@ class Chaordic_Base_Helper_Data extends Mage_Core_Helper_Abstract
55
  $config = Mage::getStoreConfig('chaordic_base/methods/installment_count');
56
 
57
  if (empty($config)) {
58
- $config = Mage::helper('chaordic_base/helper')->DEFAULT_INSTALLMENT_COUNT;
59
- Mage::setStoreConfig('chaordic_base/methods/installment_count', $config);
60
  }
61
 
62
  return $config;
@@ -67,8 +67,8 @@ class Chaordic_Base_Helper_Data extends Mage_Core_Helper_Abstract
67
  $config = Mage::getStoreConfig('chaordic_base/methods/installment_price');
68
 
69
  if (empty($config)) {
70
- $config = Mage::helper('chaordic_base/helper')->DEFAULT_INSTALLMENT_PRICE;
71
- Mage::setStoreConfig('chaordic_base/methods/installment_price', $config);
72
  }
73
 
74
  return $config;
41
 
42
  public function getSecretKey()
43
  {
44
+ $config = Mage::getStoreConfig('chaordic_base/options/secret_key');
45
 
46
  if (empty($config)) {
47
  return null;
55
  $config = Mage::getStoreConfig('chaordic_base/methods/installment_count');
56
 
57
  if (empty($config)) {
58
+ $config = Mage::helper('chaordic_base')->DEFAULT_INSTALLMENT_COUNT;
59
+ self::setConfig('chaordic_base/methods/installment_count', $config);
60
  }
61
 
62
  return $config;
67
  $config = Mage::getStoreConfig('chaordic_base/methods/installment_price');
68
 
69
  if (empty($config)) {
70
+ $config = Mage::helper('chaordic_base')->DEFAULT_INSTALLMENT_PRICE;
71
+ self::setConfig('chaordic_base/methods/installment_price', $config);
72
  }
73
 
74
  return $config;
app/code/community/Chaordic/{.DS_Store → Base/Model/.DS_Store} RENAMED
Binary file
app/code/community/Chaordic/Base/Model/Checkout.php CHANGED
@@ -273,7 +273,7 @@ class Chaordic_Base_Model_Checkout
273
  array(
274
  $item['product']['id'],
275
  $item['product']['sku'],
276
- $item['product']['price'],
277
  $item['quantity']
278
  )
279
  )
273
  array(
274
  $item['product']['id'],
275
  $item['product']['sku'],
276
+ money_format('%.2n', $item['product']['price']),
277
  $item['quantity']
278
  )
279
  )
app/code/community/Chaordic/Base/Model/{PaymentMethods.php → Paymentmethods.php} RENAMED
File without changes
app/code/community/Chaordic/Base/Model/Product.php CHANGED
@@ -88,8 +88,8 @@ class Chaordic_Base_Model_Product
88
  public function getProductDeclaration(Mage_Catalog_Model_Product $product)
89
  {
90
  $helper = Mage::helper('chaordic_base');
91
- $catalog = Mage::getSingleton('chaordic_onsite/catalog');
92
- $model = Mage::getSingleton('chaordic_onsite/product');
93
 
94
  $declaration = array();
95
  $data = $product->getData();
@@ -202,7 +202,7 @@ class Chaordic_Base_Model_Product
202
  public function getProductSpecsDeclaration($product)
203
  {
204
  $helper = Mage::helper('chaordic_base');
205
- $model = Mage::getSingleton('chaordic_onsite/product');
206
 
207
  $specs = array();
208
  $skus = array();
@@ -283,12 +283,8 @@ class Chaordic_Base_Model_Product
283
  */
284
  $prices = $model->getProductPricesDeclaration($child);
285
 
286
- if ($prices['price'] != $productPrice['price']) {
287
- array_push($skus, array_merge($sku, $prices));
288
 
289
- } else {
290
- array_push($skus, $sku);
291
- }
292
  }
293
 
294
  return array(
88
  public function getProductDeclaration(Mage_Catalog_Model_Product $product)
89
  {
90
  $helper = Mage::helper('chaordic_base');
91
+ $catalog = Mage::getSingleton('chaordic_base/catalog');
92
+ $model = Mage::getSingleton('chaordic_base/product');
93
 
94
  $declaration = array();
95
  $data = $product->getData();
202
  public function getProductSpecsDeclaration($product)
203
  {
204
  $helper = Mage::helper('chaordic_base');
205
+ $model = Mage::getSingleton('chaordic_base/product');
206
 
207
  $specs = array();
208
  $skus = array();
283
  */
284
  $prices = $model->getProductPricesDeclaration($child);
285
 
286
+ array_push($skus, array_merge($sku, $prices));
 
287
 
 
 
 
288
  }
289
 
290
  return array(
app/code/community/Chaordic/Base/etc/config.xml CHANGED
@@ -16,7 +16,7 @@
16
  <models>
17
  <chaordic_base>
18
  <class>Chaordic_Base_Model</class>
19
- <resourceModel>chaordic_onsite_mysql4</resourceModel>
20
  </chaordic_base>
21
  <chaordic_base_mysql4>
22
  <class>Chaordic_Base_Model_Mysql4</class>
16
  <models>
17
  <chaordic_base>
18
  <class>Chaordic_Base_Model</class>
19
+ <resourceModel>chaordic_base_mysql4</resourceModel>
20
  </chaordic_base>
21
  <chaordic_base_mysql4>
22
  <class>Chaordic_Base_Model_Mysql4</class>
package.xml CHANGED
@@ -1,21 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Chaordic_Base</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>M&#xF3;dulo de integra&#xE7;&#xE3;o Chaordic.</summary>
10
  <description>Integra informa&#xE7;&#xF5;es da loja Magento aos servi&#xE7;os da Chaordic Systems.</description>
11
- <notes>Vers&#xE3;o com suporte a recursos do produto Onsite e Search:&#xD;
12
- - Integra&#xE7;&#xE3;o do Loader Chaordic.&#xD;
13
- - Integra&#xE7;&#xE3;o dos modelos de dados de produtos, categorias, carrinho, transa&#xE7;&#xF5;es e usu&#xE1;rios.&#xD;
14
- - P&#xE1;gina de modelo Search.</notes>
15
- <authors><author><name>Chaordic Systems</name><user>chaordic</user><email>costa@chaordicsystems.com.br</email></author></authors>
16
- <date>2015-01-08</date>
17
- <time>16:51:31</time>
18
- <contents><target name="mageetc"><dir name="modules"><file name="Chaordic_Base.xml" hash="c6efd2e90b8a8fc38f7ef1d92d51a57c"/></dir></target><target name="magecommunity"><dir name="Chaordic"><dir name="Base"><dir name="Block"><file name="Loader.php" hash="eca85c7647f1187b0309b5fade41dd5d"/><file name="Meta.php" hash="a63c9dcd7454c3ba7ad4a095ebe50806"/></dir><dir name="Helper"><file name="Data.php" hash="f64847c0ffa24a585837dfe19d2aba3b"/></dir><dir name="Model"><file name="Catalog.php" hash="7875b6dab0172b521b98517b0c33615c"/><file name="Checkout.php" hash="76bf634f513bc1cbddee5f7ed2493553"/><file name="Cms.php" hash="51b7f10cf52d10c7fde425ee609c4441"/><file name="Customer.php" hash="7be5f5749727be875c361c9a41504e5e"/><file name="Installment.php" hash="da2c100d8db9dd7dd5fbeb3a935c8a21"/><file name="Meta.php" hash="81fd78719a8bf3b6dbb20b716b87897c"/><file name="PaymentMethods.php" hash="2b091718ff97ec5fe0c5f81aba7c30c0"/><file name="Product.php" hash="80f4cb0cf5db13b42beb6184a6d691d4"/><file name="Search.php" hash="ca048a463d55b795305e0faea28b4301"/><file name="User.php" hash="51b39cffb0224946187af903d4f65b03"/></dir><dir name="controllers"><file name="RemoteController.php" hash="394e7eac5ef0af5608028305e29b79bf"/></dir><dir name="etc"><file name="config.xml" hash="9ca29fb667fb51df6bb5a65a55c72880"/><file name="system.xml" hash="7c1f10996ad9ed6e08d508c99888919c"/></dir><file name=".DS_Store" hash="9567c71fb3193ad25155b1c371035ddf"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/><file name=".gitignore" hash="2f0cd577d0e696bae6250e3681d0860a"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="chaordic_base.xml" hash="82f6c382942b84eb8138b28a4da700b7"/></dir><dir name="template"><dir name="chaordic"><file name="loader.phtml" hash="934137d2ff16abcb65b7af83a5db4e98"/><file name="meta.phtml" hash="454b125a3a80151355f365a6bd91eb07"/></dir></dir></dir></dir></dir></target></contents>
19
  <compatible/>
20
- <dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.9.0.0</max></package></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Chaordic_Base</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>M&#xF3;dulo de integra&#xE7;&#xE3;o Chaordic.</summary>
10
  <description>Integra informa&#xE7;&#xF5;es da loja Magento aos servi&#xE7;os da Chaordic Systems.</description>
11
+ <notes>Pequenas corre&#xE7;&#xF5;es de configura&#xE7;&#xF5;es e tratamento de pre&#xE7;os.</notes>
12
+ <authors><author><name>Chaordic Systems</name><user>Chaordic</user><email>costa@chaordicsystems.com</email></author></authors>
13
+ <date>2015-03-02</date>
14
+ <time>14:03:11</time>
15
+ <contents><target name="magecommunity"><dir name="Chaordic"><dir name="Base"><dir name="Block"><file name="Loader.php" hash="eca85c7647f1187b0309b5fade41dd5d"/><file name="Meta.php" hash="a63c9dcd7454c3ba7ad4a095ebe50806"/></dir><dir name="Helper"><file name="Data.php" hash="32bc57b7747616c8c45fb8c90ae5ff65"/></dir><dir name="Model"><file name="Catalog.php" hash="7875b6dab0172b521b98517b0c33615c"/><file name="Checkout.php" hash="952da4a2fe987d6513d183731896fe90"/><file name="Cms.php" hash="51b7f10cf52d10c7fde425ee609c4441"/><file name="Customer.php" hash="7be5f5749727be875c361c9a41504e5e"/><file name="Installment.php" hash="da2c100d8db9dd7dd5fbeb3a935c8a21"/><file name="Meta.php" hash="81fd78719a8bf3b6dbb20b716b87897c"/><file name="Paymentmethods.php" hash="2b091718ff97ec5fe0c5f81aba7c30c0"/><file name="Product.php" hash="5ecdcb6afdad38e5e62317a0350bb4b1"/><file name="Search.php" hash="ca048a463d55b795305e0faea28b4301"/><file name="User.php" hash="51b39cffb0224946187af903d4f65b03"/><file name=".DS_Store" hash="fadf2b56953105b776ac3b072c6542e6"/></dir><dir name="controllers"><file name="RemoteController.php" hash="394e7eac5ef0af5608028305e29b79bf"/></dir><dir name="etc"><file name="config.xml" hash="69e393c12ac72da1eb9261d6b8d12659"/><file name="system.xml" hash="7c1f10996ad9ed6e08d508c99888919c"/></dir><file name=".DS_Store" hash="99bf12e312859e41475ba42fd5c34216"/></dir><file name=".gitignore" hash="2f0cd577d0e696bae6250e3681d0860a"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="chaordic_base.xml" hash="82f6c382942b84eb8138b28a4da700b7"/></dir><dir name="template"><dir name="chaordic"><file name="loader.phtml" hash="934137d2ff16abcb65b7af83a5db4e98"/><file name="meta.phtml" hash="454b125a3a80151355f365a6bd91eb07"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Chaordic_Base.xml" hash="c6efd2e90b8a8fc38f7ef1d92d51a57c"/></dir></target></contents>
 
 
 
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>