Jump to content

Tuni-Soft

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by Tuni-Soft

  1. Hello, Your question is not directly related to this subject You can move the blocks in the theme template Look for blocks product_variants and product_customization in the file /themes/[theme]/templates/catalog/product.tpl Cheers
  2. I solved it by modifying this method directly // /src/Adapter/Module/AdminModuleDataProvider.php public function isAllowedAccess($action, $name = '') { if (Tools::isPHPCLI()) { return true; } if (in_array($action, ['install', 'upgrade'])) { return $this->employee->can('add', 'AdminModulessf'); } if ('uninstall' === $action) { return $this->employee->can('delete', 'AdminModulessf') && $this->moduleProvider->can('uninstall', $name); } // add this statement if (in_array($action, array('enable', 'disable', 'enable_mobile', 'disable_mobile', 'reset'))) { return $this->employee->isSuperAdmin(); } return $this->employee->can('edit', 'AdminModulessf') && $this->moduleProvider->can('configure', $name); } or like this public function isAllowedAccess($action, $name = '') { if (Tools::isPHPCLI()) { return true; } if (in_array($action, ['install', 'upgrade', 'enable', 'enable_mobile'])) { return $this->employee->can('add', 'AdminModulessf'); } if (in_array($action, ['uninstall', 'reset', 'disable', 'disable_mobile'])) { return $this->employee->can('delete', 'AdminModulessf') && $this->moduleProvider->can('uninstall', $name); } return $this->employee->can('edit', 'AdminModulessf') && $this->moduleProvider->can('configure', $name); }
  3. Hi, I'm setting up a module demo and I want to only enable the Configure button Is there a way to do it? I tried to to it using the permissions but no luck When I remove the Edit permission from the module, the configure button is removed altogether Any help is much appreciated Thanks
  4. My whole VPS is down due to the OVH major incident This will be back up later
  5. Hi, Here's a fix (v2.0.1) to improve compatibility with the latest versions of PrestaShop Best regards transhare.zip
  6. Make sure to clear the browser cache after the update to get the new scripts - Currently it works only for modules Cheers
  7. Here's the updated version 2.0.0, it now works with the old and new interface transhare-2.0.0.zip
  8. Thank you for the info, I will try to update the module to support the new translation system
  9. Hi, Thank you for your reply, Please give me more information, I'm not aware of the new translation system. Is it specific to warehouse themes? Please attach a screenshot to get an idea about the issue Best regards
  10. I updated the script, Changes Display "Show all messages" by default instead of "See less messages" https://github.com/unlocomqx/seller-contact
  11. I improved it for the case when the URL contains a # character admintools.zip
  12. For easier developement, you may want to display your hook "displayAdminProductsExtra" in a separate page, I use this controller to do that and make development faster and easier Github link: https://github.com/unlocomqx/ps-extra-hook Feel free to use this controller in your module, Cheers
  13. Hi, I would like to share this JS script I wrote in order to improve the seller contact page You can find the script source here https://github.com/unlocomqx/seller-contact You can find necessary details on how to install it in the link I hope you find it useful, Feel free to post any questions or suggestions PS: Only install this script if you totally understand what the code does Finally, I hope the PrestaShop team finds some ideas worth implementing "natively" Cheers
  14. Version 1.0.1 Fixed issue with URL too long when getting the list of translations Updated zip is in the original post
  15. Hi, I propose this new free module to facilitate sharing modules translations between admin and merchants A lot of modules come with no translation for several languages which makes it time consuming to translate them This module allows you to import a module translation for the desired language and to also share it if it doesn't exist yet How to install To install the module, open the Modules page and click Upload a module then upload the attached zip file How to use Start by opening the module translation page then import one of the existing translations or share your translation Make sure that the translation you share doesn't contain sensitive or offensive information Rating the translations You can rate a translation by pressing the thumbs up or thumbs down buttons How to import a translation First click on the translation then choose the options If you choose to overwrite all fields, then the module will replace the already filled fields and it will replace your translation The module will not save the translation automatically so you can take your time to verify it carefully (since version 2.0.0, the translation is saved directly) The module also displays the translation progress so you can pick the most complete translation ⏬ Download transhare-2.0.1.zip Support and feedback If you encounter any issue or have any feedback, don't hesitate to post in this thread More modules Feel free to check my PrestaShop modules on PrestaShop Addons transhare-2.0.1.zip
  16. Hi everyone, This topic will give you a useful tip if you use webpack to develop your Addons I experienced a few conflicts with other modules which make use of webpack and solved the issue by renaming the webpack main function This can be easily done by adding the key "jsonpFunction" to the "output" config of webpack Example output: { path: __dirname + "/../views/js", jsonpFunction: 'dsn_jsonpFunction' } Notice how I changed the name of the main function and added the prefix "dsn_" This is to avoid conflicts with other modules that use webpack You can also do the same by adding some prefix to your configuration I hope someone finds this tip useful, Cheers
  17. Hi, It can be done if you save the customization programmatically I didn't try hooking into the customization save process Best regards
  18. Hello, You can try the popup option (It's in the first tab) It will hide the panel until your customer clicks on the customize button Kind regards
  19. Hello, Is there a way to use the form helper with the "new-theme" I have an extra product tab (displayAdminProductsExtra) and I want to drop some fields but I'm facing some difficulties First, it doesn't find the form.tpl template I added the default theme folder as a template directory to smarty but that didn't help since some css is needed to properly display the fields So the form helper works fine on the configuration page of the module but not on the product page Any hint is appreciated I don't want to work with html, the helper is much cleaner and more maintainable Cheers
  20. It turns out that the official paypal module already supports this function!
  21. Hi, I'm in search of a PayPal addon which supports the multishop system What I want to have is a different paypal for each shop Let's say that every shop will belong to a separate merchant Is there a solution that is already available? Cheers
  22. Thank you for this contribution, it will be really useful for multishops with different themes
  23. Hello, You just need to copy this file https://github.com/maximebiloe/PrestaShop/blob/47a069aa9ca5e347e64020addfd5de6d8059ef89/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl - Make a backup of your file in [your admin folder]/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl - Open the link above and click "Raw" to download the file - Copy the downloaded file - Check if template recompilation is enabled in the Performance page
  24. Hello, As you might know, the customization system has been modified in PrestaShop 1.7 Now customizations can have a price and weight impact much like product combinations. This makes it easier for modules to include custom data in the client cart. Plus, each customization will be displayed on a row of its own. What has changed: The table structure of `ps_customization_field` A new column was added: `is_module` which means that the field belongs to a module When this column has a value of 1, the field won't be displayed on the front Make sure to set the value to 1 if your module creates a custom field for the product Your module can set the value of the input `#product_customization_id` to include the customization in the cart Ideal scenario: - The client makes a customization and saves it via ajax - Your module returns an `id_customization` and puts it in `#product_customization_id` - Your module clicks the add to cart button The table structure of `ps_customized_data` New columns: `id_module`, `price`, `weight` When you save a customization, set the `id_module` to the value of your module ID Set the `price` and `weight` to the corresponding price & weight of the customization Set the `value` to a row ID in your module's custom table where extra data about the customization is stored When PrestaShop system finds a customization that has an `id_module` it will trigger a hook This hook will be only passed to the concerned module (having an ID equal to the value in `id_module`) More on the hook below.. Saving the customization When saving the customization, set the quantity to 0. It will be updated by PrestaShop when the product is added to cart. In fact, the customization will always have the same quantity as the product row because each customization will be assigned to a separate product row in the cart. Using the new hook This how to register the new hook $this->registerHook('displayCustomization') You can alter the displayed customization by returning some content related to the `value` (html allowed) public function hookDisplayCustomization($params) { $id_row = (int)$params['customization']['value']; return $this->functionToDisplayASummaryOf($id_row); } Changes on methods Here are some method which were modified (Declaration And/Or Body) Product::getPriceStatic Product::getAllCustomizedDatas I hope this is helpful if you're developing a new module or adapting your module for PrestaShop 1.7. Feel free to ask if you encounter any difficulty. Your feedback will improve this guide.
×
×
  • Create New...

Important Information

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