Not only the cart, notifications don't show up unless you leave or refresh the page you are on. Is that just the way it is or is there some kind of cron job or javascript that checks and/or updates as needed?
Not only the cart, notifications don't show up unless you leave or refresh the page you are on. Is that just the way it is or is there some kind of cron job or javascript that checks and/or updates as needed? |
that's the way it is.. ManOfTeal.COM a Proud UNA site, six years running strong! |
Hmmm. Someone should javascript that. Speaking of which - when I do a location.href='specificsitepageurl' in javascript, it loads the page but I guess that page is still cached. Is there a javascript load function that forces the target page to do a real load so any changes on the page are visible? I've tried .assign with no luck. |
So what does the bxdolmembermenu file do? Located in inc/classes. Surely there is something that will check for new messages or notifications and update the page without having to completely reload the page? What's this class do:
class BxDolMemberMenu { // contain all registered menu's bubbles; var $sBubbles = null;
// contain current menu possition (allowed values : top, bottom, fixed) var $sMemberMenuPosition = null;
var $iBubblesUpdateTime = 30000; // in milliseconds;
var $iNotifyDestroyTime = 3000; // in milliseconds;
// page that will procces all ajax queries from member menu ; var $sQueryPageReciver = 'member_menu_queries.php';
var $sBubblePrefix = 'bubble_'; var $oCacheObject; var $iKeysFileTTL = 600; //cache life time var $sMenuCacheFile = 'sys_menu_member'; var $sMenuMemberKeysCache = 'mm_sys_menu_member_keys_'; |
its odd, cause when you get a new mail, it instantly shows the red bubble with a 1 (or however new mails you have). I would think that all bubbles would react the same and instantly update. caredesign.net |
Good luck getting someone to help with the code. I asked for someone to walk me through the rather complex BxPhotoSearch or something like that, search function for photos so I could learn how to do my own searches and display them but no one answered. Geeks, making the world a better place |
LOL. Andrew P has been kind enough to answer at times. He's good. Have faith Geek Girl. It's also an opportunity for another 'good' at coding to establish or reaffirm his or her reputation as such. |
its odd, cause when you get a new mail, it instantly shows the red bubble with a 1 (or however new mails you have). I would think that all bubbles would react the same and instantly update. https://www.deanbassett.com |
So, let's say I have a more powerful server. How would I go about replicating the way the mail is updated for at least the cart. I mean it displays incorrect until the page is reloaded. That's not logical. Or it doesn't seem it to me. |
Well that i can't tell you. I have never looked into it. https://www.deanbassett.com |
No worries deano. Respect. I know you are 'good'. |
just a thought to throw out there, as there have been issues i needed to display instantly and my javascript knowledge is pretty much non-eexistant. What if there is a way to reload the page after an item is added to the cart, this would efffectively bring up the bubble correctly? Its a thought but i do not know how practical it would be or if possible as I do not have a store installed on my sites. will add to a test site and see what I can come up with - unless deanos or someone else beats me to it. caredesign.net |
Ya, I played with trying to do that this afternoon but I just couldn't get it to work. I even tried ajaxing through a temp page with a php header relocate but it just wouldn't change the number unless I refreshed. Crazy. I'm a pseudo novice programmer though just trying to teach myself a little php and maybe javascript. In other words, any programmers know the syntax to force a page refresh after the cart data is posted? |
I was assuming that this was deliberate by boonex, But it appears it is not. https://www.deanbassett.com |
Well certainly don't risk your life for an answer but should you stumble across pertinent info about this topic, please share. |
I suppose that it maybe just too long update time. By default it is 30 seconds - so bubbles in main menu (including shopping cart) updates every 30 seconds. You can try to change this value in inc/classes/BxDolMemberMenu.php file: var $iBubblesUpdateTime = 30000; // in milliseconds; Rules → http://www.boonex.com/terms |
I suppose that it maybe just too long update time. By default it is 30 seconds - so bubbles in main menu (including shopping cart) updates every 30 seconds. You can try to change this value in inc/classes/BxDolMemberMenu.php file: var $iBubblesUpdateTime = 30000; // in milliseconds; https://www.deanbassett.com |
Hi Alex, thanks for joining in. Ya, I tried dropping that all the way down to 5k and it just won't update the count. I've let it set for a few minutes even. Is that membermenu class file where I need to focus my attention? A click on the cart icon correctly itemizes the purchases and displays the correct total count at the top of the list, but the red bubble count display is incorrect until the page refreshes or another page is loaded. It 'feels' like a cache thing and I even tried to put no-cache metas in the headers just to test but it made no difference. I'm now thinking that somewhere there is a piece of javascript that updates that particular bubble element on an event and maybe the field name is wrong or something but I can't find that piece of code anywhere. Ideas? |
LOL. https://www.deanbassett.com |
I hear ya deano. I bet I put in 8hrs either trying to figure out how it works or finding a hack way to make it work and I thought I had it but I'm gonna say no. So if anyone else out there has noticed that when someone buys something via the cart and the user's red alert bubble for their cart is displaying the WRONG quantity amount, let us know here. Better, if you fixed it - share you magical fix. :) Thanks everyone. |
Rules → http://www.boonex.com/terms |
Just wondering if this ticket item is getting close to being solved. |
FYI, I made a code tweak to the BxPmtModule.php file that will make the shopping cart bubble go away that displays even when the cart is empty. The issue is that unlike the other member menu item bubbles, the shopping cart bubble stays or goes away based on a page refresh. Using header Location to send the user back to the cart does not reload a fresh page for some reason? Odd. So this is a bit of a hack admittedly, but I changed this: header('Location: ' . $this->_oConfig->getReturnUrl()); to this: header('Refresh:0; url=' .$this->_oConfig->getReturnUrl()); For me, I'd rather add a second to the page load than have a page displaying something is in the cart when really it is empty. A 'ghost' shopping cart button is confusing to a user methinks. If someone knows of a way to force refresh a page using header location (I thought it did actually), let me know. I messed around with cache stuff to see if that was it but no luck. Also, I changed the redirect URL in BxPmtConfig.php from: $this->getBaseUri() . 'cart/'; to: $this->getBaseUri() . 'history/'; which is only a preference for me. It seems more logical to send the customer back to view what he/she just paid for than more often than not, a page showing the cart is empty. |