Announcement

Collapse
No announcement yet.

Formulas & Maths with Variables

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

    Formulas & Maths with Variables

    Hi guys, have done a few searches on here and cant find exactly what it is im looking for.

    Firstly is there a way to display the Price of an item within the product Full Description (so that price is shown within this text)?

    Currently im typing it myself for each individual product but when a price changes i would need to remember to change the item description to reflect it.

    for example "The blah blah blah product is one of our most popular selling items and a bargain at only [PRICE]'

    Secondly if i created a CustomVar for RRP could i then create a formula to display 'NETQUOTEVAR:PRICE - CUSTOMVAR:RRP' to show savings etc?

    for example

    Price £10.00 ('NETQUOTEVAR:PRICE)
    RRP £19.99 (CUSTOMVAR:PRICE)
    You Save £9.99 (NETQUOTEVAR:PRICE - CUSTOMVAR:RRP)

    And finally, can i display product prices in sections, if necessary using the Product ID Ref, even if i do not have 1 Product Per Section?

    Pete
    www.discoSuperstore.co.uk
    Portsmouth Sound & Light. The South's No.1 DJ Store

    #2
    Most of what you want to do can be done in V8 and V9, don't think you can in V7. Time to upgrade me thinks .

    Comment


      #3
      Surely if it can be done in 8 & 9 it can be done in 7?

      If the Actinic NETQUOTEVARS can be accessed within the description fields it should be possible via JavaScripting?

      I guess thats the main question, can NETQUOTEVARS be accessed within descriptions etc? If so how?

      To be honest we have been 'umming' and 'arring' as to whether to upgrade Actinic or to move away from it to something supporting Real-Time stock management and that can be integrated with the current systems within the premises. (We have had this offered to us via the company that produced our POS systems, but to be honest we were happy with Actinic at the time), and all the time I can make Actinic do what i want, (or the appearance off) im happy to keep using it.

      Anymore ideas?
      www.discoSuperstore.co.uk
      Portsmouth Sound & Light. The South's No.1 DJ Store

      Comment


        #4
        I understand what your saying, but it is soo much easier in v8 & 9, simple to add to every product and if you dont use it then nothing is shown.

        I have used it on a few sites

        Comment


          #5
          Originally posted by PortsmouthS&L View Post
          ...can i display product prices in sections, if necessary using the Product ID Ref, even if i do not have 1 Product Per Section?

          Pete
          Yes - by using duplicates in the section. Such as in this lingerie site:
          http://fancylines.co.uk/acatalog/HUSTLER_Lingerie.html

          Comment


            #6
            Originally posted by PortsmouthS&L View Post
            ....for example

            Price £10.00 ('NETQUOTEVAR:PRICE)
            RRP £19.99 (CUSTOMVAR:PRICE)
            You Save £9.99 (NETQUOTEVAR:PRICE - CUSTOMVAR:RRP)
            ...
            Keep it simple. The easiest way to do this is to design your Product template so that the Price, RRP and Saving etc. are outside the description portion which I can't see making a lot of difference to the appearance. Then as you say use two CVs to display the RRP and Saving. You can use excel to calculate these fields as required and import them into Actinic.

            Comment


              #7
              Well i guess that covers your questions

              Comment


                #8
                Surely if it can be done in 8 & 9 it can be done in 7?
                In V8/9 you would use

                ... available for only £[ProductPriceRaw]...

                Job done. Also arithmetic is easy using Actinic's built-in PHP.

                In V7 you would need something like:

                Getting the actual value of NETQUOTEVAR:COST into Act_ProductLine.html (without expanding NETQUOTEVAR:PRODUCTPRICE)

                In this scenario we want to get the product price into the description text.

                Since NETQUOTEVAR:COST is only expanded inside Act_ProductPrice.html it is quite
                tricky to get a numerical value of the cost into Act_ProductLine without displaying the ProductPrice code.

                The following will achieve this.

                In Act_ProductLine.html just after NETQUOTEVAR:PRODUCTFORMBEGIN put:-
                Code:
                	<script language=JavaScript>/* NETQUOTEVAR:PRODUCTPRICE */
                        cost = cost.replace(/&#38;#163;/g,"");   // strip pound sign
                        cost = cost.replace(/&#38;#44;/g,"");    // strip any commas
                        cost = cost.replace(/&#38;#46/g,".");   // fix decimal point
                        </script>
                And Act_ProductPrice becomes:-
                Code:
                <!-- ProductPrice HTML begin -->
                <!-- This template is used for the product price text. -->
                
                <br><span class="actxsmall"><b><Actinic:RETAIL_PRICE_TEXT>NETQUOTEVAR:PRICEPROMPT</Actinic:RETAIL_PRICE_TEXT>&nbsp;NETQUOTEVAR:DISCOUNT_QUANTITY&nbsp;NETQUOTEVAR:COST</b></span><span class="actxxsmall">NETQUOTEVAR:TAXMESSAGE</span>
                
                <!-- use a dummy tag to hide the code on normal pages javascript end / begin comments  to break out of the comments the Act_ProductLine code created -->
                <duff */ var cost='NETQUOTEVAR:COST'; /* >
                
                <!-- This template is used for the product price text. -->
                <!-- ProductPrice HTML end -->
                And in your Product Description put

                ...available for only !!<<script>document.write(cost);</script>>!!...


                Simple, eh! Best move to V9.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment

                Working...
                X