Jump to content

abriggs

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • First Name
    Antony
  • Last Name
    Briggs

abriggs's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Aha! For anyone else with this problem, I've been poking in the prestashop files and found they've defined a Modules path in Twig. So you can do return $this->get('twig')->render('@Modules/foo/views/assets-customers.twig',[ .... ]); and then put your twig file in modules/foo/views/
  2. Hi All, In previous version of PS, I could render a smarty template from a hook like: $this->context->smarty->assign(array( ... )); return $this->display(__FILE__, 'assets-customers.tpl'); and the view file would be placed in modules\foo\views\templates\hook\assets-customers.tpl The page https://devdocs.prestashop.com/1.7/modules/concepts/hooks/use-hooks-on-modern-pages/ tells us the new styntax for rendering a twig template: return $this->get('twig')->render('assets-customers.twig',[ ... ]); But it doesn't give any clues as to where the template file should live? I've tried it in modules\foo\, modules\foo\views\ & modules\foo\views\templates\hook\ but I awlays get Template "assets-customers.twig" is not defined. Can anyone share a working example of using a Twig template from a hook in a module pls? (Not overriding a built-in template) Thanks!
  3. Deliberate cross post with thread #568375! There's a few threads on this topic, yet no answers. A little help please, prestashop?
  4. There's a few threads on this topic, yet no answers. A little help please, prestashop?
  5. Hey Guys, Just adding to this old post as it comes up when searching for the pack_stock_type error. The issue will be due to your database not being on the same version as the php code in your shop. This could happen due to a failed upgrade or in my case, installing of the TM templates and selecting the option to install the sample data. This runs a phpmyadmin backup script which effectively overwrites your database. The solution is to check the version your database is on with the following command: SELECT value from ps_configuration WHERE name = 'PS_VERSION_DB' in my case this was 1.6.0.11 and I knew my cart should be version 1.6.0.14. The next step is to grab the zip file for the version of you cart you're running and look in the install-dev\upgrade\sql folder. You'll find upgrade scripts in there for migrating between versions. It appears there's been no db changes for .13 & .14 so I just needed to run the 1.6.0.12.sql script. Hope that helps.
×
×
  • Create New...