|

Add-On Controller Not Displaying View
Posted 01 November 2013 - 04:51 PM #1
I have followed http://docs.cs-cart....ocs-controllers and feel I have a good understanding of Controller->View function in CSCart, but I just can't get this particular scenario to work for me.
I'm trying to setup an admin page that will allow the user to perform tasks. I have folders/files setup correctly and I have verified that my controller is being called and my 'manage' mode is being executed, but still no view. I just get a 404 Page not Found.
Attempting to access page at:
/store_admin.php?dispatch=test_controller.manage
My view is located in:
/admin/addons/test_addon/views/test_controller/manage.tpl
Any ideas? Is there some place where the view needs to be registered? Do I have to manually display the view from the controller (CSCart docs says it should be called by convention)?
Posted 24 June 2015 - 08:02 PM #2
So you would need a controller/backend/test_controller.php
I'm a noob at this so sorry if I am wrong.
Posted 25 June 2015 - 01:57 AM #3
design/backend/templates/addons/test_controller/views/test_controller/manage.tpl
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 25 June 2015 - 08:48 AM #4
For creating new controller we recomend to use addon functionallity. So please create the following files with code:
1. app/addons/my_changes/controllers/backend/test_controller.php
<?php if (!defined('BOOTSTRAP')) { die('Access denied'); } if ($mode == 'manage') { // some code... }
2. design/backend/templates/addons/my_changes/views/test_controller/manage.tpl
{* Some code *}
3. Then install "My changes" addon and clear cache

Best regards,
WSA team
Posted 25 June 2015 - 09:04 AM #5

CS-Cart USD 345 Multi-Vendor USD 1250 Multi-Vendor PLUS USD 3100 (2775)
CS-Cart Ultimate USD 775 CS-Cart + YOUPI USD 545 Multi-Vendor Ultimate USD 7500 (6000)
Posted 25 June 2015 - 06:54 PM #6
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.