Announcement

Collapse
No announcement yet.

products in 3 colmuns

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

    products in 3 colmuns

    Hi I am new to actinic but already finding may way around one question i do have though is that my client wishes to have products displayed in three columns. Now i can not find any where to do this in actinic, i have done it where i display the categories but the actual products seems to be alot harder to do.

    I found this http://www.drillpine.biz/actinicstuf...ltiColumns.txt

    but all i get is script errors when i implement it.

    Does anyone know or has created columns for products any info would be of great help.


    #2
    Welcome to the forum,

    that script by Norman is the defacto version and it has been implemented successfully by thousands. There is a copy of the same in the advanced users guide also.

    It is most likely a copy and paste error. Start afresh and work through it again as it is quite easy to break the code if you miss the wrong tags and section of code. Even leaving a single tag in the wrong place will kill it. It is often the place where you are inserting the code that is likely to create the error ... check and double check as it will work straight from Normans donationware example


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      you don't to use this script; a few lines of javascript code will do the trick just fine.

      Comment


        #4
        Ashley,

        If you're just evaluating Actinic, then Version 8 may be most suitable for you as has products in columns built-in.

        If you have to use V7, then look at your pages using FireFox and use its Tools / JavaScript Console to get decent error messages. Otherwise upload a page and post the URL so we can see what's wrong.

        Henri,

        If you've a simple solution, please post it. It may be more suited to Ashley's needs.

        Mine is quite complex as it has to fail-safe on non-JavaScript browsers, be search engine friendly, deal with any number of columns, allow varying column counts down the page and correctly deal with non-full final rows.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Well, I'm certain my solution isn't as complex as yours but it is meant to be a quick and dirty but pratical answer to the problem.

          It uses a counter variable that is incremented each time a product a 'written' and checks to see if the counter is a multiple of c, which is the number of columns wanted. If it is, it just writes out the html to close a table. It's like a newline.

          Here's what goes in Act_productbody:

          <script language="JavaScript" type="text/javascript">
          var p = 0;
          </script>
          <table width="100%">
          <tr>
          <td>
          NETQUOTEVAR:PRODUCTBULK
          </td>
          </tr>
          </table>

          where p is the product counter.

          Then, in act_productline:

          <script language="JavaScript" type="text/javascript">

          p++;
          m = p % 3;
          if (m == 0)
          document.write("</td></tr><tr><td height=\"20\"></td></tr><tr><td align=\"center\">");

          </script>

          Just before the

          NETQUOTEVAR:TEMPLATEENDXML

          NETQUOTEVAR:NEXT


          You see the counter being incremented (a product has been output), then we check if it is a multiple of 3 (for 3 columns) and output some html which ends table and begins a new one.

          What this does is output one 3-column table after the other.

          Comment


            #6
            Another option is to remove all traces of the tables from the page (complex) and then set the product layouts using CSS with the desired width to achieve 2/3/4/5 etc products per row via floats (moderate) and then declare the product layout to use at the section level (simple).

            This removes the need for Javascript and tables but can be a royal pain in the bum to set up depending on your XHTML / CSS skills.

            As Norman points out - v8 is the easiest of them all with you simply declaring the number of products per row and Actinic doing the dirty work for you.


            Bikster
            SellerDeck Designs and Responsive Themes

            Comment

            Working...
            X