Carry out the following steps:
Create another file named
controller.php
in our new add-on directory.Put the following content in it:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); class ProductInformationBlockController extends BlockController { protected $btTable = 'btProductInformation'; protected $btInterfaceWidth = "590"; protected $btInterfaceHeight = "450"; public function getBlockTypeDescription() { return t("Embeds a Product Information in your web page."); } public function getBlockTypeName() { return t("Product Information"); } function view(){ $this->set('bID', $this->bID); } function save($data) { parent::save($data); } function getPicture() { if ($this->fIDpicture > 0) { return File::getByID($this->fIDpicture); } return null; } } ?>