Hi if anybody there know how to create a new module for prestashop please explain here or leave a tutorial adress...
i want to create a new payment module, cause in brazil, prestashop payments modules doesn't work, paypal doesn't have our currency. :/
waiting for suggestions.
thx
The answer is that it's either very easy to do (if you're used to programming in PHP using objects and classes) or very difficult!
The best way to learn is to take one of the simpler modules and play with the basic code until you understand the basics of how it works. You don;t need much code for a "minimal" implementation.
It terms of porting osCommerce code..... it's almost entirely a different thing, except in terms of payment modules where certain blocks of code could be easily re-used.
Paul
The best way to learn is to take one of the simpler modules and play with the basic code until you understand the basics of how it works. You don;t need much code for a "minimal" implementation.
It terms of porting osCommerce code..... it's almost entirely a different thing, except in terms of payment modules where certain blocks of code could be easily re-used.
Paul
Free Prestashop modules and developer resources
Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2
Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net
Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2
Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net
And if I don't want to re-use any existent module but create an own one from the scratch?
What are the basics for creating modules? What do I have to mind to, if I create a module?
Are there any Tutorials or faqs regarding to that that topic?
Thanks for your help.
davadda
What are the basics for creating modules? What do I have to mind to, if I create a module?
Are there any Tutorials or faqs regarding to that that topic?
Thanks for your help.
davadda
Well the most basic one (non payment):
Not sure what you're asking apart from that?? :)
Paul
<?php
class mymodule extends Module {
}
?>
Not sure what you're asking apart from that?? :)
Paul
Free Prestashop modules and developer resources
Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2
Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net
Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2
Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net
Thanks for your quick answer. The code you submitted was my first idea, but it does not work.
Thats my code, but it does not get listed in the modules list. Any idea?
(If I change the name of the google adsense Module for example it works - the name changes in the modules list - but if I change the folder name it is not listed anymore. Is there any Config that I have to edit?)
class test extends Module
{
public function __construct()
{
$this->name = 'test';
$this->tab = 'Tools';
$this->version = "0.1";
parent::__construct();
/* The parent construct is required for translations */
$this->page = basename(__FILE__, '.php');
$this->displayName = $this->l('Test');
$this->description = $this->l('Just a test!');
}
}
Thats my code, but it does not get listed in the modules list. Any idea?
(If I change the name of the google adsense Module for example it works - the name changes in the modules list - but if I change the folder name it is not listed anymore. Is there any Config that I have to edit?)
OK, create a file containing the following, and call it test.php.
Make a directory /modules/test and put the above file in it, and it should show up in the back office :)
The $this->name member variable must match the directory and filename (case sensitive). The Class name must also match, but isn't case sensitive.
Paul
<?php
class test extends Module
{
public function __construct()
{
$this->name = 'test';
$this->tab = 'Tools';
$this->version = "0.1";
parent::__construct();
/* The parent construct is required for translations */
$this->page = basename(__FILE__, '.php');
$this->displayName = $this->l('Test');
$this->description = $this->l('Just a test!');
}
function install()
{
if (!parent::install())
return false;
return true;
}
}
?>
Make a directory /modules/test and put the above file in it, and it should show up in the back office :)
The $this->name member variable must match the directory and filename (case sensitive). The Class name must also match, but isn't case sensitive.
Paul
Free Prestashop modules and developer resources
Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2
Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net
Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2
Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net
Thank you very much. I found that out about some minutes ago.
A short faq about that would make it easier to create the first module :D
A short faq about that would make it easier to create the first module :D




Back to top









