/** * Get data options from 'Tier price' form. * * @param array $fields * @param SimpleElement|null $element * @return array */ public function getDataOptions(array $fields = null, SimpleElement $element = null) { $data = []; if (isset($fields['value']) && is_array($fields['value'])) { foreach ($fields['value'] as $key => $option) { $data[$key++] = parent::getDataOptions($option, $element->find('tbody tr:nth-child(' . $key . ')')); } } return $data; }
/** * Fill the form. * * @param array $fields * @param SimpleElement $element * @return $this */ public function fillOptions(array $fields, SimpleElement $element = null) { $this->_rootElement->find($this->addValueButton)->click(); return parent::fillOptions($fields, $element); }