Child pages
  • Creating a PrestaShop module

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: To go further

...

Put the files online, then create the tab by going to the "Employee" tab, then its "Tabs" sub-tab. Click the "Add new" button, and fill-in the fields with the class' name, "AdminTest". Do not confuse "class" with "modules"! Choose an icon (like one from the FamFamFam icon pack: http://www.famfamfam.com/lab/icons/silk/), choose where the tab should go, and save. You are set! Now start customizing it to your needs!

To go further

This section includes some techniques that you can use for your modules.

Add a quick link on DashBoard

With your module, you can add a quick link on DashBoard to let's the user go faster. You can do it like this:

Code Block
public function hookDisplayAdminHomeQuickLinks($params)
{
	return $this->display(__FILE__, 'views/templates/admin/quick_links.tpl');	
}

Don't forget to register the hook in your install ($this->registerHook('displayAdminHomeQuickLinks')) !

The template file can be like this:

Code Block
<li>
  <a href="{$link->getAdminLink('AdminModules')}&configure=yourmodule" style="background: url('{$img_dir}admin/package_add.png') no-repeat center 25px #F8F8F8">
    <h4>{l s='Title' mod='yourmodule'}</h4>
    <p>{l s='Your description' mod='yourmodule'}</p>
  </a>
</li>

In this one, we set a button to let's the user go faster in the module configuration.

A list of PrestaShop hooks

...

URL

Description

http://www.prestashop.com

Official website for the PrestaShop tool, its community, and the company behind it.

http://addons.prestashop.com

Marketplace for themes and modules.

http://www.prestabox.com

Host your shop with us!

 

To go further