Announcement

Collapse
No announcement yet.

Can I show VAT inclusive prices in my search results?

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

    Can I show VAT inclusive prices in my search results?

    v9 and later allows you to show VAT inclusive prices in your search results. To set this up go to 'Settings | Site Options | General panel' and set 'Use Tax Inclusive Prices for Online Search' to 'True'. This will display as:



    You can display the inclusive and exclusive prices by making a change to one of the perl scripts. Do the following:

    * ensure that 'Use Tax Inclusive Prices for Online Search' is set to 'False'

    * browse to your site folder and locate the 'SearchScript.pl' file and take a backup

    * open the file in a text editor such as notepad and search for:

    # The price formatting is a little more complex

    * Underneath it, you should see the following:

    $sTemp = "";
    if ($$::g_pSearchSetup{SEARCH_SHOW_PRICE} && # only display the price if it is on and prices are displayed
    $$::g_pSetupBlob{PRICES_DISPLAYED} &&
    $Product{PRICE} != 0)
    {
    ($status, $sError, $sTemp) = ActinicOrder::FormatPrice($Product{PRICE}, $::TRUE, $::g_pCatalogBlob);
    if ($status != $::SUCCESS)
    {
    ACTINIC::CleanupIndex($rFile);
    return($status, $sError);
    }
    }
    $ACTINIC::B2B->SetXML('S_PRICE', $sTemp);

    * replace it with:

    $sTemp = "";
    # if ($$::g_pSearchSetup{SEARCH_SHOW_PRICE} && # only display the price if it is on and prices are displayed
    # $$::g_pSetupBlob{PRICES_DISPLAYED} &&
    # $Product{PRICE} != 0)
    # {
    # ($status, $sError, $sTemp) = ActinicOrder::FormatPrice($Product{PRICE}, $::TRUE, $::g_pCatalogBlob);
    # if ($status != $::SUCCESS)
    # {
    # ACTINIC::CleanupIndex($rFile);
    # return($status, $sError);
    # }
    # }
    # $ACTINIC::B2B->SetXML('S_PRICE', $sTemp);

    if ($$::g_pSearchSetup{SEARCH_SHOW_PRICE} &&
    $$::g_pSetupBlob{PRICES_DISPLAYED} &&
    $Product{PRICE} != 0)
    {
    ($status, $sError, $sTemp) = ActinicOrder::FormatPrice($Product{PRICE}, $::TRUE, $::g_pCatalogBlob);
    if ($status != $::SUCCESS)
    {
    ACTINIC::CleanupIndex($rFile);
    return($status, $sError);
    }
    if ($Product{PRICE})
    {
    my $sTemp1;
    my $nTaxPrice = ActinicOrder::RoundTax($Product{PRICE} * 1.175, $ActinicOrder::SCIENTIFIC_NORMAL);
    ($status, $sError, $sTemp1) = ActinicOrder::FormatPrice($nTaxPrice, $::TRUE, $::g_pCatalogBlob);
    if ($status == $::SUCCESS)
    {
    $sTemp .= " Excluding VAT (" . $sTemp1 . " Including VAT)";
    }
    }
    }
    $ACTINIC::B2B->SetXML('S_PRICE', $sTemp);

    * close and save the file and update the site.

    Your search results will now look like:




    If you want to show the inclusive price first then use this code instead:

    $sTemp = "";
    # if ($$::g_pSearchSetup{SEARCH_SHOW_PRICE} && # only display the price if it is on and prices are displayed
    # $$::g_pSetupBlob{PRICES_DISPLAYED} &&
    # $Product{PRICE} != 0)
    # {
    # ($status, $sError, $sTemp) = ActinicOrder::FormatPrice($Product{PRICE}, $::TRUE, $::g_pCatalogBlob);
    # if ($status != $::SUCCESS)
    # {
    # ACTINIC::CleanupIndex($rFile);
    # return($status, $sError);
    # }
    # }
    # $ACTINIC::B2B->SetXML('S_PRICE', $sTemp);

    if ($$::g_pSearchSetup{SEARCH_SHOW_PRICE} &&
    $$::g_pSetupBlob{PRICES_DISPLAYED} &&
    $Product{PRICE} != 0)
    {
    ($status, $sError, $sTemp) = ActinicOrder::FormatPrice($Product{PRICE}* 1.175, $::TRUE, $::g_pCatalogBlob);
    if ($status != $::SUCCESS)
    {
    ACTINIC::CleanupIndex($rFile);
    return($status, $sError);
    }
    if ($Product{PRICE})
    {
    my $sTemp1;
    my $nTaxPrice = ActinicOrder::RoundTax($Product{PRICE}, $ActinicOrder::SCIENTIFIC_NORMAL);
    ($status, $sError, $sTemp1) = ActinicOrder::FormatPrice($nTaxPrice, $::TRUE, $::g_pCatalogBlob);
    if ($status == $::SUCCESS)
    {
    $sTemp .= " Including VAT (" . $sTemp1 . " Excluding VAT)";
    }
    }
    }
    $ACTINIC::B2B->SetXML('S_PRICE', $sTemp);



    SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.
    Attached Files
Working...
X