Announcement

Collapse
No announcement yet.

Adding View Cart ?

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

    Adding View Cart ?

    My client has a need for a non actinic 'Products' page (against my advice)

    I want to add the Cart Contents display into a PHP page. I assume this is included into 'Act_Primary.html', but I cannot find exactly what I need to add or even whether it is possible ?

    Hopefully someone can point me in the right direction ?

    Thanks ...

    #2
    Add the following into your non Actinic page

    Code:
    <div>
    document.write("Cart Contents:&nbsp;&nbsp;&nbsp;&nbsp;Items:&nbsp;"
    + getCartItem(3)+"&nbsp;&nbsp;&nbsp;");
    document.write("Value:&nbsp;" + getCartItem(1)+"&nbsp;");
    </div>
    I have used a few spaces to pad out on my site you may want to remove


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Thanks for the reply. I tried adding the code you supplied but all I get is the code displaying as text on the page:

      http://www.eurocardplayer.net/acatalog/products.php

      Looks like ASP code to me ? I am using PHP ...
      Am I missing something obvious ?

      Comment


        #4
        You need <script> tags instead of <div> tags and this is javascript.

        You could use PHP to read the cookie too but I'll leave that for you.

        You'd probably add this to the Act_Primary.html template and be aware that any PHP/ASP/Non Javascript will not be parsed when the page is being run dynamically (such as when logged into accounts, or search highlighted, for example). In those cases it would be printed literally.
        Hope this helps.
        http://www.johnsons-seeds.com - Actinic plugins, remote add to cart and custom CMS
        http://www.dtbrownseeds.co.uk - More seeds and plants....
        http://www.mr-fothergills.co.uk - Well it used to be Actinic...

        Comment


          #5
          Not sure why the copy and paste did not include the script function before ... here it is again :

          Code:
          <div>
          <script language="JavaScript">
          document.write("Cart Contents:&nbsp;&nbsp;&nbsp;&nbsp;Items:&nbsp;"
          + getCartItem(3)+"&nbsp;&nbsp;&nbsp;");
          document.write("Value:&nbsp;" + getCartItem(1)+"&nbsp;");
          </script>
          </div>


          Bikster
          SellerDeck Designs and Responsive Themes

          Comment


            #6
            Thanks both for your help, got it working now

            Comment

            Working...
            X