Announcement

Collapse
No announcement yet.

Boolean Variable for new product pages

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

    Boolean Variable for new product pages

    Hi,

    I'm wondering if there is a variable i can test against for the new separate product page layouts within v11. I used to be able to test against the variable:

    Code:
    <actinic:variable name="SectionHasVisibleProduct" />
    So on a section with a child product it would come back true. This was great, however with the new seperate product page layout this comes back true when the products below are in terms of my layout just section links (i.e you click them to go through to the actual product page)

    So in my layout I have some products with seperate pages and some using the old method of placing every product within a seperate section. Therefore I want to be able to test if any of the products within a section are actually going to result in a product page, i.e report false if they are products utilising the seperate product page layout.

    Guy
    Regards,

    Guy

    Lead Developer - Lock Shop Warehouse
    Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

    #2
    Not too sure what you're asking but Product Pages will have variable PageType set to "Product Page". It will be "Section" on normal Section pages (which may or may not contain products).
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      This seems to be the problem as I can't test against the pagetype variable, currently I am trying but the results are not as i would expect.

      If on a product page utilising 'separate product page' it registers as a product page. However if on a product within a section, i.e doesn't use 'separate product page' it sees it as a section page.

      Is this an issue in my templates or is it normal?

      Guy
      Regards,

      Guy

      Lead Developer - Lock Shop Warehouse
      Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

      Comment


        #4
        Every page has a PageType of either 'Section' or 'Product Page' and you will always be on one of these, when within the shop, as i understand it.

        Comment


          #5
          Why not have a condition that tests for when page is not a product page?

          Comment


            #6
            Here's the Condition Actinic uses to make a link to the Product Page from the Product Summary layout:
            Code:
            (<actinic:variable name="PageType" /> == "Section") AND
            (<actinic:variable name="ProductListNameLink" /> == 1)
            So you could use this within a product to detect if it has a Product Page associated with it.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              That's the issue, when testing on a product page generated from the new 'separate product page' it reads as a product page, but when on a product within a 'single section per product' style layout it reads as a section page.
              Regards,

              Guy

              Lead Developer - Lock Shop Warehouse
              Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

              Comment


                #8
                Norman, what is the variable productlistnamelink up to? I had been using this but I found I got inconsistent results. It worked for our old v10 sections which we placed new 'separate product page' products within, but for some reason not for new sections that we placed these products within.
                Regards,

                Guy

                Lead Developer - Lock Shop Warehouse
                Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

                Comment


                  #9
                  If it's a condition Guy, you can open it up via the design library to understand it. Looks like it is checking for a product page to me.

                  Comment


                    #10
                    Originally posted by guyc View Post
                    Norman, what is the variable productlistnamelink up to? I had been using this but I found I got inconsistent results. It worked for our old v10 sections which we placed new 'separate product page' products within, but for some reason not for new sections that we placed these products within.
                    I have noticed some inconsistency with the new variables for a product page when used with imported V10 sites compared with new V11 sites. Still not got to the bottom of the problem.

                    Malcolm

                    SellerDeck Accredited Partner,
                    SellerDeck 2016 Extensions, and
                    Custom Packages

                    Comment


                      #11
                      Hi All,

                      Thank you for all the advice, I've found what was causing the inconsistencies. As Norman posted above the simplest way of establishing whether to show the new 'separate product page' links is to test against:

                      Code:
                      (<actinic:variable name="PageType" /> == "Section") AND
                      (<actinic:variable name="ProductListNameLink" /> == 1)
                      I didn't really get what this was up to though so I assumed when it wasn't showing certain products that it might not be the best method. However, it does work fine, and the problem I was having was caused by some products having 'Product Details > Links > Clicking the product Name' set to 'Does Nothing', which results in a value of '0'. Obviously this is what the ProductListNameLink was looking at and deciding that I didn't want the link to show.

                      Now I'm aware of what's causing it, it's simple enough to fix. As such there's no need to try and find another variable to test against as this already does the job.....

                      Appreciate all the help.

                      Regards,

                      Guy
                      Regards,

                      Guy

                      Lead Developer - Lock Shop Warehouse
                      Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

                      Comment

                      Working...
                      X