Jump to content

mzfp

Members
  • Posts

    24
  • Joined

  • Last visited

1 Follower

Profile Information

  • Activity
    Developer

Recent Profile Visitors

6,507,376 profile views

mzfp's Achievements

  1. Hi i wonder if it's possible to have multiple translations of a modules front controller url? for example: /module/mymodule/mycontroller /module/mymodule/micontroladora and of course they should both route to the same controller. I couldn't find anything on the topic over at Prestashop dev docs therefore hoping someone here can answer.
  2. @Gionatan Could you post your solution here for our future reference?
  3. This doesn't seem to work. I am attempting to override: src/Adapter/PDF/PDFGenerator.php I created the following file in my module: modules/mymodule/src/Adapter/PDF/PDFGenerator.php and in module services.yml: prestashop.adapter.pdf.pdf_generator: class: PrestaShop\Module\MyModule\Adapter\PDF\PDFGenerator arguments: - '@=service("prestashop.adapter.legacy.context").getContext().smarty' - '@=service("templateTypeProvider")' and the contents of the override file (modules/mymodule/src/Adapter/PDF/PDFGenerator.php) namespace PrestaShop\Module\MyModule\Adapter\PDF; use PrestaShop\PrestaShop\Adapter\Entity\PDF; use PrestaShop\PrestaShop\Core\PDF\PDFGeneratorInterface; use PrestaShop\PrestaShop\Core\PDF\PDFTemplateTypeProviderInterface; use Smarty; /** * Class PDFManager responsible for PDF generation using legacy code. */ final class PDFGenerator implements PDFGeneratorInterface { public function generatePDF(array $objectCollection) { print "override"; die; } } and of course composer.json contains the path to /src Any ideas what's going wrong?
  4. I've followed this documentation, but I get the following error when running npm run build: ERROR in C:/websites/www8/admin-dev/themes/new-theme/js/components/modal/iframe-modal.ts Module not found: Error: Can't resolve 'resize-observer-polyfill' in 'C:\websites\www8\admin-dev\themes\new-theme\js\components\modal' ERROR in C:/websites/www8/admin-dev/themes/new-theme/js/components/grid/extension/position-extension.ts Module not found: Error: Can't resolve 'tablednd/dist/jquery.tablednd.min' in 'C:\websites\www8\admin-dev\themes\new-theme\js\components\grid\extension' ERROR in chunk grid [entry] grid.bundle.js C:\websites\www8\modules\lscartoffers\views\js\grid\index.js 17f5a5c3b8203601754cb0a169196040 Unexpected token (222:38) | if (iframeContainer) { | this.cleanResizeObserver(); | this.resizeObserver = new !(function webpackMissingModule() { var e = new Error("Cannot find module 'resize-observer-polyfill'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())(function () { | _this.autoResize(); | }); ERROR in C:\websites\www8\admin-dev\themes\new-theme\tsconfig.json [tsl] ERROR TS2688: Cannot find type definition file for 'vue'. The file is in the program because: Entry point for implicit type library 'vue' ERROR in C:\websites\www8\admin-dev\themes\new-theme\js\components\auto-complete-search.ts [tsl] ERROR in C:\websites\www8\admin-dev\themes\new-theme\js\components\auto-complete-search.ts(37,49) TS2503: Cannot find namespace 'Twitter'. as well as other similar errors. Quite stuck on this, seems like quit an uphill struggle to get a simple grid to display and work in a prestashop 8 module.
  5. When Prestashop Checkout is active, it renders new Payment Options for PayPal in the payment options list during checkout. This is fine, however, it also sets it as the default Payment Option. How can we prevent this from happening?
  6. Thanks. Am I correct in my understanding that the not operator (!) ensures that the template is extended from the base template (and another version extended from another module) ? I read through both links but could not really find a clear explanation of why the ! operator needs to be used. I'm curious about this
  7. Hi I'm experimenting with overriding and extending twig templates from a custom Prestashop module. Custom file: modules/my_module/views/PrestaShop/Admin/Sell/Customer/view.html.twig In the file above if I place: {% extends '@PrestaShop/Admin/Sell/Customer/view.html.twig' %} It crashes the back office - no error - simply runs out of memory. However, if use the following approach it works: {% extends '@!PrestaShop/Admin/Sell/Customer/view.html.twig' %} note that I added the ! operator just before Prestashop. What is the difference and why does one work and not the other?
  8. Hi I was reading the following post today on DevBlog: https://addons.prestashop.com/en/seller-blog.php?article=1104 After reading it I posted the following comment: "In this case, it seems quite important to implement measures to prevent merchants from being able to continue using the module if they opt for a refund." However, it seems the PsDevAddons team finds this comment inappropriate for some reason and removed it twice. I felt it was a genuine concern and worth considering but not in the slightest controversial or even a combative response to the article. I'd appreciate your thoughts on this as I was generally surprised to be silenced for such a trivial expression!
  9. I'm currently developing a custom module for Prestashop and because Prestashop 1.7 is now based on Symfony I am investing some extra time in using the Symfony platform as much as possible rather than using plain old php or Prestashop libraries. Prestashop now provides a way to obtain a container to Symfony services which can be used anywhere in a module. I am attempting to use this access the Symfony\Component\HttpFoundation\Request services but without luck. Below is what I have tried so far: $request = $this->container->get('symfony.component.httpfoundation.request'); and also $request = $this->container->get('request'); but both result in the error: You have requested a non-existent service Is it possible to use Request service via the container? Kind Regards Musaffar
  10. I wonder if anyone has experiencing installing Prestashop 1.7 dev version on Windows 10? I cloned the developer vbersion of Prestashop from the official git repo and initiated the install. The install asks me to "Error : please install composer. Then run "php composer.phar install"" so I did and get the following error when I do: ``` Problem 1 - composer/installers is locked to version v1.7.0 and an update of this package was not requested. - composer/installers v1.7.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint. Use the option --with-all-dependencies to allow updates and removals for packages currently locked to specific versions. You are using a snapshot build of Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report an issue to them to ask them to support Composer 2. To work around this you can run Composer with --ignore-platform-reqs, but this will also ignore your PHP version and may result in bigger problems down the line. ``` I am running the latest version of composer on Windows 10 and I am at a complete loss on how to proceed any further therefore any help would be appreciated.
  11. Hi I wondered if anyone had ran into the issue below and could provide me tips for solving it. I need to make a change to the Stock management page in the back office, which has been migrated to Symfony and uses modules such as webpack and vue.js. Therefore I did the following: Downloaded the developer version of the admin folder (admin-dev) from https://github.com/PrestaShop/PrestaShop Installed all necessary modules into the /admin/themes/new-theme/ using the command npm install. All works well so far, I made the necessary changes to the stock page and ran npm build to make the changes live. All good so far and the changes were visible in the back office stock management page. However, I then switched to the Catalog > Products > Edit Products and notice a bunch of errors which breaks the functionality of this page. The above was done on Prestashop 1.7.6.1 Errors are attached. Why is the build producing problems? Have I missed something? Any help would be appreciated. Kind Regards Musaffar
  12. Hi I've just installed two instances of Prestashop on my local server from the same downloaded zip. However on one install, the module "selection" tab is missing, preventing me from installing modules placed into the module folder. I've tried clearing the cache folder to no avail. Would appreciate any insight into the matter. Kind Regards Musaffar
  13. Hi Sorry to hear you guys have ran into issue using the module with the CIC Payment module. The latest version of the module (1.2.2) does contain a fix for this. Alternatively feel free to get directly in touch with me your details if you would rather I apply the fix on your behalf. Kind Regards Musaffar
  14. I though I would add my experience here. We're receiving about 30-40 orders a week, and occasionally an order is received which contains the wrong invoice and delivery address (the address of another customer) PS 1.6.0.14 Quite a severe bug
  15. The following worked for me: Added a new record to ps_meta_lang table in the database (using the id_meta for products obtained from the ps_meta table) So for me, it was missing corresponding records in ps_meta_lang. Not the nest fix but far better than modifying all left column hooks in my opinion.
×
×
  • Create New...