Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ajax parameter for ajax call #504

Merged
merged 23 commits into from Jul 9, 2020
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/content/1.7/modules/concepts/controllers/front-controllers.md
Expand Up @@ -137,6 +137,17 @@ Context::getContext()->link->getModuleLink('cheque', 'validation', array('idPaym
* Without URL rewriting: `http://<shop_domain>/index.php?idPayment=1337&fc=module&module=cheque&controller=validation&id_lang=1`
* With URL rewriting: `http://<shop_domain>/en/module/cheque/validation?idPayment=1337`

### Ajax request

When you call controller via AJAX, you nedd to add `ajax` parameter in the url.

```php
Context::getContext()->link->getModuleLink('cheque', 'validation', array('idPayment' => 1337, 'ajax'=>true);
luigimassa marked this conversation as resolved.
Show resolved Hide resolved
```

* Without URL rewriting: `http://<shop_domain>/index.php?idPayment=1337&fc=module&module=cheque&controller=validation&id_lang=1&ajax=true`
* With URL rewriting: `http://<shop_domain>/en/module/cheque/validation?idPayment=1337&ajax=true`

## Restricting access

### Logged customers only
Expand Down