Announcement

Collapse
No announcement yet.

ProductLayout in Database

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

    ProductLayout in Database

    Where is the product layout for each product held in the database?

    I can see sProductTemplate in "Products" but all fields are blank - the "products" table is the obvious place but nothing leaps out or is it linked somehow to some other table?


    Bikster
    SellerDeck Designs and Responsive Themes

    #2
    The Product Layout is in DesignObjects.

    Comment


      #3
      Yep - that is the actual markup.

      What I am looking for is how does each product ref know which layout to use eg:

      SKU123 == CSS Layout
      SKU789 == Single Line Layout


      Bikster
      SellerDeck Designs and Responsive Themes

      Comment


        #4
        I seem to recall that if blank then it is using the use parent layout, think this is done for database efficiency.

        Comment


          #5
          aye - but they are all blank


          Bikster
          SellerDeck Designs and Responsive Themes

          Comment


            #6
            Jont,
            If all the product layouts are "use parent" then the layout is defined globally in the "Variable" table in the "sTopValue field". The value of this field is the "nID" of the specified layout from the "DesignObjects" table.
            e.g. Product Layouts have an nID of 65566 in the "Variable" table. To set it to use "CSS Product Layout" [nID=519 from DesignObjects table] you would do:
            UPDATE Variable SET sTopValue = 519 WHERE nID = 65566

            NOTE: Not entirely as straight forward as that, but it gives you the idea. There are some additional fields that need to be configured in the "Variable" table.

            Also, for what it's worth, when setting a specific layout at an item level e.g. Section or Product, an entry is created in the "UserDefinedProperties" table for each item.

            e.g. to set a specific product layout (Prod ref ABC123) in the content tree to "CSS Product Layout" would create an entry in the "UserDefinedProperty" table where "nVariableID = 65566", "sValue = 519" and "sContentID = ABC123" with a few other fields set in here as well.
            Setting this product layout to use parent would then delete this entry from the "UserDefinedProperties" table.


            Possibly not my clearest post but it should give you the idea....
            Fergus Weir - teclan ltd
            Ecommerce Digital Marketing

            SellerDeck Responsive Web Design

            SellerDeck Hosting
            SellerDeck Digital Marketing

            Comment


              #7
              What are you trying to achieve? The hierarchical import/export will show and manage the non parent entries.

              Comment


                #8
                Cheers Fergus will take a look and see if I can make sense of it.

                Duncan - this all relates to an issue I posted the other day. Several products when pasted as cut down duplicates into another section retain the master layout setting despite the layout list being hard coded to use a different layout.

                When I delete all but the duplicate layout from the selector list they are fine. When I add the full layout back in again and apply back to the master they bork. So was looking at finding the settings in the database to see if anything is thrown up there.

                http://www.absorbentminds.co.uk/acat...-language.html

                The 6th product coloured pencils is retaining the layout from the original. The layout list on the page is hard coded to only use the cut-down version.

                If I delete the product and rebuild it works - but there are circa 100 and some are used as components so don't really want to go the delete path.


                Bikster
                SellerDeck Designs and Responsive Themes

                Comment

                Working...
                X