Skip to content
This repository has been archived by the owner on Aug 1, 2018. It is now read-only.

Commit

Permalink
Initial order status change
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix128 committed Oct 25, 2017
1 parent 423b90e commit aad28f4
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion Model/Cashondelivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ public function getCartInformation()
return $this->objectManagerInterface->get('MSP\CashOnDelivery\Api\CashondeliveryCartInterface');
}


/**
* @return \Magento\Tax\Api\Data\TaxRateInterface
*/
Expand Down
4 changes: 1 addition & 3 deletions Model/CashondeliveryTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public function saveFromFile($fileName)
for ($i=0; $i<count($headers); $i++) {
// @codingStandardsIgnoreEnd
foreach ($this->_columns as $columnName) {

// Optional columns
if ($columnName == 'website') {
if (!isset($csvLine[$columnsMap[$columnName]]) || !$csvLine[$columnsMap[$columnName]]) {
Expand All @@ -164,8 +163,7 @@ public function saveFromFile($fileName)
if ($columnName == 'fee') {
$dataRow['is_pct'] = (strpos($value, '%') !== false);
$value = floatval(str_replace('%', '', $value));

} else if ($columnName == 'from_amount') {
} elseif ($columnName == 'from_amount') {
$value = floatval($value);
}

Expand Down
2 changes: 1 addition & 1 deletion Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)

$excludeRegions = $this->_scopeConfig->getValue(static::XML_PATH_EXCLUDE_REGIONS);

if(!empty($excludeRegions)) {
if (!empty($excludeRegions)) {
$excludeRegions = explode(',', $excludeRegions);
foreach ($quote->getAllShippingAddresses() as $shippingAddress) {
if (in_array($shippingAddress->getRegionId(), $excludeRegions)) {
Expand Down
3 changes: 1 addition & 2 deletions Model/ResourceModel/Order/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function __construct(

/**
* Get sales amount expression
* Here i added the last to arguments to the expression
* Here i added the last to arguments to the expression
* to subtract the cash on deliry and the tax amount form the total revenue
*
* @return string
Expand Down Expand Up @@ -156,5 +156,4 @@ protected function _getSalesAmountExpression()

return $this->_salesAmountExpression;
}

}
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</field>
<field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0">
<label>New Order Status</label>
<source_model>Magento\Sales\Model\Config\Source\Order\Status\NewStatus</source_model>
<source_model>Magento\Sales\Model\Config\Source\Order\Status\Newprocessing</source_model>
</field>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Applicable Countries</label>
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="MSP_CashOnDelivery" setup_version="1.2.6">
<module name="MSP_CashOnDelivery" setup_version="1.2.7">
<sequence>
<module name="Magento_Sales" />
<module name="Magento_Payment" />
Expand Down

0 comments on commit aad28f4

Please sign in to comment.