Announcement

Collapse
No announcement yet.

A few problems using Tax 1 and Tax 2

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

    A few problems using Tax 1 and Tax 2

    Hi
    I am using both Tax 1 to apply VAT to some of the products in my site.
    For other products I am using Tax 2 and allowing exemption on this tax treatment as some of my products are eligiable for VAT relief when purchased by customers with a disability.
    What I want to achieve is to allow the customer to remove the element of VAT applied to their order in the shopping cart when the cart contains at least one product where the tax treatment is determined by allocation to Tax 2. This is working to some extent but I have a few problems that I was hoping to get some advise on.

    1. In the shopping cart the Tax 1 and Tax 2 where being displayed on separate lines (when at least one product with each treatment was in the cart). I wanted to show the VAT as one amount on one line. James M provided me with the following solution to this (THANKS VERY MUCH JAMES!):

    Edit Act_ShoppingCartxml.html in notepad.

    1. Remove the code from <Actinic:REMOVE TAG="Tax1Row"> to <Actinic:Remove>
    2. Remove the code from <Actinic:REMOVE TAG="Tax2Row"> to <Actinic:Remove>
    3. Then add the following

    <TR>
    <TD ALIGN=RIGHT
    COLSPAN="NETQUOTEVAR:PRICECOLSPAN"><B><SPAN
    CLASS="actxsmall">NETQUOTEVAR:TAX<Actinic:REMOVE
    TAG="Tax1Row">1</Actinic:REMOVE><Actinic:REMOVE
    TAG="Tax2Row">2</Actinic:REMOVE>CAPTION</SPAN></B></TD>
    <TD ALIGN=RIGHT
    BGCOLOR="NETQUOTEVAR:CHECKOUTBG"><SPAN
    CLASS="actxsmall">NETQUOTEVAR:TAX<Actinic:REMOVE
    TAG="Tax1Row">1</Actinic:REMOVE><Actinic:REMOVE
    TAG="Tax2Row">2</Actinic:REMOVE></SPAN></TD>
    NETQUOTEDEL:REMOVE
    <TD ALIGN="CENTER"
    ROWSPAN="NETQUOTEVAR:REMOVEROWSPAN">&nbsp;</TD>
    NETQUOTEDEL:REMOVE
    </TR>

    Now if you edit ActinicOrder.Pm using notepad

    1. Replace: @Response = FormatPrice($nTax1, $::TRUE, $::g_pCatalogBlob);
    with
    @Response = FormatPrice($nTax1 + $nTax2, $::TRUE,
    $::g_pCatalogBlob);

    2. Replace: @Response = FormatPrice($nTax2, $::TRUE, $::g_pCatalogBlob);
    with
    @Response = FormatPrice($nTax1 + $nTax2, $::TRUE,
    $::g_pCatalogBlob);

    3. Search: $hVariables{$::VARPREFIX . 'TAX2'} =
    ACTINIC::EncodeText2($sTax2);

    Next to this line you have } after this you add the following

    $hVariables{$::VARPREFIX . 'TAXCAPTION'} = '';
    $hVariables{$::VARPREFIX . 'TAX12CAPTION'} =
    $hVariables{$::VARPREFIX . 'TAX1CAPTION'};
    $hVariables{$::VARPREFIX . 'TAX'} = '';
    $hVariables{$::VARPREFIX . 'TAX12'} =
    $hVariables{$::VARPREFIX . 'TAX1'};


    This has achieved the aim, but has left me with a further problem. Now when the shopping cart is empty I get the following line appearing (underneath the text supplied via the prompt):
    NETQUOTEVAR:TAXCAPTION NETQUOTEVAR:TAX

    I know this is something to do with the extra lines of code added to ActinicOrder.Pm and I have tried to enclose them in an if statment with a condition that the value of either Tax 1 or Tax 2 is greater than 0 so that it does not appear in the cart if there are no products in it, but to no avail I'm affraid. Can anyone help me here please?

    In addition I was hoping to be able to achieve the following:
    1. For the message and checkbox allowing the customer to exempt themselves from the tax in the checkout process to only appear when the cart contains a product which is allocated to the tax treatment of Tax 2 (i.e. the one where I allow exemption). Currently is appears even if there is only products allocated to Tax 1 (i.e. no exemption allowed) in the cart.

    2. For the value of the exemption checkbox offered to the customer to be dropped from the 'Remember me' facility as I always want the order to contain the full amount of VAT applicable when the customer enters the checkout process (currently, if the customer has previously been throught the checkout using the 'Remember Me' and claimimg the exemption then the exemption is applied to all furture orders).

    Thanks in anticipation to anyone wo can help me here.
    Steve Pritchard
    Inclusive Technology
    http://www.inclusive.co.uk/catalogue/index.html

    #2
    Hi there

    I'm not too if 1 and 2 can be achieved, i will ask the development team regarding this.

    Kind Regards
    Nadeem Rasool
    SellerDeck Development

    Comment


      #3
      Hi Nadeem,

      Thanks very much. Looking forward to any solution the team may be able to offer me here.
      Steve Pritchard
      Inclusive Technology
      http://www.inclusive.co.uk/catalogue/index.html

      Comment


        #4
        Hi there,

        I have got some information for the following:

        > I know this is something to do with the extra lines of code added to
        > ActinicOrder.Pm and I have tried to enclose them in an if statment with
        > a condition that the value of either Tax 1 or Tax 2 is greater than 0
        > so that it does not appear in the cart if there are no products in it,
        > but to no avail I'm affraid. Can anyone help me here please?
        The solution is as follows:
        Search ActinicOrder.pm the following lines

        #
        # if the cart is empty, just print a blank line
        #
        if ($nLineCount == 0)
        {
        $ACTINIC::B2B->SetXML("EmptyCartLine", 1);
        $ACTINIC::B2B->SetXML("OrderLine", "");
        }

        replace these lines with

        #
        # if the cart is empty, just print a blank line
        #
        if ($nLineCount == 0)
        {
        $ACTINIC::B2B->SetXML("EmptyCartLine", 1);
        $ACTINIC::B2B->SetXML("OrderLine", "");
        $ACTINIC::B2B->SetXML("NoTaxLineRequired", 0);
        }
        else
        {
        $ACTINIC::B2B->SetXML("NoTaxLineRequired", 1);
        }


        Update Act_ShoppingCartXML.html

        Edit your Act_ShoppingCartXML.html and where as before we asked you to put in the following information:
        <TR>
        <TD ALIGN=RIGHT
        COLSPAN="NETQUOTEVAR:PRICECOLSPAN"><B><SPAN
        CLASS="actxsmall">NETQUOTEVAR:TAX<Actinic:REMOVE
        TAG="Tax1Row">1</Actinic:REMOVE><Actinic:REMOVE
        TAG="Tax2Row">2</Actinic:REMOVE>CAPTION</SPAN></B></TD>
        <TD ALIGN=RIGHT
        BGCOLOR="NETQUOTEVAR:CHECKOUTBG"><SPAN
        CLASS="actxsmall">NETQUOTEVAR:TAX<Actinic:REMOVE
        TAG="Tax1Row">1</Actinic:REMOVE><Actinic:REMOVE
        TAG="Tax2Row">2</Actinic:REMOVE></SPAN></TD>
        NETQUOTEDEL:REMOVE
        <TD ALIGN="CENTER"
        ROWSPAN="NETQUOTEVAR:REMOVEROWSPAN">&nbsp;</TD>
        NETQUOTEDEL:REMOVE
        </TR>

        Simply put the surrounds tags for Actinic:Remove, so it should be like the following:

        <Actinic:REMOVE TAG="NoTaxLineRequired">

        <TR>
        <TD ALIGN=RIGHT
        COLSPAN="NETQUOTEVAR:PRICECOLSPAN"><B><SPAN
        CLASS="actxsmall">NETQUOTEVAR:TAX<Actinic:REMOVE
        TAG="Tax1Row">1</Actinic:REMOVE><Actinic:REMOVE
        TAG="Tax2Row">2</Actinic:REMOVE>CAPTION</SPAN></B></TD>
        <TD ALIGN=RIGHT
        BGCOLOR="NETQUOTEVAR:CHECKOUTBG"><SPAN
        CLASS="actxsmall">NETQUOTEVAR:TAX<Actinic:REMOVE
        TAG="Tax1Row">1</Actinic:REMOVE><Actinic:REMOVE
        TAG="Tax2Row">2</Actinic:REMOVE></SPAN></TD>
        NETQUOTEDEL:REMOVE
        <TD ALIGN="CENTER"
        ROWSPAN="NETQUOTEVAR:REMOVEROWSPAN">&nbsp;</TD>
        NETQUOTEDEL:REMOVE
        </TR>

        </Actinic:REMOVE>
        The development team is still looking into the other two issues.

        Kind Regards
        Nadeem Rasool
        SellerDeck Development

        Comment


          #5
          Hi Nadeem,
          Thanks for the solution provided. Look forward to receiving any assistance that can be offered with the other two issues.
          Steve Pritchard
          Inclusive Technology
          http://www.inclusive.co.uk/catalogue/index.html

          Comment


            #6
            Hi there

            Even better, here is the perlmodule attached so you can put it in your site1 folder. May i suggest first backing up your old ActinicOrder.pm and then putting this file in.

            Please note that this file does not contain the changes described earlier in this thread.

            To merge the changes into the earlier patched ActinicOrder.pm, replace the
            lines between...

            sub ParseDelimiterStatus

            and...

            sub IsPhaseHidden

            Kind Regards
            Attached Files
            Nadeem Rasool
            SellerDeck Development

            Comment

            Working...
            X