Jump to content

Yogajardin

Member
  • Posts

    15
  • Joined

  • Last visited

Posts posted by Yogajardin

  1. Is there anyone who could just identify why this doesn’t appear in the mobile menu? I’m desperate! I’m sure it’s just a typo or omission but can’t seem to work out what I’ve done wrong. 
     

    thanks in advance!

     

    Matt

  2. Header code injection:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script>
      $(function() { 
      
      /* SETUP MULTI-LANGUAGE */
      var defaultLanguage = 'en';
      var lang = location.pathname.split("/")[1];
      var defaultClass = 'lang-'+defaultLanguage+'';
      var itemParent = "nav [class*='collection'],nav [class*='folder'],nav [class*='index'],nav [class*='group']";
      if (lang == "" || lang.length > 2 ){
        var lang = defaultLanguage;
      }
     /* ADD LANGUAGE CLASSES */
      $('a[href="/"]').addClass('lang-'+defaultLanguage+'').parents(itemParent).addClass('lang-'+defaultLanguage+'');
      $('nav a:link:not([href^="http://"]):not([href^="https://"])').each(function () {
        var langType = $(this).attr('href').split("/")[1];
        
     /* Set English designation if there's no language subfolder */
        if (langType != 'fr') {langType = 'en'; }

        var multiLanguageClass = 'multilanguage lang-' + langType + '';
        if (undefined !== langType && langType.length <= 2) 
          $(this).addClass(multiLanguageClass).parents(itemParent).addClass(multiLanguageClass);
      });
      $('nav button').each(function () {
        var langTypeFolder = $(this).attr('data-controller-folder-toggle').split("/")[0];
        var multiLanguageClass = 'multilanguage lang-' + langTypeFolder + '';
        if (undefined !== langTypeFolder && langTypeFolder.length <= 2) 
          $(this).addClass(multiLanguageClass);
      });
        
    /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */
      if (lang == "fr") {
        $('a[href="/"]').attr("href", "/fr/acceuil/");
      }
        
    /* ADD EXCLUSION NAV ITEMS */
      $('.exclude-me,.exclude-me a').addClass('exclude');
      $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');

        
    /* REMOVE OTHER LANGUAGES AND KEEP EXCLUDED ITEMS */
         $('.multilanguage:not(".lang-'+lang+',.exclude")').remove();
        
     /* SETUP LANGUAGE SWITCHER */
        $('.header-nav-wrapper').prepend('<div class="language"><a href="/fr/acceuil" class="lang-fr"><span style="font-size:12pt;">FR |</span></a><a href="/" class="lang-en"><span style="font-size:12pt;"> EN</span></a></div>');
      });
    </script>

     

    And custom CSS

     

    /* Desktop Language Position */
    .language {
        position: static !important;
        margin-left: 1vw;
    }
    .header-nav-wrapper {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
    }

  3. I added the following code

     

    @media screen and (max-width:991px) {
    .header-display-desktop {
        display: block !important;
        position: absolute;
        right: 15vw;
        z-index: 99999999;
    }
    
    .header-display-desktop .header-title-nav-wrapper, .header-display-desktop .header-burger {
        display: none;
    }
    
    .header-dislay-desktop .header-actions.header-actions--right {
        display: flex !important;
    }
    
    div#multilingual-language-picker-desktop {}
    
    .header-display-desktop .header-actions.header-actions--right, .header-display-desktop div#multilingual-language-picker-desktop {
        display: flex !important;
    }
        .header-burger {
            visibility: hidden;
        }
    }

     

    But when I use it I get the following in the mobile header

     

    image.png.a0d2240f94c46aecf4bd574ec310977e.png

  4. Ok so first part solved, have managed to get it on desktop menu

    image.png.8c7e8f08345a790872609c94cf352176.png

     

    However it does not appear on mobile site at all? Ideally I want it on site and not embedded in the menu so people can change immediately

    image.png.24dddcd5f150daeb33c823c3ada28971.png

    Thanks

     

    Matt

  5. Hi All

    Hope you can help.

    I used the following guide to set up multilingual site

    https://www.bradgood.net/articles/multi-language-content-on-any-squarespace-template

    With minor amendments to keep the English version at the root ie yogajardin/ and the french version using /fr

    So I followed the guide until the point of putting English | French in the menu and it added it to the top left (including a white bar) and neither of the links were clickable.

    So I decided to try another method and use a button in the menu for EN / FR. This has worked to a certain extent: it works on desktop fine but on mobile version the FR button is not visible on the EN mobile menu as below:

    image.png.eb8d4ad97fc6e534c6029cb00a214ae6.png

     

    But the EN button is visible on the FR menu as below:

     

    image.thumb.png.8139c62f3381b4ceb79c89ac5f9d7cb4.png

     

    I believe this has something to do with the EXCLUDE operator in the header code injection. 

     

    /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */
      if (lang == "fr") {
        $('a[href="/"]').attr("href", "/fr/acceuil/");
      }
    /* ADD EXCLUSION NAV ITEMS */
      $('.exclude-me,.exclude-me a').addClass('exclude');
      $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');
    /* REMOVE OTHER LANGUAGES AND KEEP EXCLUDED ITEMS */
     $('.multilanguage:not(".lang-'+lang+',.exclude")').remove(); 
      });
    </script>

     

    However, I find this not a perfect solution because the language changer is hidden in the menu plus it requires page header code injection for every French page I create.

    What I would really like is to have EN | FR above this button as below (as the button was previously used as a CTA for Booking) on both desktop and mobile versions but I cannot seem to get this working - does anyone have any ideas how to get it to work?

    image.png.9f119811280e97e466d035b63be07ceb.png

    Hope this makes sense

    Site is: https://yogajardin.com

    Thanks

    Matt

  6. Was this communicated to customers? It's a fairly important feature that requires intake form changes in order to get around. A single line for address does not suffice if users need to input full addresses.

    Hopefully it will be restored as it really was a great tool, speeding up the purchase / subscription process and reducing abandoned carts.

  7. OK so I'm pretty up to speed with how SP scheduling works but I've hit a snag with subscriptions. 

    Run a yoga business that allows people to book group or 121 sessions which all works great. What I want to do is allow people to buy a subscription to help spread the cost of their 121 sessions (so for example, buy 2 hours of 121 sessions to be taken / paid for over 3 months).

    I've set this up in SP. No issues there... but the issue is, for it to work with appointments I have to tick the below

    image.png.b241447109c48c61a40dcff1bf283c51.png

    And then choose the appointments its applicable to. All good.

    However, the confirmation email then becomes a Package / Gift Certificate order, which is a template that I use for gift vouchers and not for subscriptions. I want to be able to use the "Subscription Paid" client email so I can customise it towards subscriptions.

    Any ideas how to fix?

    Thanks

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.