DaoKakao Posted December 27, 2017 Share Posted December 27, 2017 I have have a trouble with custom module in the PS 1.7. My module is intended for exporting catalog to particular XML file (yandex market, if someone knows it). So, export works fine, except automatic and cron links. I have SEO URLs torn on, my webserver is nginx. All needed rewrite rules are included in its config. Module has a controller located in /modules/mymodule/controllers/front/generate.php file. This controller's task is nothing but generate a xml file in the PS root dir, so it is very simple: class yamarketgenerateModuleFrontController extends ModuleFrontController { public $display_header = false; public $display_column_left = false; public $display_column_right = false; public $display_footer = false; public $ssl = false; public function postProcess() { parent::postProcess(); $this->module->generate(Tools::getValue('cron')); } } In the BO there is a field with human-readable link for cron which is obtained/generated via getModuleLink() call. It looks like: http://mydomain/module/yamarket/generate Taking in account manuals, this FRIENDLY adrress looks correct and finally should invoke the postProcess() from code above. However, it is nonworking and nginx logs shows the 302 code. If i manually open link like http://example.com/index.php?fc=module&module=yamarket&controller=generate then it works fine. Module's internal function 'generate' also works fine. The question is why human-readable link to module's controller isn't working or why controller does not triggered, and how to fix this? Link to comment Share on other sites More sharing options...
DaoKakao Posted December 28, 2017 Author Share Posted December 28, 2017 Bump Link to comment Share on other sites More sharing options...
Tessie Posted January 8, 2018 Share Posted January 8, 2018 You can try any external cron, which starts processes on the URL(http://example.com/index.php?fc=module&module=yamarket&controller=generate ). example www.easycron.com. Link to comment Share on other sites More sharing options...
Pierre_d Posted January 11, 2018 Share Posted January 11, 2018 Go to your BO > Shop Parameters > SEO and URLs. Add you module at the end of the list. 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