Announcement

Collapse
No announcement yet.

Bypass section if only one product in section

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

    Bypass section if only one product in section

    Hi - don't think I am missing something but forgive me if I am it has been a long few days

    Occasionally we have a section with just one product in it and it would be ideal if the system just jumped straight to the Product Page rather than stopping at the section page and waiting for the product to be selected.

    We use SPP so not able to just move the items in the tree - pagenames etc vital for SEO so need to keep the structure as next week or month thee could be another product added to the section.

    It is from the top section level so still need the section to create the menu structure.

    Basically can we say when a section page is called
    If (subsections/next level sections = 0 and number of product = 1) then {redirect to a new page - (the product page of the one product listed)} else {do nothing}

    I am sure it can be done at a low level with some customisation but is there a way with SellerDeck without major coding at PERL or other level - of course editing at a low level means issues when upgrading.

    Thanks
    David Cunningham

    www.truska.com
    -----------------------------
    ECommerce (SellerDeck) & Web Design, Hosting, Search Engine Optimisation, Social Media and Remote Backup (Truska Backup)

    #2
    We use SPP so not able to just move the items in the tree - pagenames etc vital for SEO so need to keep the structure as next week or month thee could be another product added to the section
    You could do this in PHP but If you want to keep your SEO structure and links then it would be best to keep it the way it is now. As soon as you change your links to avoid the section level page that page will lose it's SEO rankings and any future products added to the section won't do well until the section page has regained it's SERPS position.

    The product page will also lose the benefit of the anchor text in the link. i.e. If your structure is 'Home-page' > 'Books' > 'Gardening for beginners' then currently the product has a link saying 'Gardening for Beginners' from a page called 'Books' which is great for it's SEO. If you change the links so the Section link for 'Books' leads to the 'Gardening for Beginners' page then this all gets lost.

    You can of course change the link text at the same time but then there's a risk your site structure is going to lose it's integrity and start confusing people.

    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      Thank you Mike
      Yes you have hit nail on head there re SEO which is why we can not really do it that way at all

      The only way I can think of and it has its problems as well) is to get deeper into the code (maybe PERL level, not sure) and check how many products in the section and then if 1 it could do a redirect - thus maintaining the page /url / seo structure.

      Is this possible and if so from where?
      and would it need reapplied every time we upgrade?
      Thanks
      David Cunningham

      www.truska.com
      -----------------------------
      ECommerce (SellerDeck) & Web Design, Hosting, Search Engine Optimisation, Social Media and Remote Backup (Truska Backup)

      Comment


        #4
        The easiest way to do this would be to use an on page redirect but Google will follow the link so will know what's going on whatever you do. You could use javascript to do the redirect but I'm pretty sure Google can process most javascript these days.

        The advanced user guide is a good start to customising the navigation elements using blockifs.

        In this case it wouldn't be too difficult to run through the section list, count how many products are in the section and either include the the redirect on the page or not.
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          Products in Sections are laid out via layout Responsive Product List.
          This displays each product via layout <actinic:variable name="ProductLayoutRWD" />.

          You could try replacing the above (there is more than one occurrence - I tested using the second occurrence for a normal retail only site) with:
          Code:
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22ListCount%22%20%2f%3e%20%21%3d%201"><actinic:variable name="ProductLayoutRWD" /></actinic:block>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22ListCount%22%20%2f%3e%20%3d%3d%201"><div id="product-page-body" class="singleitemsection"><actinic:variable name="ProductPageProductLayoutRWD" /></div></actinic:block>
          i.e. if ListCount != 1 use ProductLayoutRWD as usual
          if ListCount == 1 use ProductPageProductLayoutRWD instead
          and wrap a <div id="product-page-body"> around it to get the expected look and feel.

          And put the following into the bottom of layout Standard Javascript Header Functions:
          Code:
          <script>$(document).ready(function(){$( "div.singleitemsection" ).find( "a[href*='#SID=']" ).contents().unwrap();});</script>
          The above will stop the product name being clickable.
          Last edited by NormanRouxel; 08-Dec-2018, 03:37 PM. Reason: Amended to disable product name being a link to the real product page.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Yes. That's a nicer way to do it.

            So rather than changing the linking just put the product on the section page if it's the only one rather than the customer needing to click through to it.
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment


              #7
              I've tweaked my post #5 so the product name in these single products isn't clickable (it would have taken you to the original Product Page).
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Since applying this to a site ages ago - I needed to do the same thing again and remembered about, and then found, this post and solution.

                It works but the resulting page is now only using 1 column at 33% (and not full width, as it needs to be).

                An easy fix is to go into the product and col count for products on the section to 1 but that requires manual intervention rather than it just happening if number products in section = 1 - not a huge deal for this site as not a lot of products and they will not change often but still has to be done and checked for - any thoughts on getting round this ...

                This fix can bee seen by selection Cat food from the ALL Products (http://feedwellshop.com/uk/dogfood/A...and-Sizes.html) and then from main mega menu top level select Cat Food - I have set the product Col count to 1 for Cat food for now - That will change quite soon as hoping to get live next week (banks and merchant accounts willing).

                BUT

                Any ideas to automate this issue?

                You can see the issue from these links (note site still in dev..).
                http://feedwellshop.com/uk/dogfood/A...and-Sizes.html -
                Click on the Puppy product and it work OK
                now go to
                http://feedwellshop.com/uk/dogfood/f...ood-range.html
                and again select Puppy (section this time) - There is only one product in the section so the divert works but the display is wrong

                I note the URL stays as http://feedwellshop.com/uk/dogfood/Feedwell-puppy-dog-food-range.html - The section URL and not the product URL - This would mean that the cols would be 3 (as set for sections) and this is set at a level above the actual product layout explains this issue.



                Thanks

                David Cunningham

                www.truska.com
                -----------------------------
                ECommerce (SellerDeck) & Web Design, Hosting, Search Engine Optimisation, Social Media and Remote Backup (Truska Backup)

                Comment


                  #9
                  Not sure about a fix for the above but we use our htaccess file to redirect visitor to a section with a single product directly to the product.

                  James
                  www.butterflies-healthcare.co.uk
                  www.viteyes.co.uk - vitamins for macular degeneration
                  www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
                  www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
                  www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

                  Comment

                  Working...
                  X