Announcement

Collapse
No announcement yet.

NETQUOTEVAR in description HTML

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

    NETQUOTEVAR in description HTML

    Hi there,

    I have a table built in HTML in the description box and it looks fine, what i want to do is fill one of the cells with the NETQUOTEVAR:PRODUCTPRICE so that if the price changes the table will be updated automatically.

    I've got a feeling i will need to put something at the start of the HTML table...but i'm not sure what exactly.

    Any help would be great.

    Thanks in advance.

    Marv.

    #2
    OK, so maybe i didn't explain myself very well, here is the code i have in the description box:

    !!<
    <table width="400" border="1" cellpadding="1" cellspacing="0" bordercolor="#999999" bgcolor="FD5a0">
    <tr>
    <td width="200"><font face="Tahoma,Arial">P42HHA10ES</font></td>
    <td width="300"><font face="Tahoma, Arial">NETQUOTEVAR:PRODUCTPRICE</font></td>
    </tr>
    </table>
    >!!

    But its just showing the text 'NETQUOTEVAR:PRODUCTPRICE' instead of the price.

    Marvin.

    Comment


      #3
      Netquotevar's are only valid in Product Templates - not within the product description text. In fact NETQUOTEVAR:PRODUCTPRICE Fires off another template Act_ProductPrice.html within which the price is represented by NETQUOTEVAR:COST.

      However you can use the trick below to extract the productprice and add the JavaScript document.write code into your description.


      Most netquotevar's are only valid in certain templates (in spite of Actinic saying over 2 years ago that they would extend their scope). You can do some trickery using JavaSCript to get something from one template into onother.

      The following example shows how to get something out of the Product Price template into the general Product Line one.

      For example in Act_ProductPrice.html you can have

      <script language=JavaScript>
      var prodcost = 'NETQUOTEVAR:COST';
      </script>


      And now in Act_ProductLine.html (or in your product description embedded HTML) you can have:

      <script language=JavaScript>
      document.write(prodcost);
      </script>

      But make sure that this code follows the NETQUOTEVAR:PRODUCTPRICE as this must be executed first to set the variable. If you don't you'll get the price of the preceding product and that'll lead to chaos.

      So in your case if you want this text in the Product Description you'll have to make sure NETQUOTEVAR:PRODUCTDESCRIPTION comes after NETQUOTEVAR:PRODUCTPRICE in your Product Template.



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

      Comment


        #4
        Thanks,

        I will look into that, much appriciated

        Marvin.

        Comment

        Working...
        X