PDI247 Posted October 6, 2015 Share Posted October 6, 2015 (edited) I may just be searching with the wrong keywords, but I can't seem to find anyone wanting to/trying to load modules using JavaScript. Specifically, I'd like to have a module loaded into a third-party site for information purposes. For example, a progress bar displaying how far along the user is in certain ways. And I'd like to do this dynamically, in a way it could automatically update itself on-the-fly on the site. The problem is, I can't seem to figure out how to load modules from normal PHP/JS. When I attempt to use the $.load() on the tpl file, it pretends the file doesn't exist. When I try it on the .php file, it's blank. I'm open to just about any method, as long as it doesn't involve convincing the third-party site to incorporate PS. Is there a way to embed a module without breaking the module down into normal HTML/PHP files? Thanks! Edited October 6, 2015 by PDI247 (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted October 6, 2015 Share Posted October 6, 2015 The only way to access the module is by a Hook, Instantiating the module (and you need a public method) and finally through a controller (in ps 1.5 and newer). Link to comment Share on other sites More sharing options...
PDI247 Posted October 6, 2015 Author Share Posted October 6, 2015 The only way to access the module is by a Hook, Instantiating the module (and you need a public method) and finally through a controller (in ps 1.5 and newer). Does that mean it's impossible to load anywhere other than PS, or do multiple files have to be loaded, or the controller has to be loaded? Assuming latest version (1.6.1.1, I think). Thanks! Link to comment Share on other sites More sharing options...
Rolige Posted October 6, 2015 Share Posted October 6, 2015 All this is not automatically and with a simple click, this needs to be programed. Link to comment Share on other sites More sharing options...
Paul C Posted October 6, 2015 Share Posted October 6, 2015 I'm not sure if you're talking about a module you have written yourself or a built-in one. You can execute module functions within php (it's actually how the custom Prestashop hook smarty function operates to arbitrarily add hook output in a template) but it would seem to me that you would want to create a module front controller for this - but just make sure that it's "content-only" so you don't fetch an entire page. A little more detail on what specifically you're trying to achieve would help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now