Page 20 of 66 FirstFirst ... 10181920212230 ... LastLast
Results 191 to 200 of 657
  1. #191
    Join Date
    Apr 2008
    Location
    internet
    Posts
    41
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    exactly which values ?
    tax per each product ?
    tax on total ?
    [ updates | coding | maintenance | bug fixes | dedicated servers ]

  2. #192
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    Rumbling along.... It would seem like - in edit_orders.php - that it would be smarter to use table orders_products instead of table orders_total, because the former contains real tax values. Assuming one wants to solve the problem!

    Forgot to mention that "order totals" is the area, which doesn't work! Every different tax class has the same value. It is the correct value for one of the tax classes, but now it's "everywhere".
    Last edited by kalastaja; 9 Feb 2011 at 10:25 AM. Reason: Clarified

  3. #193
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    Quote Originally Posted by kalastaja View Post
    Rumbling along.... It would seem like - in edit_orders.php - that it would be smarter to use table orders_products instead of table orders_total, because the former contains real tax values. Assuming one wants to solve the problem!

    Forgot to mention that "order totals" is the area, which doesn't work! Every different tax class has the same value. It is the correct value for one of the tax classes, but now it's "everywhere".
    Somewhere in the old support thread are Scott's old messages on taxes and Edit Orders WHY it's not as "easy" a fix as it appears (and thus why he did not address this). If I get some time I'll try to look them up and post 'em (I may have already post some of these links here). If you want a FULL understanding of the issue, you should search the old support thread for the search terms "taxes" and "sturner"..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #194
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    OK, but using table orders_products instead of table orders_total to keep the taxes apart, would seem a good way to go!? What then remains is to update the table orders_total with the new values. Yes?

  5. #195
    Join Date
    Apr 2008
    Location
    internet
    Posts
    41
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    can u show an example of how u want the total to display ?

    Because im not understanding what you are trying to acheive.
    Do u want to use different tax classes for the products or display different (multiple) tax totals ?
    In the current edit_orders it will only display 1 tax total called "ot_tax", as it overwrites.

    edit_orders 3.5
    PHP Code:
    if ($sendtotaltoorders == 2)  {  
     
    // Update Taxes in TABLE_ORDERS
    $Query "UPDATE " TABLE_ORDERS " SET order_tax = '".ot_value."' WHERE orders_id = '".$oID."'";
    //die("Line:954: ".$Query);
    $db -> Execute($Query);



    from orders.php
    PHP Code:
          /*********************************************
           * Calculate taxes for this product
           *********************************************/
          
    $shown_price = (zen_add_tax($this->products[$index]['final_price'] * $this->products[$index]['qty'], $this->products[$index]['tax']))
          + 
    zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']);
          
    $this->info['subtotal'] += $shown_price;
          
    $this->notify('NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE', array('shown_price'=>$shown_price));
          
    // find product's tax rate and description
          
    $products_tax $this->products[$index]['tax'];
          
    $products_tax_description $this->products[$index]['tax_description'];

          if (
    DISPLAY_PRICE_WITH_TAX == 'true') {
            
    // calculate the amount of tax "inc"luded in price (used if tax-in pricing is enabled)
            
    $tax_add $shown_price - ($shown_price / (($products_tax 10) ? "1.0" str_replace('.'''$products_tax) : "1." str_replace('.'''$products_tax)));
          } else {
            
    // calculate the amount of tax for this product (assuming tax is NOT included in the price)
    //        $tax_add = zen_round(($products_tax / 100) * $shown_price, $currencies->currencies[$this->info['currency']]['decimal_places']);
            
    $tax_add = ($products_tax/100) * $shown_price;
          }
          
    $this->info['tax'] += $tax_add;
          foreach (
    $taxRates as $taxDescription=>$taxRate)
          {
            
    $taxAdd zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate)
                    +  
    zen_calculate_tax($this->products[$index]['onetime_charges'], $taxRate);
            if (isset(
    $this->info['tax_groups'][$taxDescription]))
            {
              
    $this->info['tax_groups'][$taxDescription] += $taxAdd;
            } else
            {
              
    $this->info['tax_groups'][$taxDescription] = $taxAdd;
            }
          }
          
    /*********************************************
           * END: Calculate taxes for this product
           *********************************************/
          
    $index++;
        } 
    Last edited by xcooling; 9 Feb 2011 at 02:52 PM.
    [ updates | coding | maintenance | bug fixes | dedicated servers ]

  6. #196
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread


    Yes, we do have 4 different tax classes. The only one in the picture that should contain a value other than 0 is "13%".

  7. #197
    Join Date
    Apr 2008
    Location
    internet
    Posts
    41
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    .. i can fix that. (will need array dumps or dev access)

    Are you having the following issue:
    after you edit the order, the tax values get changed / overwritten ?
    [ updates | coding | maintenance | bug fixes | dedicated servers ]

  8. #198
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    Quote Originally Posted by kalastaja View Post
    OK, but using table orders_products instead of table orders_total to keep the taxes apart, would seem a good way to go!? What then remains is to update the table orders_total with the new values. Yes?
    Again you should find Scott's old posts on this topic.. there is a VERY GOOD reason why this doesn't work the way YOU think it should work.. Now I don't remember all details of these old posts, but I do remember that multiple taxes appeared to be a LOT MORE complicated to resolve and that's why Scott never tackled it..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  9. #199
    Join Date
    Apr 2008
    Location
    internet
    Posts
    41
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    Are you having the following issue:
    after you edit the order, the tax values get changed / overwritten ?
    [ updates | coding | maintenance | bug fixes | dedicated servers ]

  10. #200
    Join Date
    Mar 2010
    Location
    Finland
    Posts
    463
    Plugin Contributions
    0

    Default Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread

    ... there is a VERY GOOD reason why this doesn't work the way YOU think it should work ...
    Might be, but then again maybe not... I assume "can be done" if I don't see any major flaw. Tax info is per product and the necessary tax values are saved in orders_products for each product. Updating the orders_total is the only hassle!

    .. i can fix that. (will need array dumps or dev access)
    What exactly are you going to fix? A new version of edit_order.php would seem enough.

    edit_orders 3.5
    Didn't see your code examples before - current question "3.5"? I'm using Edit Orders V3.03!
    Last edited by kalastaja; 9 Feb 2011 at 03:39 PM.

 

 
Page 20 of 66 FirstFirst ... 10181920212230 ... LastLast

Similar Threads

  1. v150 Edit Orders v4.0 Support Thread
    By DivaVocals in forum Addon Admin Tools
    Replies: 1877
    Last Post: 6 May 2025, 05:10 PM
  2. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 804
    Last Post: 18 Apr 2025, 12:04 AM
  3. v150 Orders Status History -- Updated By [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 29 Jul 2019, 07:05 PM
  4. v139h Super Orders v3.0 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1018
    Last Post: 28 Apr 2014, 11:38 PM
  5. RE: Super Orders v3.0 Support Thread
    By Johnnyd in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Jun 2011, 09:28 AM

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