protected function _beforeToHtml() { parent::_beforeToHtml(); $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Amazon\\Listing')); $this->js->add(<<<JS ListingAutoActionObj.showCreateNewAsin = {$this->showCreateNewAsin}; \$('adding_mode') .observe('change', ListingAutoActionObj.addingModeChange) .simulate('change'); \$('auto_action_create_asin') .observe('change', ListingAutoActionObj.createAsinChange) .simulate('change'); \$('adding_description_template_id').observe('change', function(el) { var options = \$(el.target).select('.empty'); options.length > 0 && options[0].hide(); }); JS ); return $this; }
protected function _toHtml() { $breadcrumb = $this->createBlock('Ebay\\Listing\\AutoAction\\Mode\\Breadcrumb', '', ['data' => ['id_prefix' => 'category']]); $breadcrumb->setSelectedStep(1); return $breadcrumb->toHtml() . parent::_toHtml(); }