Jump to content

Tax


jka

Recommended Posts

I may have nibbled on this topic before. Any chance to suppress the TAX until the user signs in or enters a valid billing or shipping address? Right now it pulls the default State of the business and displays it. This is confusing for some domestic and overseas customers.

From content.checkout.medium-up.php

        {foreach from=$TAXES item=tax}
         <tr>
            <td colspan="4"></td>
            <td>{$tax.name}{$CUSTOMER_LOCALE.mark}</td>
            <td class="text-right">{$tax.value}</td>
         </tr>
         {/foreach}
        

Link to comment
Share on other sites

Ok. Managed to fix this in the content.checkout.medium-up.php

Now the default tax doesnt show up when a customer is poking around. Also the Shipping rates display the default State and Country for the initial quote and Estimates.

The modifications and additions highlights in "RED"

 {if isset($SHIPPING)}
         <tr>
            <td colspan="4">
               {$LANG.basket.shipping_select}: {$ESTIMATES.state}  {$ESTIMATES.country}
               <select name="shipping">
                  <option value="">{$LANG.form.please_select}</option>
                  {foreach from=$SHIPPING key=group item=methods}
                  {if $HIDE_OPTION_GROUPS ne '1'}
                  <optgroup label="{$group}">{/if}
                     {foreach from=$methods item=method}
                     <option value="{$method.value}" {$method.selected}>{$method.display}</option>
                     {/foreach}
                     {if $HIDE_OPTION_GROUPS ne '1'}
                  </optgroup>
                  {/if}
                  {/foreach}
               </select>
            </td>
            <td>{$LANG.basket.shipping}
               {if $ESTIMATE_SHIPPING}
               (<a href="#" onclick="$('#getEstimate').slideToggle();">{$LANG.common.estimated}</a>)
               <div id="getEstimate" class="hide panel callout">
                  <h4><svg class="icon right" id="getEstimateClose" onclick="$('#getEstimate').slideUp();"><use xlink:href="#icon-times"></use></svg>{$LANG.basket.specify_shipping}</h4>
                  <label for="estimate_country">{$LANG.address.country}</label>
                  <select name="estimate[country]" id="estimate_country"  class="nosubmit country-list" rel="estimate_state">
                     {foreach from=$COUNTRIES item=country}<option value="{$country.numcode}" {$country.selected}>{$country.name}</option>{/foreach}
                  </select>
                  <label for="estimate_state">{$LANG.address.state}</label>
                  <input type="text" name="estimate[state]" id="estimate_state" value="{$ESTIMATES.state}" placeholder="{$LANG.address.state}">
                  <label for="estimate_postcode">{$LANG.address.postcode}</label>
                  <input type="text" value="{$ESTIMATES.postcode}" id="estimate_postcode" placeholder="{$LANG.address.postcode}" name="estimate[postcode]">
                  <input type="submit" name="get-estimate" class="button expand" value="{$LANG.basket.fetch_shipping_rates}">
                  <script type="text/javascript">
                  var county_list = {$STATE_JSON};
                  </script>
               </div>
               {/if}
            </td>
            <td class="text-right">{$SHIPPING_VALUE}</td>
         </tr>
         {/if}
          
    {if $IS_USER}      
         {foreach from=$TAXES item=tax}
         <tr>
            <td colspan="4"></td>
            <td>{$tax.name}{$CUSTOMER_LOCALE.mark}</td>
            <td class="text-right">{$tax.value}</td>
         </tr>
         {/foreach}
    {/if}    

Link to comment
Share on other sites

Ok. While it works perfectly for someone poking around or if the user is a registered user, the tax doesnt display for the store State if the user is not a registered user during checkout. Need to find something other than $IS_USER

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...