myzuhari Posted September 21, 2009 Share Posted September 21, 2009 I really need and advice on my problems i.e My alerts in my account block directs me to the error 500 page just when I click on it. I dont know what is wrong and desperately looking for the solution here.The problem is with the link : http://www.beli-online.net/modules/mailalerts/myalerts.phpWill somebody please give me the solution since that I desperately looking for the solution to overcome this problem by myself.Thanks in advance. Link to comment Share on other sites More sharing options...
pokemon3d Posted September 22, 2009 Share Posted September 22, 2009 Hello,I had a similar problem and by searching the forum, I have found the solution below :In "myalerts.ph"p :AFTER : include(dirname(__FILE__).’/../../header.php’);INSERT : include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php');Hope it will work for you.Regards Link to comment Share on other sites More sharing options...
myzuhari Posted September 22, 2009 Author Share Posted September 22, 2009 Thank pokemon3d! But after inserting : include(dirname(FILE).’/../../modules/mailalerts/mailalerts.php’); unfortunately my problem still exists. Hopefully I will have another solution from forumers. Link to comment Share on other sites More sharing options...
Marcelo Teixeira Posted September 28, 2009 Share Posted September 28, 2009 The same problem here... even if I disable the module, do the change and enable it again still get the same error... Link to comment Share on other sites More sharing options...
Zenith Posted September 28, 2009 Share Posted September 28, 2009 Change file permission/CHMOD of the “modules/mailalerts/” directory to 0755.I had this same problem and doing this fixed it for me Link to comment Share on other sites More sharing options...
Marcelo Teixeira Posted September 28, 2009 Share Posted September 28, 2009 Nothing changed here. I saw that when I try to uninstall this module it give me an error too:1 - first I click to uninstall and everythings looks fine BUT the option to uninstall still there!2 - when I try to uninstall again I got the follow message: The following module(s) were not installed successfully: * mailalerts But the plugin still have the option to uninstall it on.I already copied again the pack from installation files and got the same problem. Link to comment Share on other sites More sharing options...
anafor Posted October 6, 2009 Share Posted October 6, 2009 pokemon3d, thank you, it works!I think it would be "clearer" to replace include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php'); with include(dirname(__FILE__).'/mailalerts.php'); ;-) Good luck! Link to comment Share on other sites More sharing options...
Melinda Posted October 6, 2009 Share Posted October 6, 2009 I have the same problem and my bug report was cancelled saying it was a server configuration which I cannot find.There are no listings like posted in myalerts.php file.There is a file called mailalerts-ajax_check.php that has the following:include(dirname(FILE).’/../../config/config.inc.php’); include(dirname(FILE).’/../../init.php’); include(dirname(FILE).’/../../modules/mailalerts/mailalerts.php’);Did anyone else put in a bug report about this? Link to comment Share on other sites More sharing options...
anafor Posted October 6, 2009 Share Posted October 6, 2009 Melinda, if I've understood you right, you said that there's no include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php'); line in the myalerts.php. Yes, it's true. The pokemon3d's solution was to add one. I tried to do the same: it works for me. And I didn't even looked into mailalerts-ajax_check.php. Link to comment Share on other sites More sharing options...
Melinda Posted October 6, 2009 Share Posted October 6, 2009 Ok I added it under the header listing at the top and now I don't get an error but where are the alerts to signup for?I checked both the boxes in the personal information link but all I get on the my alerts page is:You are not subscribed to any alerts.Is this correct or am I missing something? Link to comment Share on other sites More sharing options...
geiri Posted October 6, 2009 Share Posted October 6, 2009 Just a thought... Try to translate the module, there is no English translation for it only French http://www.prestashop.com/forums/viewreply/136825/ Link to comment Share on other sites More sharing options...
Melinda Posted October 6, 2009 Share Posted October 6, 2009 ummmm ... don't know. I can configure mine and it reads in english. Link to comment Share on other sites More sharing options...
DrÿSs' Posted October 7, 2009 Share Posted October 7, 2009 Hi,If I had the line you said, I get this error : Fatal error: Cannot redeclare class MailAlerts in D:\BU Open-Source\version_1\trunk\modules\mailalerts\mailalerts.php on line 458 The class is previously defined, that's why it's work fine here.But why you need to declare it ? It's means it's never declared before on your webserver. Link to comment Share on other sites More sharing options...
Zenith Posted October 7, 2009 Share Posted October 7, 2009 It is a server configuration issue, if you have Cpanel, look in the "Error log" link and you will find out why it is not working. Link to comment Share on other sites More sharing options...
Melinda Posted October 7, 2009 Share Posted October 7, 2009 I am lost on this one Phillippe.I am on centos, php 5.2.10 and mysql 5 and this is all I know with the original file.If I set the modules folder to chmod -R 777 then I get the server error when a customer clicks on my alerts in their account which apparently is the wrong permissions.If I set the modules folder to chmod -R 755 I get this error: Fatal error: require_once() [function.require]: Failed opening required ‘/home/stitched/public_html/config/../classes/MailAlerts.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/stitched/public_html/config/config.inc.php on line 15 If I add the line to myalerts.php like this: include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../header.php'); include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php'); Then I get no errors when a customer clicks on "my alerts" in their account.Other than adding this line which is also in mailalerts-ajax_check.php: include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php'); the only other option I have is to comment out the mail alerts in mailalerts -> my-account.tpl to keep from getting the "Fatal error one above.I just commented out the //include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php'); in mailalerts-ajax_check.php and left it in myalerts.php with no adverse effects so maybe that would be an option. Link to comment Share on other sites More sharing options...
Melinda Posted October 7, 2009 Share Posted October 7, 2009 MJ I have checked the error log for the domains that I tested for the error and there is no error so it's very confusing without any errors reported. Link to comment Share on other sites More sharing options...
DrÿSs' Posted October 7, 2009 Share Posted October 7, 2009 I know why.MailAlerts is on the hook myAccountBlock (the block menu with links like My orders, personnal infos, addresses, etc). This is were the file mailalerts.php (with class declaration of MailAlerts) is called first.Then, myalerts.php call MailAlerts a second time. As the file has already been included, no problem.But, if you don't have the call in the hook myAccountBlock, then, error, because the file was never included.I had an include_once() on the page, it should work for the two cases. Link to comment Share on other sites More sharing options...
Melinda Posted October 7, 2009 Share Posted October 7, 2009 Phillippe,The scenario I posted has the my account block already installed along with the my alerts. It is still the same problem whether I click the my alerts in the my account block or click "Your Account" in the header and then click my alerts.The include_once() only works for me if theinclude(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php');is in the myalerts.php file and not in the mailalerts-ajax_check.php file. Link to comment Share on other sites More sharing options...
DrÿSs' Posted October 7, 2009 Share Posted October 7, 2009 Yes, you need to place it in mailalerts.php. Link to comment Share on other sites More sharing options...
Melinda Posted October 7, 2009 Share Posted October 7, 2009 I have the include file in myalerts.php so am I suppose to move it to mailalerts.php instead right under the <?php ?I just tried that and moving it to the mailalerts.php file completely removes the white background I had on the page style.I moved it back to myalerts.php and now the background is white again and it works. Link to comment Share on other sites More sharing options...
Melinda Posted October 7, 2009 Share Posted October 7, 2009 I got the svn version and see what you did. It works too!Thanks Philippe! Link to comment Share on other sites More sharing options...
metta Posted December 5, 2009 Share Posted December 5, 2009 I got the svn version and see what you did. It works too!Thanks Philippe! Hi Melinda,Can you post the whole codes here as I don't get the svn? Thanks. Link to comment Share on other sites More sharing options...
Cyprus Posted January 18, 2010 Share Posted January 18, 2010 Can u please help me ! I have insert the following line in myalerts.php: include(dirname(__FILE__).’/../../modules/mailalerts/mailalerts.php’); BUT NO NEW ALERTS ARE SHOWN WHEN I CLICK ON ‘MY ALERTS’ LINK IN FRONT OFFICE WHAT DO I NEED TO DO ??? Link to comment Share on other sites More sharing options...
Cyprus Posted January 18, 2010 Share Posted January 18, 2010 I have done all the changes u mention above in this thread and still no alerts are shown ! please help me ! Link to comment Share on other sites More sharing options...
Nokall Posted January 29, 2010 Share Posted January 29, 2010 Hello use new code from version 13 and work edit myalerts.php.Using this code .--------------------------------------------------------------------------<?php/* SSL Management */$useSSL = true;include(dirname(__FILE__).'/../../config/config.inc.php');include(dirname(__FILE__).'/../../header.php');include_once(dirname(__FILE__).'/mailalerts.php');$errors = array();if ($cookie->isLogged()){ if (Tools::getValue('action') == 'delete') { $id_customer = intval($cookie->id_customer); if (!$id_product = intval(Tools::getValue('id_product'))) $errors[] = Tools::displayError('You need a product to delete an alert'); $id_product_attribute = intval(Tools::getValue('id_product_attribute')); $customer = new Customer($id_customer); MailAlerts::deleteAlert($id_customer, 0, $id_product, $id_product_attribute); } $smarty->assign('alerts', MailAlerts::getProductsAlerts(intval($cookie->id_customer), intval($cookie->id_lang)));}else $errors[] = Tools::displayError('You need to be logged to manage your alerts'); $smarty->assign('id_customer', intval($cookie->id_customer));$smarty->assign('errors', $errors);$smarty->display(dirname(__FILE__).'/myalerts.tpl');include(dirname(__FILE__).'/../../footer.php'); Link to comment Share on other sites More sharing options...
stig Posted February 2, 2010 Share Posted February 2, 2010 If I add the line to myalerts.php like this:include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../header.php'); include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php'); Then I get no errors when a customer clicks on "my alerts" in their account.Other than adding this line which is also in mailalerts-ajax_check.php: include(dirname(__FILE__).'/../../modules/mailalerts/mailalerts.php'); Melinda, I had the same error and adding the line that you describe here has also fixed the problem for me.Thanks 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