Announcement

Collapse
No announcement yet.

Red / Bold RRP savings

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

    Red / Bold RRP savings

    RRP Savings

    I have followed the instructions to enable this from the Advanced User Guide for V10....I have done it and it works fine, however, I was wondering what I needed to do to make the words or the numbers stand out a little more, say making them bold or red for example ?

    <actinic:block php="true">
    $rrp = <actinic:variable name="RRP" selectable="false" />;
    $rawprice = <actinic:variable name="ProductPriceRaw" selectable="false" />;
    $rawprice = $rawprice * 1.20; // add in vat if showing VAT inc prices
    // only display is we have an RRP and there's a saving to show
    if ( ($rrp != 0) && ($rrp > $rawprice) )
    {
    $savepercent = round((($rrp - $rawprice) / $rrp) * 100);
    echo "RRP £$rrp - you save $savepercent%";
    }
    </actinic:block>
    Baby Bedding, Nursery Bedding & Baby Stuff for your little ones...

    #2
    Change:
    Code:
    echo "RRP £$rrp - you save $savepercent%";
    To be (quickest way):
    Code:
    echo "<span style=\"color:red; font-weight:bold\">RRP £$rrp - you save $savepercent%</span>";
    Or (cleanest code)
    Code:
    echo "<span class=\"myrrp\">RRP £$rrp - you save $savepercent%</span>";
    And add some CSS like:
    Code:
    .myrrp {color: red; font-weight: bold;}
    To the Actinic Stylesheet.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi,

      Thanks for the reply. I tried both ways and for some reason when I change the line

      echo "RRP £$rrp - you save $savepercent%";

      It doesn't display anything at all either way you suggested. Any ideas ?

      Thanks again,
      Baby Bedding, Nursery Bedding & Baby Stuff for your little ones...

      Comment


        #4
        I think Norman has missed a > in that before the RRP (in each version)?

        (I'm not 100% sure of the position of the missing >, btw!)
        Tracey

        Comment


          #5
          I've added them in where they should be.

          Comment


            #6
            That's done it, thanks everyone.
            Baby Bedding, Nursery Bedding & Baby Stuff for your little ones...

            Comment


              #7
              Is it possible to use this at section level? When customers are placing the product price at section level?

              Comment


                #8
                Yes, you just need to use Blocks on product list and product price to get it as per standard SPP method when using subsections.

                Comment


                  #9
                  Oh right. Cheers

                  Comment


                    #10
                    Is this the correct code to wrap around to make it work at section level? kind works but then Actinic sometimes flags errors on upload

                    Code:
                    <actinic:block php="true" type="ProductList" ><actinic:block type="PriceList" >
                    $rrp = <actinic:variable name="RRP" selectable="false" />;
                    $rawprice = <actinic:variable name="ProductPriceRaw" selectable="false" />;
                    $rawprice = $rawprice * 1.20; // add in vat if showing VAT inc prices
                    // only display is we have an RRP and there's a saving to show
                    if ( ($rrp != 0) && ($rrp > $rawprice) )
                    {
                    $savepercent = round((($rrp - $rawprice) / $rrp) * 100);
                    echo "RRP £$rrp - you save $savepercent%";
                    }
                    </actinic:block></actinic:block>

                    Comment

                    Working...
                    X