i have a controller that have with in let’s say thingy/stuff directory
<?php public function index() { /*thingy stuff */ }
public function anotherfunction() {/*other thingy stuff*/} ?>
i see tthe url like index.php?route=thingy/stuff&var=dd
what i want is to call an $.post to this function inside that controller
so it uses another template file thingy.tpl and return html to use
what the URL should like ??
i searched for hours ans it sounds like there is no development documentation for open-cart out there
let’s say you have a controller called “stuff” under the thingy folder and a function called “my function” within that class, that looks like this:
if you want to directly communicate with this function using the URL you can add the function name to the end of the route parameter “route=thingy/stuff/myfunction& …” and load the thingy.tpl inside the function and return it after rendering:
if are using the open cart 1.5 and you want to use jQuery AJAX with JSON then you’ll need to import the JSON library before rendering:
take a look at the checkout page to get some ideas, the default open cart 1.5 template uses the same technique to load the templates for each section.