Global Products Problem in Marketpress

Hello,
In regards to this post -->

https://premium.wpmudev.org/forums/topic/global-product-categories-solved-a-tutorial

I have tried to find an answer in the forums, but I haven't gotten any feed back. Mine are the last three responses, which will tell you what I am having problems with.

Please help as I don't know where else to find my answers.

Thanks

  • aecnu

    Greetings MoeJoe,

    Please post your current issues here and I understand why you have not gotten a reply in that other ticket, it is so old that two of the support staff in that ticket and the only support staff in that ticket are no longer with WPMU Dev.

    Please feel free to coy and paste your issues from the other ticket here so that we have a possibility of getting it sorted out.

    Thank you for understanding and looking forward to helping in any way that we can.

    Please advise.

    Cheers, Joe

  • MoeJoe

    aecnu,
    It is soooo goood to hear from you. This issue I am having really has me at a stand still. I don't want to move forward on my projects until I can this resolved. I will paste the information below.

    _________________________________________________________________

    Hi all,
    I really need some help and clarification for anyone who is willing to help.

    I uploaded the two files style-wp-admin.php and wp-admin.css to my mu-plugins folder, but when I created a new store the "+Add New Product Category" link is still there. The plugin is however showing up in the must use section, so I can only assume that wp is using it.

    Anyone have any ideas on troubleshooting why it isn't going away.

    Another question I have is I noticed at the top of the users admin page there is a “Categories” link in the “Store Admin” menu at top. If you go into that “Categories” menu link it goes into another page which has another “Add New” link. How did you get rid of it? Is that what Step 4 is referring to above.

    Next Question -->

    We simply changed the permissions for the Product Categories to Super Admin and moved it to a private menu we have for Super Admins only

    Here is what I did-
    1. Installed Admin Menu Editor plugin in the normal plugin folder not the mu-plugins folder (alex's post above somewhat confused me)

    I installed admin menu editor. It works really well.

    Did you make sure to install it under /wp-content/mu-plugins/?

    Also need to move admin-menu-editor-mu.php from admin-menu-editor/includes to /wp-content/mu-plugins/

    2. I then networked activated it.
    3. Went into the menu editors settings (inside my blog template), went into "products menu" and then into the "products categories" and set the "Required capability" to "super-admin"
    4. I then created a new menu in here called "private product categories" and moved the "product categories" to it. Is that what Saunt Valerian is referring to

    moved it to a private menu we have for Super Admins only

    If not what is he referring to and how do you setup a private menu for super admins.
    Hope someone out there can help me work through this as I am pretty new at wp.

    One other note is that I have this installation locally until I have all the bugs worked out. I don't think that having it locally is the problem, because everything else on the site works, except for this.

    Thanks all

    # Posted 2 days ago
    _________________________________________________________________

    One other plugin I have on the site which may or may not make any difference at all is the TT Mp-FrontEnd Plugin.

    This has been driving me crazy because I believe I have done everything correct.
    Hope to hear from someone soon.

    # Posted 2 days ago
    _________________________________________________________________

    Let me know what other info you need from me. I really don't understand why it's not working. I am so new to wordpress though, I may be missing something simple.

    I really look forward to hearing back from you. I am at a standstill. :slight_frown:

    Thanks,
    MJ

  • aecnu

    Greetings MJ,

    Thank you for your additional feedback, it is greatly appreciated.

    First of all we will and should be working through these issues one at a time. As a whole they can be over whelming to just about anyone though they can indeed point to a single issue but this is normally not the case.

    You had mentioned that it is running locally which means that we have no way to access the installation?? To look at the live source code? To see first hand what is going on or not going on there?

    This will be the first thing to do is to get the site live and address the issues at that time.

    You have no idea how many times people have developed locally and claimed it worked flawless until they went live or the same for those who developed in one folder and even though it was live when they moved it to its permanent home the whole thing crashed.

    Therefore let me know when we have this live so that the lead developer if indeed called in here and myself can see first hand what is happening and view the source code.

    As it stands now it is like telling the mechanic the car is making a noise and you want him to tell you what is wrong but he cannot see the car or the dentist about a tooth ache for a tooth and mouth he cannot see. In either case accurate diagnosis ain't happening and just speculation or "it could be".

    Please advise.

    Cheers, Joe

  • aecnu

    Greetings MJ,

    Thank you for your additional input and for the detailed information regarding the transfer to a live environment though I am sorry to hear that you are still having issues but happy that when we get them handled because it is live we will be in good shape.

    At this point I suggest that you first update to the newest version of Market Press which should be in your regular Plugins folder. There should not be anything relating to Market Press in the must use folder.

    Once the update is done check for any issues and try to directly over write the styling files with your custom styling files - we can always re-upload the originals if necessary.

    Please advise.

    Cheers, Joe

  • MoeJoe

    Hello aecnu,

    I upgraded all plugins to latest versions. Everything is in the regular plugins folder except for the two files I created and put in the mu-plugins folder in which it says to in the tutorial. Unfortunately still no luck. :slight_frown:

    This part of your last post, I am unsure on what you are wanting.

    Once the update is done check for any issues and try to directly over write the styling files with your custom styling files - we can always re-upload the originals if necessary.

    Please advise and I look forward to hearing back from you.

    Thanks,
    MJ

  • aecnu

    Greetings MJ,

    Thank you for your additional input, it is certainly appreciated.

    Earlier I had commented regarding the custom files it appears that you had created and put in the mu folder and I was suggesting that you put them into the regular Market Press folder.

    Things can get very convoluted very fast when looking through all the happenings of a ticket.

    After rereading your post today:
    https://premium.wpmudev.org/forums/topic/global-products-problem-in-marketpress#post-264891

    I am now totally lost as to what we are trying to accomplish here and therefore I am going to refer to a higher authority @Aaron to see if he can possibly put us back on track in the right direction of where you are going with this.

    Therefore I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • MoeJoe

    Hi aecnu,
    The only thing I am really wanting to achieve is what is described in this tutorial --> https://premium.wpmudev.org/forums/topic/global-product-categories-solved-a-tutorial but unfortunately it isn't working?

    The next thing I am wanting to achieve after getting this to work is to a create global products page, preferably on the home page, which I haven't even looked into creating yet. I haven't mentioned that to you yet, but that's what I would like to get done.

    I look forward to getting this resolved so I can move on with my projects.

    Thansk,
    MJ

  • aecnu

    Greetings MJ,

    Thank you so much for the additional input, it gives a clearer path to what you are trying to do.

    The tutorial in question was produced and published by another member for a version of what seems to be so long ago, before I was even on staff.

    Therefore its usefulness even if it was 100% valid then, may be far from applicable now but at least one gets the idea of what you want to do.

    I have indeed notified the lead developer that this ticket is awaiting his input and now we will have to be patient while he makes his rounds and make his way to this point.

    Sincerely, Joe

  • Aaron

    The next thing I am wanting to achieve after getting this to work is to a create global products page, preferably on the home page, which I haven't even looked into creating yet.

    That's pretty easy, just use the global list shortcode in the page content (if you have a static front page), or the template function in your front page template somewhere (index.php or home.php usually).

    As far as the other stuff, I really couldn't tell you what that user did or debug it.

    The way I would do it is all his synching NBT plugin stuff, but instead of using css just remove the capabilities.

    You can filter 'mp_register_product_category' to add a custom capability argument for product categories. See http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments

    Then you could use one of those free capabilities plugins (with multisite support) to remove the manage_*, edit_*, and delete_* caps, and give admins the 'assign_*' capability only. That will hide the menus and only allow them to assign already created categories (which you copied from your template blog).

    Hopefully this points you in the right direction, it will require some decent developer skills though so if it's beyond you you'll need to hire a developer for a quick job of it. We don't do custom coding here as part of support, just point you in the right direction.

  • Saunt Valerian

    Hi,

    I'm going to chime in here and see if I can help since I wrote the original tutorial. MP was a very different product back then and has been updated several times since, so just to be sure, I double checked my installation and saw that everything is working correctly in the current version of MP as it did then.

    My tutorial actually makes no changes at all to MP. All the modifications are to WordPress itself. If you've installed the mu-plugin and stylesheet then it should be working. What I put in that post is exactly what I have in my installation. The only thing it does (and it is nothing fancy) is create a custom stylesheet for your admin area across your multisite. The plugin just calls the stylesheet up.

    If the add new category link is still showing then there must be something wrong with your php file (even if it is showing up in your plugin list) or your css file (maybe the syntax is wrong?).

    As to the menu item, to keep it out of reach of the sellers. I have a menu section called Admin Menu. It is only displayed to super admins, but is available on all the subsites. Using the admin editor plugin, I put all my admin menu items in there that various plugins add which I don't want users to have access to. Add New Category is in there along with about a dozen other menu items. It's kind of like a junk drawer to various options pages that only I can access for all the subsites.

    Aaron makes a good suggestion about removing the capabilities, but I've found that my method works well because my sellers can come to me ask for custom product categories for their own site and I can add them because the function is still there, just hidden.

    I control product categories on my mainsite using category-filtered shortcodes on pages dedicated to categories I defined along with a custom menu giving navigation to those pages. I DO NOT use the automated MP category navigation widget since it registers and displays custom product categories from the subsites, which in turn, cause navigation issues for visitors.

    I'm following this topic and will answer your questions as best I can.

  • nickrosener

    One question that I am finding unanswered everywhere is. HOW DO YOU GET ALL GLOBAL CATEGORIES TO DISPLAY ON THE MAIN SITE WHETHER OR NOT THEY HAVE PRODUCTS IN THEM (and with a message inside that there are no products, if there are none.). Otherwise it would seem we are forcing the main site to either have products for every category, before site launch, or we are assuming customers will sign up and add products to every category. I think for NEW sites, on the MAIN site wouldn't we just want to show all the categories to entice new admins to create member sites (i.e. yoursite.mysite.com or mysite.com/yoursite) and use those categories? It seems unusual that at first the main site would only lists categories with products in them, though WordPress works that way with posts and post categories <-- therein most likely is the answer, but I am not experienced enough to put 2 and 2 together here.

  • Saunt Valerian

    I handled that by removing a level of automation and forcing the product categories to display on certain pages. You could create a navigation, either manually as text or as a menu and have the menu items point to specific wordpress pages created for those categories. I did this as opposed to using the dynamically-generated MP category pages. The primary reason for this is that I can easily add additional content to the individual product category pages.

    On the pages themselves, to display the product categories you can use the global products shortcode, but I had no luck with that. Instead, I used the Shortcode Exec PHP plugin from the repository and used the following php snippet to create the layout:

    ?><div id="marketplace-grid" class="clearfix">
    <?php
    	$args = array (
        	 'text' => 'none',
        	 'per_page' => 12,
        	 'category' => 'accesories',
    );
        //check for paging
        if (get_query_var('paged'))
          $args['page'] = intval(get_query_var('paged')); ?>
    
    <?php mp_list_global_products( $args ); ?>
    </div>
    
    <div class="globalnavlinks" class="clearfix">
    
    <?php mp_global_products_nav_link( $args ); ?>
    </div><?

    I created a php snippet for each page and assigned each its own custom shortcode. Just list the parameters you need in the array. That seemed to work better. The built-in shortcodes have always seemed finicky to me.

    If you use php, there are a lot of different ways to get it onto a wordpress page, my method is only one. There are other plugins available that allow you to input php directly into the page and it will load.

    My method here is about half MP automation (because I use the php code and use the MP filters) and half WP manual creation (because I manually created the pages and the navigation for those pages as well).

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.