yoyob40
Forum Replies Created
-
Any news regarding this issue?
Support does exist for this plugin?
I understand. I will manage myself this query. Extracting directly from DB table the information.
ThanksForum: Plugins
In reply to: [RestroPress - Online Food Ordering System] Translation not workingUse LocoTranslate Plugin, is working very well
Forum: Plugins
In reply to: [RestroPress - Online Food Ordering System] Open and close time issuesYou changed/setup the time zone into your wordpress Settings-General?
i’ve Change the jQuery version. This did the job.
Thanks anyway for support
Hello,
PHP 7.4
No cache related pluginsThanks,
ALexBy editing this file -> restropress/includes/admin/payments/payments-history.php
Starting with line 44, exactly after line <?php $payments_table->advanced_filters(); ?>
I was added these line of code in order to receive message notif and audio notif when new order arrived.<script> jQuery(document).ready(function () { var interval = setInterval(function () { if (jQuery(".rpress_notify_audio").length) { clearInterval(interval); jQuery( "<div id='alert'>YOU HAVE A NEW ORDER!</br></br></br><button class='button modal button2'>SHOW ME</button></div>" ).insertAfter( ".top" ); } }, 2000); jQuery(function() { jQuery(".button2").click(function() { location.reload(true); }) }) }); jQuery(function ($) { if (rpress_vars.is_admin == 1 && rpress_vars.enable_order_notification == 1) { if (typeof Notification !== "undefined") { Notification.requestPermission() .then(function (result) { if (result === 'denied') { console.log('Permission wasn\'t granted. Allow a retry.'); return; } if (result === 'default') { console.log('The permission request was dismissed.'); return; } setInterval(function () { $.ajax({ type: 'POST', data: { action: 'rpress_check_new_orders' }, url: ajaxurl, success: function (response) { if (response != '0') { if (typeof response.title === "undefined") return; var notifyTitle = response.title; var options = { body: response.body, icon: response.icon, sound: response.sound, }; var n = new Notification(notifyTitle, options); n.custom_options = { url: response.url, } n.onclick = function (event) { event.preventDefault(); // prevent the browser from focusing the Notification's tab window.open(n.custom_options.url, '_blank'); }; //add audio notify because, this property is not currently supported in any browser. if (response.sound != '') { var loopsound = '1' == rpress_vars.loopsound ? 'loop' : ''; $("<audio controls " + loopsound + " class='rpress_notify_audio'></audio>") .attr({ 'src': response.sound, }) .appendTo("body"); $('.rpress_notify_audio') .trigger("play"); } //set time to notify is show var time_notify = parseInt(rpress_vars.notification_duration); if (time_notify > 0) { time_notify = time_notify * 1000; setTimeout(n.close.bind(n), time_notify); } n.onclose = function (event) { event.preventDefault(); $('.rpress_notify_audio') .remove(); }; } }, complete: function () { } }); }, 5000); }); } } }); </script> <?php $payments_table->display() ?> </form> <?php do_action( 'rpress_payments_page_bottom' ); ?> </div> <style> #alert { padding: 50px; text-align: center; background-color: #F0FFF0; color: #ffffff; font-size: 30px; -webkit-animation: NAME-YOUR-ANIMATION 1s infinite; /* Safari 4+ */ -moz-animation: NAME-YOUR-ANIMATION 1s infinite; /* Fx 5+ */ -o-animation: NAME-YOUR-ANIMATION 1s infinite; /* Opera 12+ */ animation: NAME-YOUR-ANIMATION 1s infinite; /* IE 10+, Fx 29+ */ } #close { float:right; display:inline-block; padding:2px 5px; background:transparent; margin-top: -45px; margin-right: -40px; cursor: pointer; } @-webkit-keyframes NAME-YOUR-ANIMATION { 0%, 49% { background-color: #FA8072; color: #F0FFF0; } 50%, 100% { background-color: #F0FFF0; color: #FA8072; } } .button2 { background-color: #008CBA !important; color: #ffffff !important; width: 100px; } </style>
The final solution is to write my own function for this since this default one is defectuos. I will give the solution asap
Already did this. I forgot to mention.
I allow the notif mess and sound. No luck. Message doesn’t appear