Announcement

Collapse
No announcement yet.

Problem Adding Duplicate Item Tags On Same Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem Adding Duplicate Item Tags On Same Page

    Hi All

    I am using the suivant theme on MM9 and on the home page there is a What's Popular product listing carousel that is set to show the best selling products
    controlled by this Item tag
    Item Tag: <mvt:item name="readytheme" param="productlisting( 'most_popular' )" />

    this carousel flows from left to right - exactly how I thought it would flow

    I want to put this tag on the CTGY page and Prod Page but when I do
    the carousel flows top to bottom

    I have tried it on a new test page and other pages throughout the store and all show the same

    it must be simple but I was thinking that there would be no code change on another page as it is pulled from the readythemes product listings code

    can anyone help

    Cheers!

    #2
    Re: Problem Adding Duplicate Item Tags On Same Page

    @ridgewood,
    As long as you are just relocating the item tag, the CSS should remain intact. You will need to create a new initialization string to fire off the JavaScript though. In your scripts.js file, copy this initialization from the jsSFNT function to the jsCTGY and/or jsPROD function.
    Code:
    // ---- Product Carousel ---- //
    cornerstoneUX.sharedFunctions.productsCarousels('#js-whats-popular-carousel');
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Re: Problem Adding Duplicate Item Tags On Same Page

      Hi Matt

      That worked a treat

      Cheers!

      Comment


        #4
        Re: Problem Adding Duplicate Item Tags On Same Page

        Hi Matt,

        I had the same issue and applied your "fix" and it works great.

        However, if I have 2 tags on the same page using the js-carousel script, only the first tag works. The 2nd tag just lists the products from top to bottom.

        How do I re-initialize the js- carousel script to work for 2 or more tags on the same page?

        Thanks.

        Comment


          #5
          Re: Problem Adding Duplicate Item Tags On Same Page

          @Strat1979,
          You will need to have a unique ID for each carousel and initialize each one separately like this:
          Code:
          // ---- Product Carousel ---- //
          cornerstoneUX.sharedFunctions.productsCarousels('#js-carousel-1');
          cornerstoneUX.sharedFunctions.productsCarousels('#js-carousel-2');
          Matt Zimmermann

          Miva Web Developer
          Alchemy Web Development
          https://www.alchemywebdev.com
          Site Development - Maintenance - Consultation

          Miva Certified Developer
          Miva Professional Developer

          https://www.dev4web.net | Twitter

          Comment


            #6
            Re: Problem Adding Duplicate Item Tags On Same Page

            Thank you Matt.
            Works perfectly!

            Comment

            Working...
            X