harlandraka94 Posted February 27, 2017 Share Posted February 27, 2017 Hi everyone. I'm still trying to setup my first prestashop 1.7 module. I'm following the guide here, seems to be easy but I can't get the module to work. When I try uploading it in the admin panel, prestashop says: Ooops... Upload failed, What happened? This file does not seem to be a valid module zip The module is pretty basic, it just has the module class with some empty hooks: <?php if (!defined('_PS_VERSION_')) { exit; } class MyFirstModule extends Module { public function __construct() { $this->name = 'myfirstmodule'; $this->tab = 'checkout'; $this->version = '1.0.0'; $this->author = 'First Module'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('My First Module'); $this->description = $this->l('This is my very first module.'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); } public function install() { if (Shop::isFeatureActive()) Shop::setContext(Shop::CONTEXT_ALL); if ( !parent::install() || !$this->registerHook('actionPaymentConfirmation') || !$this->registerHook('actionProductSave') || !$this->registerHook('displayAdminProductsExtra') || !$this->registerHook('displayOrderDetail') || !$this->registerHook('displayFooterProduct') || !Configuration::updateValue('MYMODULE_NAME', 'My First Module') ) { return false; } else { return true; } } public function uninstall() { if ( !parent::uninstall() ) { return false; } else { return true; } } // called after a payment is confirmed public function hookActionPaymentConfirmation($id_order) { } // called after product is saved public function hookActionProductSave($id_product, $product) { // throw new PrestaShopException("message"); //prevents product from saving } // used to add a tab in admin product page public function hookDisplayAdminProductsExtra($id_module) { } // used to add a tab in admin product page public function hookDisplayOrderDetail($order) { } // used to add a tab in admin product page public function hookDisplayFooterProduct($product, $category) { } } What am I missing? The full module zip is attached to this message myfirstmodule.zip 1 Link to comment Share on other sites More sharing options...
Xpert-Idea Posted February 28, 2017 Share Posted February 28, 2017 Please find the attach file and try this. I have fixed the issue for you. You should contain all files and folder with a folder by module name. myfirstmodule.zip 1 Link to comment Share on other sites More sharing options...
harlandraka94 Posted February 28, 2017 Author Share Posted February 28, 2017 Please find the attach file and try this. I have fixed the issue for you. You should contain all files and folder with a folder by module name. Oh. So simple! Thank you! 1 Link to comment Share on other sites More sharing options...
steve+paystack Posted November 6, 2017 Share Posted November 6, 2017 Hi @Xpert-Idea, What do you mean by Quote You should contain all files and folder with a folder by module name I am trying to create this file to make it easy for users to upload without using FTP but I keep getting the same error message. Attached is the folder v1.0.0-paystack.zip Link to comment Share on other sites More sharing options...
umarabdullahi Posted January 27, 2018 Share Posted January 27, 2018 On 11/6/2017 at 12:39 PM, steve+paystack said: Hi @Xpert-Idea, What do you mean by I am trying to create this file to make it easy for users to upload without using FTP but I keep getting the same error message. Attached is the folder v1.0.0-paystack.zip Hey! Just integrated paystack to a project. What you should do is extract the paystack folder, make it a zip, ensure the zip folder and the extracted folder have the same names. So your file structure should be like this: paystack.zip > paystack(folder) > (files in paystack) Link to comment Share on other sites More sharing options...
Alexander Firsov Posted December 31, 2020 Share Posted December 31, 2020 Would you please check what is wrong with this module archive? It gives me the same error: "Oops... Upload failed." And: "This file does not seem to be a valid module zip" prestashop-module-master.zip Link to comment Share on other sites More sharing options...
ecommerce16 Posted December 31, 2020 Share Posted December 31, 2020 1 uur geleden, Alexander Firsov zei: Would you please check what is wrong with this module archive? It gives me the same error: "Oops... Upload failed." And: "This file does not seem to be a valid module zip" prestashop-module-master.zip 14.36 kB · 1 download Please open a new topic for this. You are now responding on a topic from 3 years ago 1 Link to comment Share on other sites More sharing options...
Alexander Firsov Posted January 1, 2021 Share Posted January 1, 2021 Thank you. I found the solution to this problem already. Had to rename the folder inside the module's ZIP archive. Link to comment Share on other sites More sharing options...
Doha MOH Posted March 10, 2023 Share Posted March 10, 2023 (edited) i have the same error can you say how did you solve it? Edited March 10, 2023 by Doha MOH (see edit history) Link to comment Share on other sites More sharing options...
Hamed AGHAEIAN Posted July 26, 2023 Share Posted July 26, 2023 Hello dears, i want to install this module in prestashop 8.1. Please help me. moka-prestashop-master.zip Link to comment Share on other sites More sharing options...
endriu107 Posted July 26, 2023 Share Posted July 26, 2023 Unzip it, change folder name to only moka and zip it again, then it should install. 1 Link to comment Share on other sites More sharing options...
Hamed AGHAEIAN Posted July 26, 2023 Share Posted July 26, 2023 1 minute ago, endriu107 said: Unzip it, change folder name to only moka and zip it again, then it should install. dude you are great. worked.! 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