Announcement

Collapse
No announcement yet.

Testing Also Bought & Related Products

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

    Testing Also Bought & Related Products

    Against each product I have a <div> to display the Also Bought and Related Products along the lines of (truncated for ease of display) :

    <div>
    RelatedList
    AlsoList
    </div>

    Is there a conditional test available to remove the space the <div> occupies from the page flow if both lists are empty? The containing <div> introduces a background image that needs removing if both lists are empty.

    Thanks.

    MS 8.5.0


    Bikster
    SellerDeck Designs and Responsive Themes

    #2
    Don't think so, or at least can't think of an easy way to do it. I would try putting the <div>'s in the List Layout Settings so they only show up if the lists have products in them. This will give you 2 <div>'s but perhaps with some cunning css you can get over this?
    Cheers

    David
    Located in Edinburgh UK

    http://twitter.com/mcfinster

    Comment


      #3
      Hi Dave - tried that and alas does not achieve the effect - depending on where I place the <div> both lists have a background with a gap between OR due to the list layout a gap in the image is created between each item in the list.

      I considered, albeit very quickly, cutting the background image in two and use negative margins on the top list to drag the 2 together but this is going to be a Royal pain between different browsers and would look odd if only 1 list is populated... hence the concept of testing if both are active and showing / removing accordingly. A nice "block if" would be lovely to get the effect required


      Bikster
      SellerDeck Designs and Responsive Themes

      Comment


        #4
        Sorted a temporary solution that may be of interest to others - not ideal but it works (very old school) ......

        I placed a <br /> at the top of each list in the overall list setup to force some white space. The background image was modified to have the corresponding amount of white space at the top. When both of the lists are empty the <div> self collapses and only shows the white part of the background image ... when either list is populated the background image shows - albeit 1 line further south (which I can live with at the moment)

        If anyone knows of a conditional test it would still be most welcomed


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment


          #5
          Breaking my "wait a week before bumping" rule .. if anyone knows of a solution to test the lists are not empty it would be most appreciated.

          Thanks


          Bikster
          SellerDeck Designs and Responsive Themes

          Comment


            #6
            Hi Jont

            You can do this with a condition of the following kind...
            Code:
            <actinic:variable name="ProductAlsoBoughtList" /> != "" AND <actinic:variable name="ProductRelatedProductsList" /> != ""

            Comment


              #7
              Cheers Chris - you stand tall amongst the meek (or is that geek?)


              Bikster
              SellerDeck Designs and Responsive Themes

              Comment


                #8
                Hopefully I am having a bad day ... but are the above variables actually layouts .. which you are not able to add to a block if?

                Hoping it is just me and a lack of sleep


                Bikster
                SellerDeck Designs and Responsive Themes

                Comment


                  #9
                  Hi Jont

                  Those are indeed layout placeholders, and so you can't add them into the Condition editor via the 'Insert Variable' list, but you can copy and paste them straight in.

                  Basically, their 'value' is empty if they don't contain anything - so you can base the validation on that.

                  Comment


                    #10
                    Originally posted by cdicken
                    you can't add them into the Condition editor via the 'Insert Variable' list, but you can copy and paste them straight in.
                    That's fantastic - always assumed you were limited to what was available via the insert variable option... but it makes sense that layouts are also able to be tested... opens up a whole new playground

                    What was the reason for leaving layouts from the condition list?


                    Bikster
                    SellerDeck Designs and Responsive Themes

                    Comment


                      #11
                      The layout selectors will only work in conditions if they are going to insert a list - none of the other ones will actually work. I guess this is why they are not in the list.

                      Comment

                      Working...
                      X