Announcement

Collapse
No announcement yet.

Attribute Layout/Template

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

    Attribute Layout/Template

    Hello all,

    I'm hoping someone can help advise me or at least point me in the right direction.
    I am building a shop that will require each and every product (3,000 of them) to have a number of customisation attributes (these attributes will be identical for each product).
    I really need to have these divided into 4 separate 'chunks'.

    The first is a choice from 3 radio buttons (in single column).
    The second is a choice from 12 radio buttons (in single column).
    The third is an array of drop-downs. (in two rows of three)
    The last is a textarea for some additional information.

    I am wondering if it possible to set up a sort of attribute template that all products can use ?

    And is it possible to format each attribute to have a completely different appearance ?

    many thanks in advance

    John Keiller

    #2
    Attributes are displayed via layout AttributeList which is inserted into your product layout.

    Several approaches to customisation are possible.

    There's nothing to stop you from creating your own version. In that version you could use the ListIndex or AttributeDisplayLabel variables to determine which Attribute you were processing and generate layout code as appropriate.

    Another way would be to look at the generated code for the set of Attributes you need. Then create a completely custom layout "FixedPurPoseAttributeList" that generates that code (using ProductID) so that it works on all products. Now replace the AttributeList within your Product Layouts with the FixedPurPoseAttributeList one.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Originally posted by NormanRouxel
      Attributes are displayed via layout AttributeList which is inserted into your product layout.

      Several approaches to customisation are possible.

      There's nothing to stop you from creating your own version. In that version you could use the ListIndex or AttributeDisplayLabel variables to determine which Attribute you were processing and generate layout code as appropriate.

      Another way would be to look at the generated code for the set of Attributes you need. Then create a completely custom layout "FixedPurPoseAttributeList" that generates that code (using ProductID) so that it works on all products. Now replace the AttributeList within your Product Layouts with the FixedPurPoseAttributeList one.

      Many thanks for your reply Norman. I will work my way through what you have given me and see if I can make sense of it (Particularly the last part of your reply).
      I left actinic way back on version 4, so now returning to it on version 8 the learning curve is pretty steep ... at least for me. Thanks again ... though no doubt I will have a few other questions.
      Though as I learn I hope to be able to provide a few answers as well.



      Regards

      John Keiller

      Comment


        #4
        From the Actinic Demo Site lets look at the "Basic T Shirt"
        (I've changed the Size setting to use radio buttons).
        The generated code is (after stripping out all extraneous markup):

        Code:
        Size
        <input type="radio" name="v_5_1" value="1" checked="checked" />S
        <input type="radio" name="v_5_1" value="2"  />M
        <input type="radio" name="v_5_1" value="3"  />L
        <input type="radio" name="v_5_1" value="4"  />XL
        
        Colour:
        <select name="v_5_2" class="form_input_general">
        <option value="1">Forest Green</option>
        <option value="2">Black</option>
        <option value="3">Sky Blue</option>
        </select>
        Now those name="v_5_1" and "v_5_2" are of interest.
        The v_ defines that it's an Attribute.
        The 5 is the product reference.
        And the _1 and _2 show the sequence of the attribute.

        The above is specific to a product with reference 5.

        Now we could write code to generate this for any product as follows
        Code:
        Size
        <input type="radio" name="v_<actinic:variable name="ProductID" />_1" value="1" checked="checked" />S
        <input type="radio" name="v_<actinic:variable name="ProductID" />_1" value="2"  />M
        <input type="radio" name="v_<actinic:variable name="ProductID" />_1" value="3"  />L
        <input type="radio" name="v_<actinic:variable name="ProductID" />_1" value="4"  />XL
        
        Colour:
        <select name="v_<actinic:variable name="ProductID" />_2" class="form_input_general">
        <option value="1">Forest Green</option>
        <option value="2">Black</option>
        <option value="3">Sky Blue</option>
        </select>
        So if that lump is put into a Product Layout it will generate the required HTML.

        Now you can rearrange this code to provide a custom attribute layout.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Originally posted by NormanRouxel

          So if that lump is put into a Product Layout it will generate the required HTML.

          Now you can rearrange this code to provide a custom attribute layout.

          Crikey ... this is promising.

          Norman you need knighted.

          So I could produce all the attributes needed against a 'dummy' product and use the code to 'hard-code' an attribute layout that would automatically be displayed against each product ?

          Is that right .. or partly ?

          JK

          Comment


            #6
            That's the idea. You'd have to ensure that all products using such a layout contain identical sets of attributes / choices.

            Luckily you can copy / paste product and attributes to do this. Or use an hierarchical import file containing the same data for each product.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Originally posted by NormanRouxel
              That's the idea. You'd have to ensure that all products using such a layout contain identical sets of attributes / choices.

              Luckily you can copy / paste product and attributes to do this. Or use an hierarchical import file containing the same data for each product.

              Absolutely brilliant Norman.
              I have a bit of other CSS work to do first before I tackle the attributes tommorrow morning (however, if we (Scotland) qualify for Euro 2008 this evening, i may have a late start).

              I'll give it a try though and see what it throws up.

              Many thanks for your help .... hopefully I won't be back cap in hand

              John K

              Comment

              Working...
              X