Marketpress store sub-menu: Where does it come from?

I have marketpress installed and upon setup it created the store page along with a sub-menu containing three items:

Products,
shopping-cart &
order status

I can remove the dropdown from the menu by removing the 'store' item and then adding the store 'page' back in... This removal and reinsertion breaks the connection to any sub-menu, so removing the dropdown from the resulting store item in the main menu

To then add any needed bits of the sub-menu back in I would have to create them as 'custom' links under the 'store' item since they do not appear to exist anywhere in any manageable form (pages, posts etc...).

So, where do the above 'sub-pages' come from and why do neither they nor the sub-menu appear anywhere within admin... I've checked store settings, theme menus, pages, posts, and there is no option to 'bulk' show/hide the store sub-menu either. They appear effectively to be invisible.

Mysterious!

Cheers

Rob

  • WebspaceWorks

    Hi Phil,

    Thanks for confirming my suspicions.

    So, the pages are created, but can't be managed. They are visible to the wp_nav_menu template function, but they are invisible to the menu management area of the admin interface.

    I can work around that, but intuitive it isn't. By rights the sub-pages really should be visible within the menu builder as sub-pages off the main 'store' page.

    If I remove that from the main menu and then add the main store page back then it doesn't restore the sub-menu that was there originally... that's completely inconsistent.

    In order to get the sub-menu back it has to be manually (and visibly) re-built by adding the requisite custom links as sub-pages off the re-inserted store page.

    I can work with things as they are, my comments are simply to add some clarity to what might be confusing for others, as they were initially for me.

    Cheers

    Rob

  • Gary

    I'm pretty sure I removed a Store page, re-added, and the sub-pages linked up fine.

    However... if the original Store page is in trash, with a slug of"store" the new Store page probably has a slug like "store-2"

    The Marketpress Store Settings -> Presentation tab includes an area where you specify the slug of the top-level store page, and choose the slugs used for the sub-menu pages.

    So either change that to match the new store page slug - or fully remove the original store page and rename your new page.

    As I understand things - those sub pages aren't created at all. They don't exist within the pages structure as hidden items or otherwise. The logic for those items is simply hooked to certain urls at runtime.

    In fact, within the Store Settings area, only the Store Base has an indication that contents can be changed:

    This page will be created so you can change it's content and the order in which it appears in navigation menus if your theme supports it.

    Think of the sub-pages as "virtual pages" and it might make more sense?

    cheers

  • WebspaceWorks

    Hi,

    Just to be clear.

    By 'removing' the store page, I mean removing it from the menu, not moving the page itself to trash, or actually deleting it.

    After install there is an auto-created page, that also auto adds a link into the main menu. Below that item is a sub-menu that is also created by default to the menu on the site, but which is not present within the main menu under the menu builder area in admin... That's confusing enough, but it gets worse.

    If I remove the store page from the main menu in the menu builder and then simply add it back in by selecting the store page in the pages list and clicking 'add to menu' I can make the main menu appear exactly as it was previously in the menu builder, but the sub-menu will now not be present in the operational website.

    Because the 'shopping cart' and 'order status' pages don't actually exist there is now no way to add them into a sub-menu other than to create custom links and add those as a sub-menu.

    I'm just pointing out this inconsistency... If I take something away, and then add it back with the standard admin tools available then I should end up with what I started with. In this case I don't... the auto-added sub-menu is not reinstated when it's parent is added back to the main menu.

    For me that is actually good because I don't want the sub-menu, but it is undeniably inconsistent, confusing and, in case of accidental removal, unrecoverable.

    Cheers

    Rob

  • WebspaceWorks

    Apology due...

    Removing and then adding back the store does reinstate the sub-menu (a stylesheet error was hiding it)... meaning that menu editing here is consistent, and the sub-menu is recoverable.

    However, now the question becomes one of 'How do I remove the sub-menu' if I don't want it? As in really remove it, not just hide it from view?

    Shouldn't there be an option to generate this sub-menu somewhere in settings? And of choosing the pages, virtual or otherwise, that get placed into it?

    Cheers

    Rob

  • benklocek

    Hi All,

    @solar2adventure your question should be asked in another thread, but the short answer is look in wp-content/plugins/marketpress/marketpress-includes/themes/Themeing_MarketPress.txt it explains how to create new templates for certain pages.

    RE Menu: Yes, this is very confusing. I think the best hack at this point, is to create the menu items you want using custom menu items. The slugs can be found near the bottom here: http://yoursite/wp-admin/edit.php?post_type=product&page=marketpress&tab=presentation

    The one thing you do lose is the "active" class on the menu items.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.