Marketpress themes not visible unless SuperAdmin?

I am building theme "skins" for my network using the built-in marketpress option to choose themes. I created a css file (with the necessary comment on the beginning of the file), uploaded it to marketpress-includes/themes and as expected, when I visited the settings page for marketpress (/wp-admin/edit.php?post_type=product&page=marketpress&tab=presentation) it was there, ready to be selected and functioning properly.
BUT when I tried to select the theme using anadmin account and not a superadmin, the new theme was not present on the dropdown and the only items present were the marketpress original ones. I switched back to superadmin and it was there.

Has anyone else noticed this?

  • aecnu
    • WP Unicorn

    Greetings aristath,

    Thank you for this great question.

    From my understanding the "theme" folder in Market press was examples to help integrate into a theme, not to be used directly as a theme.

    That is why Frame Market/Grid Market were originally created.

    On the other hand since you are trying to use it as a theme, then you would want to copy it as a child theme into the themes folder, then it should be available to all.

    I have logged into my Super Admin dashboard and cannot find a reference to the described "Market Press" theme at all.

    What am I missing here?

    Please advise.

    Cheers, Joe

  • aristath
    • Recruit

    I wasn't talking about a theme, I was referring to the Marketpress plugin.
    With MarketPress installed, if I go to Dashboard->Products->Settings->appearance there is a dropdown that lets you choose a theme for the marketpress plugin. Those "themes" could be more accurately be described as "skins" since they're nothing more than css files located in wp-content/plugins/marketpress/marketpress-includes/themes.

  • aecnu
    • WP Unicorn

    Greetings aristath,

    I do not have the selection you are referring to. I even went and network activated and do not have the menu path you indicate.

    I do have in the regular admin dashboard Products --> Store Settings --> Presentation tab a drop down of the css choice and custom css choices.

    Is this by any chance what you are looking for?

    Please advise.

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings aristath,

    No problem my neighbor to the south.

    The answer to your issue is the allowed themes directive /wp-content/plugins/marketpress/marketpress-includes/marketpress-ms.php around line 126, you need to add your custom templates there.

    Please advise if this does the job.

    Cheers, Joe

  • aristath
    • Recruit

    Per your suggestion I added my theme to the "allowed_themes" array like this:

    'allowed_themes' => array(
      'classic' => 'full',
      'modern' => 'full',
      'icons' => 'full',
      'united' => 'full'
    ),

    the addition was the 'united' line.
    However, the theme is still not visible unless superadmin.
    Then I looked in the marketpress.php file and I found this on line 1248:

    if (is_multisite()) {
          $allowed_list = array();
          $network_settings = get_site_option( 'mp_network_settings' );
    
          foreach ($theme_list as $value => $name) {
            if ($network_settings['allowed_themes'][$value] == 'full')
              $allowed_list[$value] = $name;
            else if ($network_settings['allowed_themes'][$value] == 'supporter' && function_exists('is_pro_site') && is_pro_site(false, $network_settings['themes_pro_level'][$value]))
              $allowed_list[$value] = $name;
            else if (is_super_admin()) //super admins can access all installed themes
              $allowed_list[$value] = $name;
          }
          $theme_list = $allowed_list;
        }

    So I was wondering... what's the pro_sites doing there??
    There's no such option in the pro sites module!

  • aecnu
    • WP Unicorn

    Greetings aristath,

    So I was wondering... what's the pro_sites doing there??
    There's no such option in the pro sites module!

    Great question in which I do not know the absolute answer, but believe it is to be able to control Market press through the Pro Sites plugin "Plugin" module.

    Therefore for this question and to have a solid answer i will need to summon the lead developer in here with his invaluable insight into the Market Press plugin coding.

    However, since it may take awhile to get the lead developer in here with an explanation, I thought we may want to try and finish the original issue or I will flag him for that too.

    Have you managed to make any further progress with getting your custom "skins" to show?

    Please advise.

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings aristath,

    D-a-r-n and your coding I thought would work for sure just adding it to the allow array.

    I will go ahead and see if I can get the lead developer in here offering his advice/advise us on how to get the custom "skin" to appear in the listing.

    Also to clue us in on why the Pro Sites code or if I indeed got that portion right.

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

    Cheers, Joe

  • aristath
    • Recruit

    As it turns out, on Pro-Sites there IS an option to allow these themes for specific levels. It's on the "Theme Permissions" section of the pro-sites settings, but the <th> of the table presenting these options is empty. Thus there is no way for the admin to know what option he's actually making!!!

    The only way to find out and use this option is by using firebug or google developer tools on the <select> elements and look for the name="........"

    for example you can edit the permissions for the "icons" theme by editing the <select> that has name="mp[themes_pro_level][icons]"

    It's a small bug... but took me a while to find.
    Hope that gets fixed in the next release of the plugin. All that's needed is to add the proper names on the <th> of the table on pro-sites.

  • aecnu
    • WP Unicorn

    Greetings aristath,

    Thank you for this incredible find and obviously paying attention to every details.

    I am indeed impressed and thankful for your pointing this out and finding this.

    I am going to confirm this ticket and your find as a confirmed bug.

    In addition, the reason why we were working this alone is because the lead developer of the Market Press plugin who is also the WPMU Dev lead devloper (in charge of the developer team) is on vacation until the 10th of July.

    Therefore with me marking this as a confirmed bug it set off a whole chain of events that will insure it is dealt with and not get away from us and I expect that it will be included in the next release.

    Some rep points sent your way

    Thank you for finding this bug

    Sincerely, Joe

  • aristath
    • Recruit

    Thank you!
    I know he's away, that's why I went ahead and fixed it.
    on marketpress-ms.php line 645
    it is

    <th scope="row"><?php echo $name; ?></th>

    Change that to

    <th scope="row"><h4><?php echo $value; ?></h4></th>

    and there you have it... problem solved, one less bug in his queue. I bet there are more important things to deal with than this simple thing... and I 'm sure when he comes back he's going to have a lot of issues to resolve (some of them mine... :stuck_out_tongue: )

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.