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: 53
    Last Post: 10 May 2013, 07:02 PM
  2. TaxCloud vs Tax Rates?
    By sewingzfun in forum All Other Contributions/Addons
    Replies: 33
    Last Post: 9 Sep 2012, 01:41 AM
  3. v150 HTTP:500 error TaxCloud mod
    By anoopd in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 15 Mar 2012, 01:52 AM
  4. TaxCloud - Is any one using this??
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 29 Oct 2011, 04:50 AM
  5. Product quantity price discounts & group discounts
    By Richard.Tung in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 11 Jun 2009, 03:24 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
  •