Announcement

Collapse
No announcement yet.

You Save ...

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

    You Save ...

    Hi Guys

    I am using the you save function from the AUG and I have a price was £5.99 now £4.99 and says you save 2% which is wrong I have checked the code and it says $rawprice = $rawprice * 1.175; // 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) ) which means that the vat is still at 17.5% what do I need to change the 1.175 to as I have tried 2.200 and 1.200 and it makes the whole you save line disappear on the product preview screen then ??? any help much appreciated
    Steven Morgan
    Cosmetics4u
    http://www.cosmetics4uonline.co.uk

    #2
    Change 1.175 to 1.2 and that should be it. If nothings showing you've done something else wrong and you'll need to post the entire lump of code you're using so we can see it.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman

      Done that and comes up Was £5.99 You Save 0%

      here is the code

      <actinic:block php="true">
      $rrp = <actinic:variable name="RRP" selectable="false" />;
      $rawprice = <actinic:variable name="ProductPriceRaw" selectable="false" />;
      $rawprice = $rawprice * 1.2; // 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 "Was £$rrp - you save $savepercent%";
      }
      </actinic:block>
      Steven Morgan
      Cosmetics4u
      http://www.cosmetics4uonline.co.uk

      Comment


        #4
        Try deleting the line where the vat is multiplied.

        4.99 x 1.2 = 5.99 (as close as)
        So 5.99 - 5.99 is zero

        Comment


          #5
          As Duncan says, your rrp and actual price are probably within a fraction of a penny, so the code thinks there's a saving. However it's below 0.5% and this displays as 0 as we're only showing integer savings.

          You could change the line:
          Code:
          echo "Was £$rrp - you save $savepercent%";
          To be:
          Code:
          if ( $savepercent > 0 ) echo "Was £$rrp - you save $savepercent%";
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment

          Working...
          X