i tried copying your code exactly still nogo. also do the models need to call parent i am assuming so correct me if im wrong.
also do i need to call the parent on every overridden method, say for ex i need to overwrite the edit and getform method, edit calls the getform method do i only need to call parent in the edit method after getform returns or do i need to retern parent on every method the instructions say every method, i am returning from every method, i just wanna be sure.
also i can see my changes on the cached tpl file but not any other files in the cache, are these files cached
only if 2 or more mods override the same methids? is there really any reason to override methods such as getform or is it better to just put all the newly created logic in the prerender.
i cant for the life of me figure out why the language files arent loading correctly, if i remove the <?php from the beginning of the language i get output to the screen with the new strings so i am assuming with the php statement they would be getting loaded correctly, but when i dump the language varibles i getonly the origional lang file this is the only mods ive made to your code.
Code: Select all
/* overridden method, always called before the final rendering */
public function preRender( $template_buffer, $template_name, &$data ) {
if ($template_name != 'catalog/product_form.tpl') {
return parent::preRender( $template_buffer, $template_name, $data );
}
// add new controller variables
$this->load->language( 'catalog/product' );
var_dump($this->language);
$data['entry_has_option'] = $this->language->get('entry_has_option');
$data['tab_stock'] = $this->language->get('tab_stock');
return parent::preRender( $template_buffer, $template_name, $data );
}
when i get this figured out im going to make a writeup so its easier for noobs, it seems simple but the language addons just are frustrating.