Jump to content


  • Content count

  • Joined

  • Last visited


About Tuni-Soft

  • Rank
    PrestaShop Apprentice
  • Birthday 08/01/1985

Profile Information

  • Gender
  • Location
  • Activity

Recent Profile Visitors

10,961,278 profile views
  1. [Module] Product Customization

    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
  2. 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
  3. Multishop paypal addon

    It turns out that the official paypal module already supports this function!
  4. 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
  5. 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
  6. 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.
  7. Hello, I made this Chrome extension in order to make managing customer messages easier The extension displays unread messages in the left side for easier navigation Preview: http://prntscr.com/by7m09 It also scroll down to the latest message and reloads the list of unread periodically I hope you like it, feel free to suggest other functions if you'd like Install link from Chrome Web Store: https://chrome.google.com/webstore/detail/features-for-addons-selle/eghmnekbjipcenijopgfdldknncpgfbl This extension doesn't collect any private information
  8. Hello, I made this admin module to quickly change backoffice language as I'm taking care of multilang after-sales support I need to change the language often in order to send a client an explanatory screenshot or to check my module translation I hope you find it useful, it works on PrestaShop 1.6 admintools.zip
  9. Unit test file for PrestaShop 1.7

    Yeah the issue was coming from the test code, the product_cart row has a new column which is `id_customization` so when the test file adds a fake test product it should also add the id_customization key I made another commit to address the problem
  10. Unit test file for PrestaShop 1.7

    It's a large pull request, I tested it thoroughly, I think it's quite stable https://github.com/PrestaShop/PrestaShop/pull/5341 I'm glad to contribute
  11. Unit test file for PrestaShop 1.7

    Thanks for your reply, I wanted to test my modifications before committing to github but anyway, I understood the issue that was occurring with my edits and fixed it
  12. Hello, I'm trying to test PrestaShop on my local webserver but I'm missing the file prestashop.unit.test Can someone provide this file for me, I can't find it anywhere Thanks a lot Screens capture
  13. Hello, As a module developer, my biggest issue in the cart is that customizations do not have a price or weight impact They are also grouped together in one product line and not displayed each in one separate product line. Suggestions: - Allow customizations to have a price and weight impact like a combination price/weight impact - Display each customization in a separate line in cart (like this http://prntscr.com/al7eap) The customization information displayed in the previous image don't come with the customization content, I usually store [17] for example and then replace that ID with content from a custom table So there's a lot of complexity like dynamically creating the custom field where to store the ID and then creating a separate product to include the customization costs etc.. I hope you find my suggestion useful and reasonable Best regard
  14. Overriding A Controller

    Hello, Here's a code example: Filename: ProductController.php File path: /modules/[mymodule]/override/controllers/front/ProductController.php To be effective, the methods in this file will be automatically copied by PrestaShop when you install the module Copied file path: [root]/override/controllers/front/ProductController.php (use this path directly if it's not about a module) class ProductController extends ProductControllerCore { // put your override method(s) here //example public function setMedia() { //... } } Make sure to empty PrestaShop cache to make it work, or simply delete the file /config/class_index.php, that's the override caching file.
  15. Hello, I appreciate your feedback on the module To work with ranges/intervals you can use conditions in the formula like so: assuming you have a "width" field, and two unit prices, "unit_price1", "unit_price2", here's the formula: ([width] >= 150 & [width] <= 300) * [unit_price1] + ([width] >= 301 & [width] <= 400) * [unit_price2] A simpler way is to use a calculator file like this: if ($width >= 150 AND $width <=300) { /* price 1 */ $result = 100; } elseif($width >= 301 AND $width <= 400) { /* price 2 */ $result = 120; } As for the cart price, we followed that method to ensure compatibility with the PayPal payment module and other payment modules which require evey cost to have an independant line but we will try to improve it so it makes more sense Thank you