MEG Venture Posted September 10, 2017 Share Posted September 10, 2017 (edited) Hi I have several custom php files in my module's root. In order to clear the html from these files, I want to assign smarty variables and display the content in template files. However, I am having the below error and can't assign smarty. Could you please guide me? Fatal error: Cannot access protected property MyModule::$context in C:\wamp64\www\16113\modules\mymodule\ajax.php on line 323 My code in ajax.php: $num_rows = count($all_product_cnt); $context = Context::getContext(); $mymodule->context->smarty->assign( array( 'deneme' => '90', ) ); Edited September 10, 2017 by MEG Venture (see edit history) 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