Jump to content

Theo13

Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Activity
    Developer

Theo13's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Okay, I understand how to do that. But how do I call the specific function of my module I want when clicking on the submit button?
  2. Hello, I'm creating a module on Prestashop, and I have a really basic question. I have a TPL file, in which I get a JavaScript object when the users clicks on a button. I want to get this Object in PHP to create a new Prestashop article with the informations of this Object. But I know it is wrong to call PHP inside of a TPL file. Is my architecture wrong? Is there some option to call my PHP function with this Object as a parameter when I click on my button? Any help would be really appreciated! Thanks!
  3. This seems like a real basic question, but I'm creating a Prestashop module and the documentation appears to be lacking on these issues. I created a page for the back-office by creating a class inheriting from AdminController (isn't there a way to create a back-office page directly in a module? This would be useful). I only want to achieve something really basic: upload images with a form and displaying these in a list, with options to edit and delete. I've found some pages on the documentation talking about this, but no working example, and I'm getting stuck. If you could show me some example or good explained page I missed, I would be really grateful! Thank you!
  4. Okay, so the error is Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/var/www/prestashop/modules/customproduct/views/templates/front/details.tpl" on line 143 "<img src="modules/customproduct/images/basket/left_plain.png" title="1-Base" data-parameters='{"x": 300, "y": 300, "topped": true, "price": 20}' />" - Unexpected ": ", expected one of: "}" , " " , ATTR' in /var/www/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /var/www/prestashop/tools/smarty/sysplugins/smarty_internal_templateparser.php(3144): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /var/www/prestashop/tools/smarty/sysplugins/smarty_internal_templateparser.php(3209): Smarty_Internal_Templateparser->yy_syntax_error(2, ': ') #2 /var/www/prestashop/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparse in/var/www/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667 So the problem is the data-paremeters on this line. <img src="modules/customproduct/images/basket/left_plain.png" title="1-Base" data-parameters='{"x": 300, "y": 300, "topped": true, "price": 20}' /> But it is essential to make the module work. Do you know if there a way to make this work? Thanks!
  5. Oh, thanks. It could have an influence, but I have a blank page: nothing AT ALL is loaded...
  6. Hello, I'm having trouble to display content on an independent page for my module. When I test simple things, like text, there isn't any problem. But I want to create a Fancy Product Designer module, and to integrate it in this page. I thought it was because of this kind of code : <img src="images/basket/left_plain.png" title="1-Base" data-parameters='{"x": 300, "y": 300, "topped": true, "price": 20}' /> And of the custom tags (data-paremeters) but when I test locally by downloading the page and editing it it seems to work, so I don't know if it is a JavaScript problem...? Because I only get a blank page. If someone could help me, it would be very appreciated, I'm struggling with it. I'm attaching a basic version without all the files that are not from the paid module. customproduct.zip Thank you very much !
×
×
  • Create New...