I need to see set

I need to see set a page to models from new blog template and at the same time see the template in the Pro Sites checkout page.

I set a showcase page on New Blog Templates and also checked the option to "Show templates selection on registration". However, when we select a template on the checkout page, the page refreshes.

  • Sarah
    • Design Lord, Child of Thor

    Hi Kris

    Could you please tell me if you'll find a solution less than a week??

    Or is there a hook that I can add before the update?

    Sorry but that's really really urgent ...

    Thanks to let me know.

    Regards,
    Sarah.

  • Panos
    • SLS

    Hi Sarah ,

    Apologies for delay on this. I'm not sure how this should be working on checkout page, as it's default function is to redirect to checkout page and change the blog_template query var. It's to be used for cases where you first select the template and then the rest.

    However you can add the following scrip in a mu-plugin:

    add_filter( 'prosites_render_checkout_page', function( $content ){
    
        ob_start();
        ?>
        <script type="text/javascript">
            (function(d,$){
                $(d).ready(function(){
                    var blog_selectors = $('.select-theme-button');
                    blog_selectors.removeClass( 'select-theme-button' );
                    blog_selectors.on('click',function(e){
                        e.preventDefault();
                        let parent = $(this).closest('.template-signup-item'),
                            template = parent.data('tkey');
    
                        $('.template-selected').css('border','none').removeClass('template-selected');
                        parent.addClass( 'template-selected' );
                        $('.template-selected').css('border','3px dashed #4DAF7C');
                        $('.template-selected img').css('-webkit-box-shadow','none');
    
                        $('input[name="blog_template"]').val(template);
                    });
                });
            })(document,jQuery);
        </script>
        <?php
        $out = ob_get_clean();
    
        return $content . $out;
    }, 99 );

    This should override default functionality. It should select the template and change the hidden input without redirecting.

    Please let us know if this is not working for you.

    Thanks!

  • Predrag Dubajic
    • Support

    Hi Sarah,

    We were doing some additional tests on multiple installations and it seems that the fix provided above works fine.

    Could you provide us with FTP or cPanel access to your site so we can investigate this further and see why it doesn't work on your end?

    Note: Don't leave your login details in this ticket.
    Instead, you can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Predrag Dubajic"
    - Site login URL
    - WordPress admin username
    - WordPress admin password
    - FTP credentials (host/username/password)
    - cPanel credentials (host/username/password)
    - Folder path to site in question
    - Link back to this thread for reference
    - Any other relevant urls/info

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Sarah,

    Thanks for the login details, I will answer everything here so we can follow up on stuff more easily.
    I have changed Panos' code a bit since the size of the elements can't fit in the column when the border is added, so I've used a bit different approach and it should be fine now.

    I've also applied a small patch to Pro Sites itself that we're preparing for the next release and the Stripe payment should be working fine now, I've tested by creating a new subsite and I had no issues with that.

    a)Actually users can create a website because I disable the set, but they can create a website without select a templete.
    Is that possible to force the users to choose a template before to create a subsite?

    There's currently no option to force them to select a template but in New Blog Templates, in the list of templates in your network admin you can select which template will be used if no template is selected.

    b)As you can see also there are a lot of templete and when users choose a templete, they don't see the button on the bottom to create a subsite.
    Is that possible to redirect users on the button "create a website" on the button with js code so that when they clic on choose this templete it scroll down until "create your site" button?

    Using some jQuery like this should do the trick:

    jQuery(".theme-previewer-overlay > button:last-of-type").click(function() {
        jQuery('html, body').animate({
            scrollTop: jQuery("#check-prosite-blog").offset().top
        }, 2000);
    });

    When I activate the set in this page: https://domain.com/boutique-en-ligne/.
    Users cannot reset the password and they will redirect to home page if they clic on register.
    When I desable this option, users still cannot reset their password but they will redirect to prosite when they clic to registar.
    When we disable New blog template plugin, all links works. I mean that in this login page, users can reset their password and will redirect to pro sites when they clic to register. https://domain.com/wp-login.php

    Can you please grab some screenshots or a video of this behavior because I'm not sure that I completely understand what's going on?
    It would be best to start a separate ticket for this issue because we already have multiple questions being discussed in this one and it can be hard to follow everything and provide proper response times.

    Best regards,
    Predrag

    • Sarah
      • Design Lord, Child of Thor

      Hi Predrag

      Thanks a lot for your quick answer, however we get an error when we try to create a subsite.
      When we choose a templete, we see that error ("cannot duplicate the templete from database" ) :

      So the subsite is not correctly dupplicate. That's not exactly the same...

      Is that a possibility to fix that?

      Regards Sarah.

  • Predrag Dubajic
    • Support

    Hi Sarah,

    When I tested the site creation yesterday I didn't see this issue, but I do see it when I test it now, and it happens in backend site creation as well.
    It looks like the error is related to one of the WooCommerce tables, can you try disabling WooCommerce on one of the template sites and try registering a new one so we can see if that's indeed what's causing the issue there?
    Or create new template site without a WooCommerce installed, that should give us more info as well.

    Best regards,
    Predrag

  • Sarah
    • Design Lord, Child of Thor

    Hi Pregrag,

    You're right, I saw this message in admin dashboard:
    "Your theme has outdated copies of some models of WooCommerce. These files may need to be updated to ensure compatibility with the current version of WooCommerce. You can see the affected files from the system status page. If in doubt, check with the author of the theme."

    and thoses info:
    "version 3.3.0 is obsolete. The kernel version is 3.4.0"

    Do you think that I must to delete thoses table from the database or downgrade woocommerce?
    If yes how can I do ?

    Best regards,
    Sarah

  • Predrag Dubajic
    • Support

    Hi Sarah,

    I wouldn't suggest downgrading Woocommerce until we're sure that the issue is wit WC itself, and even if it is, I would first suggest contacting theme developers so they can update WC files used in the theme.

    So it would be best to start with creating new Template site without WC and see if registration works properly with that.
    If it does then activate WC and configure its settings before creating new subsite with that same template.
    If it doesn't work then we can be pretty sure it's something WC related and can investigate it further.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.