Turn off all pop-ups (notifications)

Hi guys,



How can I turn off all notifications (pop-up messages) in cs-cart? (like “Shipping rates were changed”,"Congratulation!.. ") … It is a bit annoying.

Hello, Maky!



There is an easy way to turn off all notifications.

Please, go to your CS-Cart directory and find this file core/fn.common.php

You should add return true; to the following line

function fn_set_notification($type, $title, $message, $message_state = '', $extra = '')
{


Thus, your code must look like

function fn_set_notification($type, $title, $message, $message_state = '', $extra = '')
{
return true;


Please, note, all notifications will be turned off.



Best regards, Alt-team

Dangerous proposition to turn off all (which would include errors, failed payment processing, etc.).

A less aggressive solution might be to change the 'return true' to 'if( AREA == 'C' && $type == 'N') return true;'. This will allow warning messages and error messages to get through to the customer and still enable all messages in Admin.

Hi guys,



I did as Alt-team suggested and it works fine.

[quote name='tbirnseth' timestamp='1323213202' post='127380']

Dangerous proposition to turn off all (which would include errors, failed payment processing, etc.).

A less aggressive solution might be to change the 'return true' to 'if( AREA == 'C' && $type == 'N') return true;'. This will allow warning messages and error messages to get through to the customer and still enable all messages in Admin.

[/quote]



Tbirnseth, I cant find if( AREA == 'C' && $type == 'N') in fn.common.php I would like to try it as well. Cs-Cart version 2.2.4

What I suggested was modifying alt-team's recommendation to be less aggressive. You would change their


return true;


to be


if( AREA == 'C' && $type == 'N' ) return true;

[quote name='tbirnseth' timestamp='1323293444' post='127468']

What I suggested was modifying alt-team's recommendation to be less aggressive. You would change their


return true;


to be


if( AREA == 'C' && $type == 'N' ) return true;


[/quote]



Thank you Tbirnseth, works fine too.

While we are at it, how do we turn off JUST the add to cart / continue shopping popup?

UNTESTED

But you might try creating a addons/my_changes/controllers/customer/checkout.post.php file

In it you might be able to do


$cart = Registry::get('view')->get_var('cart');
if( $cart ) {
$cart['skip_notification'] = true;
Registry::get('view')->assign('cart', $cart);
}
$_SESSION['cart']['skip_notification'] = true;