Skip to content

Commit

Permalink
Fixed a problem where you couldn't return 0 for getFieldCounter.
Browse files Browse the repository at this point in the history
  • Loading branch information
paales committed Sep 18, 2014
1 parent 4f711d7 commit 9fdd287
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/code/community/Ho/Import/Helper/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ public function getFieldMap($line, $field, $mapping) {
return $values;
}


/**
* Count another field an give it or a list or a value.
* @param $line
Expand All @@ -368,11 +369,12 @@ public function getFieldCounter($line, $countConfig, $valueConfig = null) {
$value = $this->_getMapper()->mapItem($valueConfig);
$values = array();
for ($i = 0; $i < $count; $i++) {
$values[] = $value ? $value : $i;
$values[] = is_null($value) ? $i : $value;
}
return $values;
}


public function ifFieldsValue($line, $fields, $valueField) {
$values = $this->getFieldMultiple($line, $fields);
$valid = true;
Expand Down

0 comments on commit 9fdd287

Please sign in to comment.