Announcement

Collapse
No announcement yet.

Search results inc VAT

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

    Search results inc VAT

    It seems there's a bug in v11.0.1 that means search results only display prices ex VAT. It's been fixed in v11.0.2 but that's not yet available.

    Support have given me some code to replace SearchPriceResult in the search result layout, but it's returning this parse error: (+ Parse error: parse error, expecting `')'' in main on line 1 )

    The code is below. Can anyone see the problem with the code? I need to get this up and running as a temporary fix until v11.0.2 is released as it's confusing people.

    Code:
    (+<actinic:block PHP='true' SELECTABLE='false'>formattedcurrency(round(<Actinic:Variable Name="SearchResultPrice"/> * 1.20, <actinic:variable name="CurrencyDigits" />), <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');</actinic:block>)
    Cheers
    Stuart

    #2
    That code is never going to work. Several reasons.

    1) SearchPriceResult is a formatted string with a £ sign in it. You can't do maths with it.

    2) Regardless of that, the PHP code capability is for when the page is built in your back-office PC and won't work as expected because this page is generated by Perl scripts in real-time on the server.

    You'll need either a Perl or JavaScript tweak to do this. I believe they're already on the community.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks Norman, I had a feeling that would be the case. Largely because I did a browse of the forum for similar scripts and it seems this and variations of it were used to display VAT inclusive search results in earlier versions of Actinic, which means it's highly likely it will no longer work. I guess we'll just have to wait until the release of v11.0.2.
      Cheers
      Stuart

      Comment


        #4
        This is being fixed in 11.0.2, now in beta. You may want to hang fire until it's released.

        From the v11.0.2 release notes:
        "Enabled search results to show prices inclusive of tax instead of exclusive, AC11-668"

        Comment


          #5
          Cheers Duncan, support informed me of this, but they've been unable to give a release date for now. It's frustrating but for now I've just added "+ VAT" after SearchPriceResult. It's not ideal and it's still leading to complaints (from regular customers who are confused!) but it's a halfway house of a fix.
          Cheers
          Stuart

          Comment


            #6
            Try changing this line in SearchScript.pl
            Code:
            ($status, $sError, $sTemp) = ActinicOrder::FormatPrice($Product{PRICE}, $::TRUE, $::g_pCatalogBlob);
            to:
            Code:
            ($status, $sError, $sTemp) = ActinicOrder::FormatPrice($Product{PRICE} * 1.2, $::TRUE, $::g_pCatalogBlob);
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Always the man to come up with a solution you are Norman!! Cheers for that, I'll give it a go now.

              A very small number of products on the site are exclusive of VAT (as they're publications) but this will cure the problem for the vast majority. Thanks again.
              Cheers
              Stuart

              Comment

              Working...
              X