Jump to content

I can't upload my module in Prestashop 1.6


Recommended Posts

Hello there people of Prestashop !

I've been following through with the documentation on " My First Module " from the official Prestashop guideline documentations.

This is my main module PHP as of the moment:
 

<?php
if (!defined('_PS_VERSION_'))
  exit;
 
class AllOfTheCrops extends Module
{
	  public function __construct()
	  {
			$this->name = 'allofthecrops';
			$this->tab = 'front_office_features';
			$this->version = '1.0.1';
			$this->author = 'Rasmus Andersson, Jonatan Jansson';
			$this->need_instance = 0;
			$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); 
			$this->bootstrap = true;
		 
			parent::__construct();
		 
			$this->displayName = $this->l('All Of The Crops');
			$this->description = $this->l('Description of my module.');
		 
			$this->confirmUninstall = $this->l('Are you sure you want to uninstall?');
		 
			if (!Configuration::get('MYMODULE_NAME'))      
				$this->warning = $this->l('No name provided');
	  }
  
	public function install()
	{  
		if (!parent::install())
			return false;
		return true;
	}
  
	public function uninstall()
	{  
		if (!parent::uninstall())
			return false;
		return true;
	}
}


Whenever I upload this into a folder it doesn't even register the module, It's not visible when inserted. I am fairly sure that the problem is strictly codebased. I've done some PHP in the past but this roadblock I just can't get past unfortunately.

Is there anyone who has any idea as to why it's not working, I would be glad to get any help or any sort of insight into the issue at hand, I've been searching like a maniac on other forums as well as this one but no dice :(

It's just the main PHP inside of a folder as of now.

Share this post


Link to post
Share on other sites

Name this file allofthecrops.php and upload it to /modules/allofthecrops folder. It will be at least visible in the Modules page.

Share this post


Link to post
Share on other sites

EDIT;

Oh sorry, I did undestand that your module is not working... instead that you cannot see it on module list....

 

From what I can see there are no hooks specified. You should specifiy hooks. Perhaps you are reading old documentation. PS 1.6 needs hooks for to work.

Edited by selectshop.at (see edit history)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More