Announcement

Collapse
No announcement yet.

tracking orders

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

    tracking orders

    i'm writing tracking code in php. my php logs orders to a mysql database, all is dandy, however...

    NETQUOTEVAR:PRODUCTNAME which appears in act_shoppingcartxml.html

    is the iterating variable i want to use, tracking every time that item appears in a cart. this NETQUOTEVAR:PRODUCTNAME contains a link too, and html. is there a similar netquotevar without the link?

    or is there a better way to track the name of a product, as someone purchses it?

    #2
    Can't see a usable variable in the advanced user guide that displays the product name only in the shoppingCartXml template. Can't you just use strip_tags() to get at the raw product name?
    www.gbradley.co.uk
    Web Development, Actinic Patches, Scripts & more

    Comment


      #3
      i did,

      i pass variables to my loggin code like this:

      <script src="/insert.php?qprodname=NETQUOTEVAR:PRODUCTNAME&qprodid=NETQUOTEVAR:PRODREF" type="text/javascript"></script>

      probably not teh smartest way to do it, but i couldnt think of any other way to do it.

      however, NETQUOTEVAR:PRODUCTNAME has double speechmarks in it. and wont go through the url properly.

      edit: and i cant find the code that puts them in, anywhere!

      Comment


        #4
        What about something like

        <script>
        var name = ('NETQUOTEVAR:PRODUCTNAME').replace(/(<([^>]+)>)/ig,'');
        document.write('<img src="/insert.php?qprodname='+name+'&qprodid=NETQUOTEVAR:PRODREF" style="height:1px;width:1px" />')
        </script>
        Last edited by Kermy; 25-May-2006, 03:05 PM. Reason: Correction
        www.gbradley.co.uk
        Web Development, Actinic Patches, Scripts & more

        Comment


          #5
          javascript, its picky about single or double quotes? which one is favoured?

          Comment


            #6
            holy crabcakes. it works.

            you're a hero. i'd not thought of using an image.

            Comment


              #7
              Either single or double is fine, i tend to use double quotes for HTML tags and single for JS strings but it really doesn't matter.

              Glad it works
              www.gbradley.co.uk
              Web Development, Actinic Patches, Scripts & more

              Comment

              Working...
              X