Jump to content


Replying to Exchange Store Menu Item Disappears After Purchase


Post Options

  or Cancel


Topic Summary

spencer

Posted 05 October 2014 - 12:41 PM

tl;dr Store Page's navigational label is disappearing because Customer Log Out is disabled

I think I might have found the cause of this issue. I had the same problem on my site and found this topic in hopes of a solution. Seeing no current solution I decided to try to debug it myself. The first thing I did was disable all the plugins except for Exchange as others had tried above. The issue remained. The first clue I noted was that the Navigational Label for the Store Page would appear if the user wasn't logged in. I assumed that Exchange must be filtering the output of the menus and somehow causing the Navigational Label for the Store Page to disappear. Searching through all the filters that Exchange set, I found:
add_filter( 'wp_setup_nav_menu_item', array( $this, 'setup_menu_item' ), 10, 2 );
and
add_filter( 'wp_get_nav_menu_items', 'it_exchange_wp_get_nav_menu_items_filter', 10, 3 );

The second filter was of particular interest as it uses:
if ( is_user_logged_in() ) {
foreach ( $items as $item ) {
//We really just want to compare the URL PATH, so grab that and compare later
if ( '' == get_option( 'permalink_structure' ) ) {
// No permalinks
$item_url_path = parse_url( $item->url, PHP_URL_QUERY );
$login_url_path = parse_url( it_exchange_get_page_url( 'login' ), PHP_URL_QUERY );
$logout_url_path = parse_url( it_exchange_get_page_url( 'logout' ), PHP_URL_QUERY );
} else {
// Permalinks
$item_url_path = parse_url( $item->url, PHP_URL_PATH );
$login_url_path = parse_url( it_exchange_get_page_url( 'login' ), PHP_URL_PATH );
$logout_url_path = parse_url( it_exchange_get_page_url( 'logout' ), PHP_URL_PATH );
}
if ( $item_url_path == $login_url_path || $item_url_path == $logout_url_path ) {
$item->url = it_exchange_get_page_url( 'logout' );
$item->title = it_exchange_get_page_name( 'logout' );
}
}
}

Commenting out the entire if statement resolved the issue.

Now that I had found the section of code causing the issue, I realized exactly what the issue was. I had disabled the Customer Log Out page which was causing the final if in the foreach loop to return true because it evaluated:
$item_url_path == $logout_url_path
to
'/store/' == '/store/'
since there was no Customer Log Out url set. This causes the Store Page's title to be set to the no existent Customer Log Out page's name. Therefore, no Navigational Label will appear on the Store Page, but only for logged in users. The fix should include some type of check to see if:
'disabled' !== it_exchange_get_page_type( 'logout' )

acri

Posted 18 August 2014 - 06:46 PM

No i had no resolution to this issue. Wish there was it really bugs me.

Posted 30 July 2014 - 04:29 PM

I am also having this problem where the link identified as the "store page" disappears after a user logs in. The link is still there but the text is missing. Was there any resolution to this?

acri

Posted 24 March 2014 - 12:35 PM

I went back through ALL the plugins on the live site and deactivated everything i could from the network admin. Then, deactivated all the plugins on the site in question
Upon reactivating the plugins one at a time, (Exchange only) the store menu item issue still existed (not appearing after a purchase is made)
I can give you a copy of the multisite for you to install and test on at your leisure but we cannot get the store menu-item to resolve no matter what.
We also noticed that even on our test development site is is not completely resolved. (It shows up at the top but not in a sidebar menu.)

Elise Alley

Posted 18 March 2014 - 04:31 PM

Hey acri,

When testing for a plugin conflict, we typically recommend you reactivate the other plugins one at a time instead of all at once.  So, unfortunately, in this case, we now know that there is a plugin creating the issue, we just don't know which one.  

Regrettably, there isn't a lot I can do.  It's something specific going on with your site.  Is there a time of low traffic on your site that you could do this?  For instance some time over night?  If it only took turning all your plugins off and back on again for it to work properly, it shouldn't take you more than about 5 minutes to accomplish.  You can use something like Google Analytics (if you're not already) to see when the best time to do this would be.

Without out knowing specifically which plugin needs to be deactivated and reactivated, that's the best suggestion I can offer.  That or seeing if you can duplicate it again on your test site, this time reactivating your plugins individually.

I wish I could be of more help.  Let us know if you have any additional questions.

Thanks,

Elise

acri

Posted 17 March 2014 - 07:28 PM

I network de-activated every plugin including exchange and turned them all back on in the network - all at once using the tick boxes.  Now the "store" menu item is appearing. Unfortunately I do not have the luxury of doing this process in the "live" site.

acri

Posted 17 March 2014 - 06:49 PM

Everything is up to date - only active plugin is exchange, blog vault  and sucuri.  I did disable those 3 with no effect on the missing store menu.

wildambitions

Posted 17 March 2014 - 10:55 AM

View Postacri, on 15 March 2014 - 09:47 PM, said:

I migrated the entire live site to a dev site to test.  I disabled all of the plugins one by one.  The "disappearing store" issue still exists. Builder is using the most current version. Any ideas?
So the only active plugin is the exchange plugin?

Also, even though the others are disabled, are they all up to date? And WP is also up to date?

acri

Posted 15 March 2014 - 09:47 PM

Hi Elise,
I migrated the entire live site to a dev site to test.  I disabled all of the plugins one by one.  The "disappearing store" issue still exists. Builder is using the most current version. Any ideas?

acri

Posted 04 March 2014 - 10:07 AM

Hi Elise any luck yet?

Review the complete topic (launches new window)