Announcement

Collapse
No announcement yet.

brochure page-display cart and line breaks

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

    brochure page-display cart and line breaks

    Hi there,
    I'm using te code below to display the cart value etc. on my pages, but for some reason, it doesn't seem to work on the brochure pages e.g.:
    http://www.sayitonmobile.com/acatalog/home.htm
    But it works on the other pages. Secondly, there are two <br> tags on the output for this page, they aren't in the brochure template or anywhere else that I can find. Any ideas would be most appreciated!
    cheers,
    Alex


    NETQUOTEVAR:CARTCOOKIEITEMS
    <script language="JavaScript">
    <!--
    document.write(getCartItem(3));
    // -->
    </script><br> NETQUOTEVAR:CARTCOOKIEVALUE
    <script language="JavaScript">
    <!--
    document.write(getCartItem(1));
    // -->
    </script>

    #2
    Hi Alex,

    1)The function getCartItem() is defined in actinicextras.js file. Can you check whether you have got the following code

    <SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>

    between <HEAD></HEAD> of the Brochure Primary template.

    2)Can you let me know where exactly you see the linebreaks?It is worth checking the fragment layouts as well.

    Comment


      #3
      If the tags definately aren't in the template, they will probably be created by Actinic's Perl code. The best way to find elusive <BR /> tags is to go to Design > Text, search for <BR /> and add a number after each instance you find (eg <BR />1, <BR />2 etc). Preview your page and you should see which numbered tag is displayed - you can then remove it from Design > Text.
      www.gbradley.co.uk
      Web Development, Actinic Patches, Scripts & more

      Comment


        #4
        Hi guys,
        thanks for the advice, I solved this in the end by using the following code which seems to work in all 3 of the templates I've changed:
        Items: <script language="JavaScript">
        <!--
        document.write(getCartItem(3));
        // -->
        </script><br>Value:
        <script language="JavaScript">
        <!--
        document.write(getCartItem(1));
        // -->
        </script>

        I solved the linebreak issue by just altering the style sheet to reduce the amount of margin - e.g. on my main content div, I just set the margin-top to be less than it was to override the br's
        that's a bit of a hack I know but seems to work, but the ideas above seem like the proper way to do it.

        Just a note also to say that if your developing a store for a client, make sure you develop it on the right version. I developed this site first in v7, and it was a real nightmare to bring it back to v6 when the client decided not to upgrade!

        Comment

        Working...
        X