vishakha Posted January 20, 2015 Share Posted January 20, 2015 created a test module.It is being installed but throwing prestashop exception while configuring it...... Link to comment Share on other sites More sharing options...
jsmit2 Posted January 20, 2015 Share Posted January 20, 2015 What exception is it throwing? Is it a clean module? if you need a good base you can go to validate.prestashop.com and then select the generator (you need to login) 1 Link to comment Share on other sites More sharing options...
vishakha Posted January 20, 2015 Author Share Posted January 20, 2015 [PrestaShopException] Method of module cannot be found at line 802 in file controllers/admin/AdminModulesController.php 796. $echo = '';797. if ($key != 'update' && $key != 'checkAndUpdate')798. {799. // We check if method of module exists800. if (!method_exists($module, $method))801. throw new PrestaShopException('Method of module cannot be found');802. 803. // Get the return value of current method804. $echo = $module->{$method}();805. 806. // After a successful install of a single module that has a configuration method, to the configuration page Link to comment Share on other sites More sharing options...
jsmit2 Posted January 20, 2015 Share Posted January 20, 2015 What is the source code of your module? can you show us that Link to comment Share on other sites More sharing options...
vishakha Posted January 20, 2015 Author Share Posted January 20, 2015 <?phpif (!defined('_PS_VERSION_')) exit;class testmodule extends Module{ /* @var boolean error */ protected $_errors = false; public function __construct() { $this->name = 'testmodule'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'Nemo'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('testmodule'); $this->description = $this->l('Adds a block.'); $this->confirmUninstall = $this->l('Are you sure you want to delete this module?'); } public function install() { if (!parent::install()) return false; return true; } public function uninstall() { if (!parent::uninstall()) return false; return true; } public function countAllProducts() { return Db::getInstance()->getValue('SELECT COUNT(*) from ps_product WHERE active = 1'); }} Link to comment Share on other sites More sharing options...
jsmit2 Posted January 20, 2015 Share Posted January 20, 2015 (edited) Your module markup is missing some default functions: /** * Load the configuration form */ public function getContent() { /** * If values have been submitted in the form, process. */ $this->_postProcess(); $this->context->smarty->assign('module_dir', $this->_path); $output = $this->context->smarty->fetch($this->local_path.'views/templates/admin/configure.tpl'); return $output.$this->renderForm(); } /** * Create the form that will be displayed in the configuration of your module. */ protected function renderForm() { $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $helper->module = $this; $helper->default_form_language = $this->context->language->id; $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0); $helper->identifier = $this->identifier; $helper->submit_action = 'submitMyModule'; $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->tpl_vars = array( 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */ 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id, ); return $helper->generateForm(array($this->getConfigForm())); } /** * Create the structure of your form. */ protected function getConfigForm() { return array( 'form' => array( 'legend' => array( 'title' => $this->l('Settings'), 'icon' => 'icon-cogs', ), 'input' => array( array( 'type' => 'switch', 'label' => $this->l('Live mode'), 'name' => 'MYMODULE_LIVE_MODE', 'is_bool' => true, 'desc' => $this->l('Use this module in live mode'), 'values' => array( array( 'id' => 'active_on', 'value' => true, 'label' => $this->l('Enabled') ), array( 'id' => 'active_off', 'value' => false, 'label' => $this->l('Disabled') ) ), ), array( 'col' => 3, 'type' => 'text', 'prefix' => '<i class="icon icon-envelope"></i>', 'desc' => $this->l('Enter a valid email address'), 'name' => 'MYMODULE_ACCOUNT_EMAIL', 'label' => $this->l('Email'), ), array( 'type' => 'password', 'name' => 'MYMODULE_ACCOUNT_PASSWORD', 'label' => $this->l('Password'), ), ), 'submit' => array( 'title' => $this->l('Save'), ), ), ); } /** * Set values for the inputs. */ protected function getConfigFormValues() { return array( 'MYMODULE_LIVE_MODE' => Configuration::get('MYMODULE_LIVE_MODE', true), 'MYMODULE_ACCOUNT_EMAIL' => Configuration::get('MYMODULE_ACCOUNT_EMAIL', '[email protected]'), 'MYMODULE_ACCOUNT_PASSWORD' => Configuration::get('MYMODULE_ACCOUNT_PASSWORD', null), ); } /** * Save form data. */ protected function _postProcess() { $form_values = $this->getConfigFormValues(); foreach (array_keys($form_values) as $key) Configuration::updateValue($key, Tools::getValue($key)); } Edited January 20, 2015 by jsmit2 (see edit history) Link to comment Share on other sites More sharing options...
vishakha Posted January 21, 2015 Author Share Posted January 21, 2015 sir please guide me where I have to edit these codes.I am new to this.dont understand much about file structures of modules of prestashop.................. Link to comment Share on other sites More sharing options...
JoelWebsites Posted January 21, 2015 Share Posted January 21, 2015 It seems that you will need to create a function ...or the function does not exist in your module Link to comment Share on other sites More sharing options...
jsmit2 Posted January 21, 2015 Share Posted January 21, 2015 You can download a clean template at validator.prestashop.com 2 Link to comment Share on other sites More sharing options...
vishakha Posted January 23, 2015 Author Share Posted January 23, 2015 how to write code for displaying addition seller block upon header for their registration................. Link to comment Share on other sites More sharing options...
vishakha Posted January 23, 2015 Author Share Posted January 23, 2015 Help me for developing page in php for registration of seller in prestashop................... Link to comment Share on other sites More sharing options...
JoelWebsites Posted January 23, 2015 Share Posted January 23, 2015 What do you mean by seller block? Link to comment Share on other sites More sharing options...
vishakha Posted January 23, 2015 Author Share Posted January 23, 2015 I have to create a seller zone for sellers where sellers can register themselves like snapdeal..........http://sellers.snapdeal.com/ Link to comment Share on other sites More sharing options...
JoelWebsites Posted January 23, 2015 Share Posted January 23, 2015 (edited) http://addons.prestashop.com/en/marketplace-prestashop-modules/8057-advanced-marketplace.html Have a look at this Edited January 23, 2015 by JoelWebsites (see edit history) Link to comment Share on other sites More sharing options...
imagetag Posted January 24, 2015 Share Posted January 24, 2015 Configuring it? I wonder, that you have a configure button at all, because you defined no configuration at all. As for now, your module should only be installed or uninstalled. Link to comment Share on other sites More sharing options...
vishakha Posted January 27, 2015 Author Share Posted January 27, 2015 hey guys can u help me ...........I have to register a product as a seller and image should be displayed on home page of parent website..................................... Link to comment Share on other sites More sharing options...
imagetag Posted January 27, 2015 Share Posted January 27, 2015 Honestly, I've no idea what you mean. Maybe you could give us some more details? Link to comment Share on other sites More sharing options...
vishakha Posted January 27, 2015 Author Share Posted January 27, 2015 Means i have to add products as a seller in ecommerce website and image should be displayed on home page.so how it can be done in prestashop Link to comment Share on other sites More sharing options...
JoelWebsites Posted January 27, 2015 Share Posted January 27, 2015 You can try using webservices to create new employees..these employees will be able to add products ...and the products will be displayed in the front office Link to comment Share on other sites More sharing options...
vishakha Posted January 28, 2015 Author Share Posted January 28, 2015 hey help me..............I have to edit mails sent by prestashop have content....:."powered by prestashop .com".I have to edit this text.so from where i have to edit. plzz guide me step by step Link to comment Share on other sites More sharing options...
JoelWebsites Posted January 28, 2015 Share Posted January 28, 2015 Hi ..(please make new forum topics in new topics) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now