Post by hasnain@spawoz.com » Wed May 29, 2019 2:41 pm

Hi am trying to connect a form action in my twig to my controller function . am really new to opencart .
"$data['action'] = $this->url->link('extension/module/vistor', 'token=' . $this->session->data['user_token'], true)" this is the linking code i have used. it shows permission denied on my screen Pls check the attachment.

Thanks

Attachments

Screenshot_2019-05-29 Permission Denied .png

Screenshot_2019-05-29 Permission Denied .png (19.93 KiB) Viewed 175 times



Posts

Joined
Sat May 25, 2019 8:04 pm

Post by D3MO » Wed May 29, 2019 3:24 pm

First of all
$data['action'] = $this->url->link('extension/module/vistor', 'token=' . $this->session->data['user_token'], true)
in 3.x you have to pass user_token = not token

$data['action'] = $this->url->link('extension/module/vistor', 'user_token=' . $this->session->data['tuser_oken'], true); //BUT I BELIEVE IT HAS TO BE VISITOR not vistor that may be the issue that it leads to permission denied as this method/function/file simply do not exist


hasnain@spawoz.com wrote:
Wed May 29, 2019 2:41 pm
Hi am trying to connect a form action in my twig to my controller function . am really new to opencart .
"$data['action'] = $this->url->link('extension/module/vistor', 'token=' . $this->session->data['user_token'], true)" this is the linking code i have used. it shows permission denied on my screen Pls check the attachment.

Thanks

Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by straightlight » Wed May 29, 2019 7:02 pm

Code: Select all

user_token=' . $this->session->data['tuser_oken'], true
for:

Code: Select all

user_token=' . $this->session->data['user_token'], true

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by D3MO » Wed May 29, 2019 7:43 pm

was typo:))
straightlight wrote:
Wed May 29, 2019 7:02 pm

Code: Select all

user_token=' . $this->session->data['tuser_oken'], true
for:

Code: Select all

user_token=' . $this->session->data['user_token'], true

Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am
Who is online

Users browsing this forum: No registered users and 2 guests