Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2012
    Posts
    2
    Plugin Contributions
    0

    Idea or Suggestion TaxCloud and Discounts

    I was hoping someone on the forum may be able to help me solved a problem I am having with TaxCloud and my zencart v1.50 site.

    With the help of one of TaxCloud support specialists I was able to modify the orders.php and func.taxcloud.php in order to calculate tax on an order AFTER a manufacturers discount had to been applied to the order.

    The problem I am having now... when a customer puts in a coupon code during step 2 of checkout and hits the enter key to apply the code, everything works as it should and the tax is recalculated with the new discount price. BUT if the customer types the coupon code in step 2 of checkout then clicks "continue checkout", step 3 of checkout will show the coupon code has been applied and the amount has been taken off of the sub-total but the tax is not recalculated according to the code I have below. I know it may seem a bit convoluted and I am having a difficult time putting the process into words nonetheless some help would be greatly appreciated!!!

    What can I change in either php page in order to tell the cart to apply the new code even if "continue checkout" is clicked rather than the coupon code be applied then "continue checkout" clicked?

    The following modifications were done in order to make this process work up to its current point...

    Order.php (Around line 600):

    $discount_per_product = 0;
    if ($this->info['coupon_code']) {
    $coupon_query = "SELECT coupon_type, coupon_amount from " . TABLE_COUPONS . " where coupon_code ='" . $this->info['coupon_code'] . "'";
    $coupon_results = $db->Execute($coupon_query);
    $coupon_amount = $coupon_results->fields['coupon_amount'];

    $discount_per_product = $coupon_amount;
    }

    $tax = func_taxcloud_lookup_tax( $this->products, $shippingAddress, $err, $this->info['shipping_cost'], $selectedCert, $discount_per_product );
    }

    Func.Taxcloud.php (Around line 170):

    if($product['id'] == 16) {
    $price = ($product['final_price'] - ($discount_per_product / $product['qty']));
    }
    else{
    $price = ($product['final_price']);}
    $cartItem->setPrice($price); // Price of each item
    $cartItem->setQty($product['qty']); // Quantity

    $cartItems[$index] = $cartItem;
    Last edited by abs0lutezer0; 20 Aug 2012 at 04:25 PM.

  2. #2
    Join Date
    Aug 2012
    Posts
    2
    Plugin Contributions
    0

    Default Re: TaxCloud and Discounts

    I'm still struggling with this issue... can anyone lend a hand?

 

 

Similar Threads

  1. TaxCloud Addon
    By Tapper in forum Addon Payment Modules
    Replies: 158
    Last Post: 6 May 2022, 11:48 AM
  2. v154 Question regarding Taxcloud
    By dfontana in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 4 May 2015, 11:42 PM
  3. v154 TaxCloud Tax Exemptions
    By Luke Galyan in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 20 Mar 2015, 03:09 AM
  4. v151 Should TaxCloud be passing State Code or State name to TaxCloud for verification?
    By RCwebdev in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 9 Dec 2013, 10:16 PM
  5. v150 Taxcloud and TICs
    By Sanguinarius in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 7
    Last Post: 1 Apr 2013, 06:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR