Announcement

Collapse
No announcement yet.

Using Multiple Product Templates

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

    Using Multiple Product Templates

    Hi

    This has undoubtedly been asked and answered many times before, but I didn't have much joy with the Forum Search, so forgive me in advance...

    Our products are eBooks, paperbacks, and company-related merchandise.
    I'm redesigning the whole site (before, I just used the same template for all products).
    I need to make slightly different templates for each category, and again for sub-categories... approx 10 different templates in total, eg. where there's a "Download" button for the eBooks "Add to Cart" image and a "Buy" button for the paperbacks/merchandise, and certain different links are highlighted in the navbars (to show which section/category you're in).

    I've read the Advanced Manual pdf where it says to rename Act_Primary.html to Act_Primary2.html and Act_ProductLine.html to Act_ProductLine2.html etc (and I've done this 10 times for each different template) . . . but . . . I don't seem to be able to actually select these new templates via: 'Section' or 'Product' > Edit > 'Product Layout' drop-down list (ie. they're not there).

    What am I doing wrong? Do I need to add something somewhere to make Actinic recognize that these other templates actually exist?

    Using Actinic 6.1.5 (latest patch).
    Any help would be greatly appreciated.

    TIA


    [EDIT]

    Ah! After looking through the "Site1" dir, it looks like I need to add a few lines to PrimaryTemplates.ini and ProductTemplates.ini . . .
    Wish me luck
    Though if anyone has any first-hand experience in this matter and can offer any definite/further help, it'd still be highly appreciated.

    #2
    You can always Select and then Browse to use your user defined templates.

    Alternatively edit the two ini files and add them in immediately after [Templates]

    e.g.

    [Templates]
    Act_ProductLine2.html=My first customised template
    .
    .


    You don't need to add the other reference to the template unless you've created and want to see a preview image.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Ah. I didn't see the "Select > Browse" option before. Thanks.

      However, I edited the two .ini files, and everything seems ok.

      Comment


        #4
        ok, one other slight hiccup....

        This is probably an easy one as well, but it's evading me at the moment...

        How do I specify a different "Add to Cart" button for different templates?
        At the moment, I've got a "Download" image/button (for eBook pages) set as the default in:
        Design > Options > Shop Defaults > "Add to Cart" button (image = b_download.gif)

        but I want to use a "Buy" button (b_buy.gif) for Paperbacks and Merchandise.

        I know that the template is: Act_CartButtonImage.html
        <INPUT TYPE="IMAGE" SRC="NETQUOTEVAR:BUTTONIMG" NAME="NETQUOTEVAR:BUTTONNAME" ...etc...>

        and in the relevant ActProductLine*.html template, the corresponding line is:
        <Actinic:ACTIONS>NETQUOTEVAR:ADDTOCARTBUTTON</Actinic:ACTIONS>

        but I'm not sure how/where/what to do from thereon.

        TIA for any help with this.

        Comment


          #5
          This can be done using Custom Properties.

          1) Put all your cart images in Site1 (or your Site folder if different).

          2) Replace Act_CartButtonImage.html with the following
          Code:
          <!-- CartButtonImage HTML begin -->
          <!-- This template is used for the add to cart button image. -->
          <P align="right">
            <!--NETQUOTEVAR:BUTTONLABEL-->
            <INPUT TYPE="IMAGE" SRC="CUSTOMVAR:CARTBUTTONIMAGE" NAME="NETQUOTEVAR:BUTTONNAME"
          WIDTH="NETQUOTEVAR:IMAGEWIDTH" HEIGHT="NETQUOTEVAR:IMAGEHEIGHT" BORDER="0">
          </P>
          <!-- NETQUOTEVAR:BUTTONIMG -->
          
          <!-- This template is used for the add to cart button image. -->
          <!-- CartButtonImage HTML end -->
          3) In Advanced / Custom Properties click the "+" and create a property called CARTBUTTONIMAGE

          4) In Design / Options / Site Defaults / Properties click the "+" and select CARTBUTTONIMAGE. Set it's value to your default image name (e.g. b_download.gif). Check File Name and uncheck Use File Content. If using Business uncheck Searchable and check Use as CUSTOMVAR.

          That's now got a default image working.

          5) Now for those sections that need an alternative cart button image double-click that section in the product tree and select Properties. Click the "+" and select CARTBUTTONIMAGE. Set it's value to your alternative image name (e.g. b_buy.gif). Check File Name and uncheck Use File Content. If using Business uncheck Searchable and check Use as CUSTOMVAR.

          If Actinic fails to upload these images for you, you may have to add them in Advanced / Additional Files. You may also need a copy of these images in PreviewHTML if they don't show on Previews.

          Norman
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Brilliant!
            Thank you very much

            Comment


              #7
              Ok, I've come across another slight problem...

              All the various product templates (act_primary*.html & act_productline*.html) are now done
              (I'm sure I'll have more questions when it comes to editing the cart/orderform templates)

              I've decided that the product image (seeing they're all books) requires a value of: border=1

              However, if I change this in Act_ProductImage.html
              then this makes all images (ie. the book imprint logos) on the section index pages also have a border.

              Is there any way to specify a different template to use for the product image?
              so all actual products can have border=1
              and other pages can have border=0

              I guess it involves creating a custom property for NETQUOTEVAR:PRODUCTIMAGE
              but again, I'm not too sure how to do this.



              One other unrelated question (which I hope you don't mind me asking here)...
              I'm not using much of the content of the original templates any more, I'm mainly just using the <form> for the product, so there's no "sections" or "cart images" or "navigation" images/links etc etc from the original templates at all.

              How essential is the basehref link in the <head> section?
              <Actinic:BASEHREF VALUE="NETQUOTEVAR:BASEHREF"/>

              Does it need to be in the product templates?
              Does it NEED to be in the Cart template/s?
              What function does it actually serve?
              (apart from making the html very w3.org unfriendly)

              All it seems to do is create a "base href" equivalent entry for the "site.com/acatalog" dir...

              Note: all the required images and css etc will either be in the /acatalog dir
              or the <a href=""> and <img src=""> url's are absolute paths, not relative.


              Thanks

              Comment


                #8
                As you've seen there is only 1 product image template. You could try editing it and replacing the line

                BORDER=0

                with

                CUSTOMVAR:IMAGECODE

                and creating a Custom Property IMAGECODE that contains BORDER=0 in Design / Options / Site Defaults. You can then alter this at the section or Product level to suit. Also you could put a style="....." tag into said CUSTOMVAR instead.

                ************************************

                Re <Actinic:BASEHREF VALUE="NETQUOTEVAR:BASEHREF"/>

                This should only be in your Primary Template(s). However:-

                It's best to leave all such tags in Place. Actinic needs them for the Search, Cart, Checkout, etc to work. Only remove simple tags that you are completely sure of their purpose.

                Norman
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Once again... brilliant! It worked.
                  You sir are an actinic genius

                  __________________________________


                  Ok, if it's needed for the cart/checkout to work,
                  I'll put the basehref tag back in the primary template.

                  Talking of which, I'm just about to start work on editing the checkout pages now... *gulp*


                  Thanks again.

                  Comment


                    #10
                    Wow!

                    I have been following this thread with three thoughts in my head....
                    1. It's really consoling to find that you can ask these questions and get answers.
                    2. The answers are first rate!
                    3. I wish I knew more about custom properties and CUSTOMVARS. Is there a beginner's resource for this that someone can point me to?

                    Comment


                      #11
                      Yes, some kind of custom properties guide would be extremely useful,
                      and NormanRouxel's definitely been a life saver for us!

                      Let's hope he or someone else can help me one last time...

                      Okay... there doesn't seem to be any way to specifiy a different template for the Catalog index page and all of the Cart / Checkout pages.
                      ie. it seems that they all use Act_Primary.html as the base file by default.


                      [EDIT] Ah, wait... do the cart & checkout pages use Act_PrimaryCheckout.html ? Hmm, after previewing this template in the browser, it doesn't appear to be used at all. [/EDIT]


                      I'm using a background image for the site background... no problems here.
                      I've made the default background color "white"
                      and I've changed the default text color (in Design > Colors) to "black" (#000000)

                      So the corresponding line in act_primary.html is now:

                      <body><bgcolor="#ffffff" text="NETQUOTEVAR:FGCOLOR" . . . >

                      This works fine for the catalog index.html
                      It also works fine for most of the cart / checkout pages...

                      However, as far as I can tell, the same default text color is used for forms (background & emphasis).

                      In "Design > Colors", I've currently got a darkish shade of purple set for "form background", and a deep blue for "form emphasis".

                      I'd like to use white text for these two elements only.
                      Is there any way that this can be done?

                      ie. the text in tables and columns etc will still be black,
                      but the text in the form headers row (Description, Quantity, Price, Cost, Remove) and in the details row undereath will be white.

                      I'm currently looking at actinic.css

                      ie. maybe adding a value for "TH"
                      and maybe editing the "actxsmall" value and adding an "actxsmall2" entry ???
                      eg. changing "color:NETQUOTEVAR:FGCOLORCSS;" to "color:#ffffff"

                      I could then make the relevant changes in Act_ShoppingCartXML.html
                      eg. <TH class="actxsmall2"> and <SPAN CLASS="actxsmall2">NETQUOTEVAR:PRODUCTNAME</SPAN>

                      Though I'm not sure just how many templates "actxsmall" is used in,
                      and whether I'll be messing up other 'elements unknown' by editing this value...


                      btw, is there any way to preview the generated cart/checkout pages offline?
                      This would make my life a whole lot easier.

                      [EDIT] Ah, you can see the cart/checkout pages via: Advanced > Generate Web Site [/EDIT]


                      TIA for any help.

                      Comment


                        #12
                        Hehe. Okay, I solved the last problem myself... by using the css method.

                        ie. I added: .actxsmall2 { font-size: x-small; color: #FFFFFF; } to actinic.css
                        then used <span class="actxsmall2"> tag in the relevant sections in Act_ShoppingCartXML.html

                        eg. <TD ALIGN=RIGHT BGCOLOR="NETQUOTEVAR:CHECKOUTEM"><B><SPAN CLASS="actxsmall2">NETQUOTEVAR:TOTAL</SPAN></B></TD>

                        (though I might still change some of the values in actinic.css to definite font sizes, eg. replace "x-small" with "13px").


                        But now I seem to have another problem....

                        When I preview the 4 Act_Order0*.html files, the table width is flying off the right side of the page.

                        I've set total page width to "770" in the main table.
                        The actinic contents table is "600" on the left of the page, with a "15" (spacer) column on the right, and then a "155" (navigation/links) column on the right of that.

                        I think I might need to thoroughly examine all of Act_ShoppingCart.html, Act_ShoppingCartXML.html, and Act_Orders(01-04).html to se what's causing it.... though I have my suspicions.
                        eg. the Quantity and Price columns are a lot wider in the preview versions than what they'll be once the site is uploaded and online, and it's possible that there's some "nowrap" tags somewhere.

                        This is the default code in Act_ShoppingCartXML.html which strikes me as odd:
                        Note how the 6 TableHeaders add up to a total of "640" pixels...

                        <TR>
                        NETQUOTEDEL:REFERENCE
                        <TH BGCOLOR="NETQUOTEVAR:CHECKOUTEM" ALIGN=LEFT WIDTH=80><SPAN CLASS="actxsmall2">NETQUOTEVAR:REFERENCECAPTION</SPAN></TH>
                        NETQUOTEDEL:REFERENCE
                        <TH BGCOLOR="NETQUOTEVAR:CHECKOUTEM" ALIGN=LEFT WIDTH=300><SPAN CLASS="actxsmall2">NETQUOTEVAR: DESCRIPTIONCAPTION</SPAN></TH>
                        <TH BGCOLOR="NETQUOTEVAR:CHECKOUTEM" ALIGN=RIGHT WIDTH=80><SPAN CLASS="actxsmall2">NETQUOTEVAR:QUANTITYCAPTION</SPAN></TH>
                        NETQUOTEDEL: PRICES
                        <TH BGCOLOR="NETQUOTEVAR:CHECKOUTEM" ALIGN=RIGHT WIDTH=60><SPAN CLASS="actxsmall2">NETQUOTEVAR:PRICECAPTION</SPAN></TH>
                        <TH BGCOLOR="NETQUOTEVAR:CHECKOUTEM" ALIGN=RIGHT WIDTH=60><SPAN CLASS="actxsmall2">NETQUOTEVAR:COSTCAPTION</SPAN></TH>
                        NETQUOTEDEL:PRICES
                        NETQUOTEDEL:REMOVE
                        <TH BGCOLOR="NETQUOTEVAR:CHECKOUTEM" WIDTH=60><SPAN CLASS="actxsmall2">NETQUOTEVAR:REMOVECAPTION</SPAN></TH>
                        NETQUOTEDEL:REMOVE
                        </TR>


                        What does NETQUOTEVAR:REFERENCECAPTION represent?
                        I don't see that column in the current (old) version of the site,
                        so maybe if that isn't used, then everything will be ok
                        (hmm, then the total width will be only "560", which I guess will be ok with 20 pixels on either side).


                        Apart from that, I think I'm all set to go... and I most certainly would not have made it without the excellent help I've received here

                        Well, I won't get my hopes up too high yet, because the worse case scenario is that I upload it all and it doesn't work

                        Comment


                          #13
                          Okay... there doesn't seem to be any way to specifiy a different template for the Catalog index page and all of the Cart / Checkout pages.
                          If you have a look at 'Design | Options | Layouts' you will see there can be different overall layout templates for the front store page and also the checkout pages.
                          When I preview the 4 Act_Order0*.html files, the table width is flying off the right side of the page.
                          I would need to see a live site before I can make a guess - but it is probably something to do with numbers not adding up. Could I see an uploaded URL for the site?

                          Comment


                            #14
                            Hi, I'm back. Thanks for the info.
                            Doh! I really should've seen that option before.
                            I'll make the necessary changes on Monday, because yes, I would definitely like to use a different template for the Catalog Index page.

                            Re: site url
                            Although it's not an 'adult' site, we do sell erotic fiction (paperbacks and ebooks), so I'm not sure if I should be posting the url here. Let me know if it's ok to post the url, though if you do a google search for "Silver Moon Erotic Fiction" (without the quotes), then our site is the top result.
                            Then again, amazon also sells our books, so I can't really see there being a problem...?

                            We've still got an issue with the page being slightly wider than the allotted 770 pixels when you click the "View Basket" button, though all the other cart/checkout pages are displaying at the desired width. I think it could be caused by too much cellpadding/cellspacing for (a combination of) some of the tables in Act_ShoppingCartXML.html and/or Act_ShoppingCart.html

                            I tend to not use cellpadding & cellspacing where possible, but I didn't remove ALL these values from the templates... I just decreased them a little.


                            Anyway... the main reason I've come back for more help is . . .

                            Previously, we used this site just for selling eBooks only, and the paperbacks were on a different domain/site.
                            Now that they're all on the same site, we've got a slight issue when we download the orders and print out the Sales > Transactions report, where there's no column/field which specifies whether it's an ebook or paperback. Currently, the only way to tell is due to the difference in price.

                            Is there a hidden form property/field I can add to each product (in custom properties maybe?) which doesn't show anywhere on the site, but appears as a column on the Orders/Sales/Transactions reports? And it would be nice if it could also be displayed on the email confirmation receipt.

                            eg. Column Header = Ref
                            Value = P148
                            Value = E148

                            where P148 is a paperback with ISBN # 1-903687-48-9
                            and E148 tells us it's the eBook instead.

                            I know I could just put 'eBook' or 'Paperback' (or even 'E' or 'P') at the beginning or end of the product 'short description', but this will then be displayed for all the NETQUOTEVAR:PRODUCTNAME entries on each catalog product page...

                            I also know that I could uncheck "auto generate product references" in Business Settings > Options, and use our own product refs, but it's a bit late for that now (i wish i'd known about that option before i began building the database, but it didn't matter so much then when all products on the site were eBooks only). Regardless of this, it seems as though the product ref # isn't displayed on the order reports or confirmation emails (not by default anyway).

                            Any ideas?

                            Apart from all that, the site is working perfectly well.
                            Thanks once again for all your help.

                            Comment


                              #15
                              Is there a hidden form property/field I can add to each product (in custom properties maybe?) which doesn't show anywhere on the site, but appears as a column on the Orders/Sales/Transactions reports? And it would be nice if it could also be displayed on the email confirmation receipt.
                              You could maybe use the 'Enable Extended Product Description for Reports' feature in 'Business Settings | Options'. This creates a new field called 'Report Description' for your products which appears in the invoices/sales orders. Norman Rouxel (http://www.drillpine.biz/actinicstuff/) has written a patch (Additional Information in the Shopping Cart and Customer e-mail) for adding this value into the shopping cart and the email sent to customers.

                              Comment

                              Working...
                              X