Announcement

Collapse
No announcement yet.

Duplicate page selector

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

    Duplicate page selector

    Hi, I want to create a 2nd page of products using the Duplicate Product option, so only one product has to be updated, as and when. However, on this 2nd page I want to use a different Layout. In my original products, I don't have an image, but on the 2nd page I want to add an image and this layout will be wider.

    The only way I can see to do this is use a Block selector which checks to see whether the product is a duplicate, and if it is, uses layout 2, or if it not then uses standard layout 1. However, I don't know which variable to check against to see if it a duplicate product. If someone could point this out and ideally the Block code to use that would be great. Thanks.
    Robin
    Robin Antill - Fan of Actinic.https://community.sellerdeck.com/cor...lies/smile.gif My Site 1st Choice Leisure Buildings

    #2
    The 'producttype' variable differentiates between a fragment, product and product duplicate, returning a different number (0, 1 or 2). You could use that.

    Comment


      #3
      Hi Lee, That works great, so my page now selects the correct layout whether it is a Duplicate or original. This solves my 1st problem however, it creates a second problem which is that I do use duplicate products on my normal page without the images (layout 1), however it is now showing layout with the images (layout 2).

      Is it possible to select the overall page layout depending whether the duplicate product is in the normal section and does not need an image or whether it is on the page where it does needs an image.
      i.e. Default pagelayout is called 1st-Choice-Shop and I have a second pagelayout called 1st-Choice-Shop-2
      Is there a variable which I can use so

      BLOCK
      if variable ="1st-Choice-Shop" then use Layout 1
      END BLOCK

      BLOCK
      if variable="1st-Choice-Shop-2" then use Layout 2
      END BLOCK

      Thanks,
      Robin
      Robin Antill - Fan of Actinic.https://community.sellerdeck.com/cor...lies/smile.gif My Site 1st Choice Leisure Buildings

      Comment


        #4
        You've not created your blockif (not block) correctly then, best place to learn about those is on Gabe's fantastic free tutorials in the forum, well worth an hour reading and digesting. You have no need for multiple layouts, you're over engineering, one layout with blockifs deciding what shows is what you need.

        Comment


          #5
          Hi Lee, thanks for the reply but I am trying to understand. I do understand you can use BLOCK IF's to select from a range of options. However.

          What I have is my main shop pages, laid out in the std left column, central main column and right column. In the central main columns I have fragments which include detailed descriptions and images of the products. The product layout consists of a general brief description on one side and the product options on the other side. This takes up all of the central column. (2 columns wide in this central column) Also, I have within my main shop pages are duplicate products which show exactly the same as above, so the layout for the products will be the same i.e. general brief description and product options.

          What I am trying to show is a list of just a set range of products (i.e. all wooden sheds, all timber sheds etc) There will only the the product layouts on these pages so I need to add the images to the product layout as well. I do this by removing the right columns. This gives me the space to display a secondary product payout which includes the image. These will all be duplicates of the products. I can use the BLOCK IF to select whether the product is a duplicate or not by using the producttype selector. From this I can select the correct product layout, however, the duplicate product layout will be different whether it is on the main shop pages or on the range of product page (the main shop pages do not need the images and is 2 columns wide where the range of product pages do need the images and will be 3 columns wide.

          As I am using producttype selector, but the only options are fragment, product and product duplicate, I can't select a product layout which is not a shop page and is a duplicate product, I don't think unless I put in another BLOCK IF but I don't what variable to test it against.

          I also would like a 3rd layout, using the duplicate product option, on my front page. This would only a 1 column wide and I would extra the brief description and price from the product.

          Any guidance is appreciated, thanks. Robin
          Robin Antill - Fan of Actinic.https://community.sellerdeck.com/cor...lies/smile.gif My Site 1st Choice Leisure Buildings

          Comment

          Working...
          X