public function testGetJsonConfig() { $config = (array) json_decode($this->_block->getJsonConfig()); $this->assertNotEmpty($config); $this->assertArrayHasKey('attributes', $config); $this->assertArrayHasKey('template', $config); $this->assertArrayHasKey('basePrice', $config); $this->assertArrayHasKey('productId', $config); $this->assertArrayHasKey('baseImage', $config); $this->assertEquals(1, $config['productId']); }
/** * Returns additional values for js config, con be overridden by descendants * * @return array */ protected function _getAdditionalConfig() { $result = parent::_getAdditionalConfig(); $result['disablePriceReload'] = true; // There's no field for price at popup $result['stablePrices'] = true; // We don't want to recalc prices displayed in OPTIONs of SELECT return $result; }
/** * {@inheritdoc} */ public function getImage($product, $imageId, $attributes = array()) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getImage'); if (!$pluginInfo) { return parent::getImage($product, $imageId, $attributes); } else { return $this->___callPlugins('getImage', func_get_args(), $pluginInfo); } }
/** * @codeCoverageIgnore * @return string */ protected function getHtmlOutput() { return parent::_toHtml(); }
/** * {@inheritdoc} */ public function offsetGet($offset) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'offsetGet'); if (!$pluginInfo) { return parent::offsetGet($offset); } else { return $this->___callPlugins('offsetGet', func_get_args(), $pluginInfo); } }