close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

no sales tax on specific charge

Thread began 10/17/2013 9:25 am by bryan107833 | Last modified 10/18/2013 9:32 am by Jason Byrnes | 898 views | 7 replies |

bryan107833

no sales tax on specific charge

I have added a charge to ecart for a $5 donation for breast cancer awareness month but I do not want tax charge on this donation. Can you please tell me what to add to the following to have tax not charge on this donation? Thank you.

//eCart Rule
function WAEC_cali_cart_NationalBreastCancerFoundationDonation() {
$totalCharge = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['breast'])?$_SESSION['breast']:"") == "1"))) {
$totalCharge += 5.00;//Result
}
return WA_eCart_FormatNumber($totalCharge, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule

Sign in to reply to this post

Jason ByrnesWebAssist

to have taxable and non taxable items in the cart, you will need to add a new column to the eCart object named taxable


in the add to cart button, set the value for the taxable column to 1 for items that should be taxed and 0 for items that should not be taxed

Then in the eCart object, set the tax rule up on the tax tab.

Set the trigger to "Number of items With A Specific Column value":
If the total Number of items where 'taxable' has a value of '1' is '>' than a value of '0'


Set the calculation to "based on items with a specific value":
Total of 'TotalPrice' where 'taxable' has a value of '1' 'times' '.10'

replace '.10' with the correct tax rate you wish to use.

Sign in to reply to this post

bryan107833

If I add this column do I need to re-add all of my add to cart buttons on the many pages of static products? i.e. if I add this column to the cart and then have all of my product page having old add to cart behaviors that do not include this column will there be a problem? Can I set the default taxable universally to "taxable"? I only need this one item (the donation) to be untaxed. Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, you will need to edit the add to cart buttons on all your page.

no there is not a way to do this universally.

Sign in to reply to this post

bryan107833

I am thinking I could do a global find & replace through Dreamweaver as follows -

Find:
$ATC_itemdiscountable = "";// column binding

and replace with:
$ATC_itemdiscountable = "";// column binding
$ATC_itemtaxable = "1";// column binding

Sign in to reply to this post

Jason ByrnesWebAssist

that code will not be added to your pages until you edit the add to cart button behavior.

you will not be able to find that line because it will not exist yet, and tat is not the only change that will be made on editing the add to cart button behavior.

Sign in to reply to this post

bryan107833

One last thought. I am already setting a session variable "breast" to trigger the charge for the donation. Is there not an easier way to simply add to the tax trigger if session "breast" equals "1" then no tax? Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

doing it that way would cause no tax to be applied if the donation is in the cart and another taxable item is also in the cart, surely you would want to be able to tax the taxable item if they add both to the cart?


the way to handle taxes for specific items is to add the taxable column and mark the items as taxable or not.

that allows you to add both the taxable and non taxable item to the cart at the same time and apply the appropriate tax based on the subtotal of the taxable items.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...