Page 168 of 179 FirstFirst ... 68118158166167168169170178 ... LastLast
Results 1,671 to 1,680 of 1787
  1. #1671
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: Edit Orders v4.0 Support Thread

    my guess is extraorderfee
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  2. #1672
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by carlwhat View Post
    my guess is extraorderfee
    Actually, it turns out that any taxable order-total exhibits this issue. See https://github.com/lat9/edit_orders/issues/198 for the upcoming changes for EO v4.6.0.

    Any site experiencing this issue can correct via edit to /YOUR_ADMIN/includes/functions/extra_functions/edit_order_functions.php, removing (or commenting out) the highlighted lines below:
    Code:
    function eo_update_database_order_totals($oID) 
    {
        global $db, $order, $eo;
    
        // Load required modules for order totals if enabled
        if (defined('MODULE_ORDER_TOTAL_INSTALLED') && !empty(MODULE_ORDER_TOTAL_INSTALLED)) {
            $eo->eoLog(PHP_EOL . 'eo_update_database_order_totals, taxes/totals on entry. ' . $eo->eoFormatTaxInfoForLog(true), 'tax');
            
            $eo->tax_updated = false;
            
            $order->info['shipping_tax'] = 0;
    
            // Load order totals.
            require_once DIR_FS_CATALOG . DIR_WS_CLASSES . 'order_total.php';
            $GLOBALS['order_total_modules'] = new order_total();
    
            // Load the shopping cart class into the session
            eo_shopping_cart();
            
            // -----
            // Cycle through the order-totals to see if any are currently taxed.  If so, remove the
            // tax from the current order in preparation for its recalculation.
            //
            foreach ($order->totals as $current_total) {
                if (in_array($current_total['class'], ['ot_subtotal', 'ot_tax', 'ot_shipping', 'ot_total', 'ot_misc_cost'])) {
                    continue;
                }
                $current_total_tax = $eo->eoGetOrderTotalTax($oID, $current_total['class']);
                $order->info['tax'] -= $current_total_tax;
            }
    
            // Reset the final total (include tax if not already tax-inc)
            // This code causes the order totals to be correctly calculated.
            if (DISPLAY_PRICE_WITH_TAX == 'true') {
                $order->info['total'] = $order->info['subtotal'] + $order->info['shipping_cost'];
            } else {
                $order->info['total'] = $order->info['subtotal'] + $order->info['tax'] + $order->info['shipping_cost'];
            }

  3. #1673
    Join Date
    Apr 2012
    Posts
    209
    Plugin Contributions
    1

    Idea or Suggestion Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by diptimoy View Post
    Herehow to processing configuration looks

    Attachment 19563
    Quote Originally Posted by Spanky View Post
    PHP Code:
      function process() {
          global 
    $order$currencies;

          if (
    MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE == 'true') {

          
    $pass true;
          if (
    MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE 0) {
    // bof: check zone and add extra fee
            
    global $db;
            
    $pass false;
            
    $check_flag false;
    // based on Delivery zone $order->delivery to use Payment zone change to $order->billing in two places
            
    $check $db->Execute("select zone_id from " TABLE_ZONES_TO_GEO_ZONES " where geo_zone_id = '" MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE "' and zone_country_id = '" $order->delivery['country']['id'] . "' order by zone_id");
            while (!
    $check->EOF) {
              if (
    $check->fields['zone_id'] < 1) {
                
    $check_flag true;
                break;
              } elseif (
    $check->fields['zone_id'] == $order->delivery['zone_id']) {
                
    $check_flag true;
                break;
              }
              
    $check->MoveNext();
            }

            if (
    $check_flag == false) {
              
    $pass false;
            } else {
              
    $pass true;
            }
    // eof: check zone and add extra fee
          
    }

            if (
    $pass == true) {
    //echo 'TEST EXTRA CHARGE PASS!';
                
    $tax_address zen_get_tax_locations();
                
    $tax zen_get_tax_rate(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS$tax_address['country_id'], $tax_address['zone_id']);
                
    $tax_description zen_get_tax_description(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS$tax_address['country_id'], $tax_address['zone_id']);

    // calculate from flat fee or percentage
                
    if (substr(MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE, -1) == '%') {
                  
    //$extra_order_fee = (($order->info['subtotal']+$order->info['shipping_cost'])* (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
                  
    $extra_order_fee =  ($order->info['subtotal'] * (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
          
                } else {
                  
    $extra_order_fee MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE;
                }

                
    $order->info['tax'] += zen_calculate_tax($extra_order_fee$tax);
                
    $order->info['tax_groups']["$tax_description"] += zen_calculate_tax($extra_order_fee$tax);
                
    $order->info['total'] += $extra_order_fee zen_calculate_tax($extra_order_fee$tax);
                if (
    DISPLAY_PRICE_WITH_TAX == 'true') {
                  
    $extra_order_fee += zen_calculate_tax($extra_order_fee$tax);
                }

                
    $this->output[] = array('title' => $this->title ':',
                                        
    'text' => $currencies->format($extra_order_feetrue$order->info['currency'], $order->info['currency_value']),
                                        
    'value' => $extra_order_fee);
            } else {
    //echo 'TEST EXTRA CHARGE NO PASS!';
            
    }
          }
        } 

  4. #1674
    Join Date
    May 2021
    Location
    New York
    Posts
    16
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    I actually don't have that file in that directory. Might it be named something else, or go somewhere else?

  5. #1675
    Join Date
    Apr 2012
    Posts
    209
    Plugin Contributions
    1

    Default Re: Edit Orders v4.0 Support Thread

    @spanky

    The file is

    ot_extraorderfee.php


    Code:
    <?php
    /**
     * ot_total order-total module
     *
     * @package orderTotal
     * @copyright Copyright 2003-2012 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: ot_extraorderfee.php 6101 2012-10-19 10:30:22Z ajeh $
     */
      class ot_extraorderfee {
        var $title, $output;
    
        function ot_extraorderfee() {
          $this->code = 'ot_extraorderfee';
          $this->title = MODULE_ORDER_TOTAL_EXTRAORDERFEE_TITLE;
          $this->description = MODULE_ORDER_TOTAL_EXTRAORDERFEE_DESCRIPTION;
          $this->sort_order = MODULE_ORDER_TOTAL_EXTRAORDERFEE_SORT_ORDER;
    
          $this->output = array();
        }
    
        function process() {
          global $order, $currencies;
    
          if (MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE == 'true') {
    
          $pass = true;
          if (MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE > 0) {
    // bof: check zone and add extra fee
            global $db;
            $pass = false;
            $check_flag = false;
    // based on Delivery zone $order->delivery to use Payment zone change to $order->billing in two places
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = true;
                break;
              } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
    
            if ($check_flag == false) {
              $pass = false;
            } else {
              $pass = true;
            }
    // eof: check zone and add extra fee
          }
    
            if ($pass == true) {
    //echo 'TEST EXTRA CHARGE PASS!';
                $tax_address = zen_get_tax_locations();
                $tax = zen_get_tax_rate(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS, $tax_address['country_id'], $tax_address['zone_id']);
                $tax_description = zen_get_tax_description(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS, $tax_address['country_id'], $tax_address['zone_id']);
    
    // calculate from flat fee or percentage
                if (substr(MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE, -1) == '%') {
                  //$extra_order_fee = (($order->info['subtotal']+$order->info['shipping_cost'])* (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
                  $extra_order_fee =  ($order->info['subtotal'] * (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
          
                } else {
                  $extra_order_fee = MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE;
                }
    
                $order->info['tax'] += zen_calculate_tax($extra_order_fee, $tax);
                $order->info['tax_groups']["$tax_description"] += zen_calculate_tax($extra_order_fee, $tax);
                $order->info['total'] += $extra_order_fee + zen_calculate_tax($extra_order_fee, $tax);
                if (DISPLAY_PRICE_WITH_TAX == 'true') {
                  $extra_order_fee += zen_calculate_tax($extra_order_fee, $tax);
                }
    
                $this->output[] = array('title' => $this->title . ':',
                                        'text' => $currencies->format($extra_order_fee, true, $order->info['currency'], $order->info['currency_value']),
                                        'value' => $extra_order_fee);
            } else {
    //echo 'TEST EXTRA CHARGE NO PASS!';
            }
          }
        }
    
        function check() {
          global $db;
          if (!isset($this->_check)) {
            $check_query = "select configuration_value
                            from " . TABLE_CONFIGURATION . "
                            where configuration_key = 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_STATUS'";
    
            $check_query = $db->Execute($check_query);
            $this->_check = $check_query->RecordCount();
          }
    
          return $this->_check;
        }
    
        function keys() {
          return array('MODULE_ORDER_TOTAL_EXTRAORDERFEE_STATUS', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_SORT_ORDER', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE');
        }
    
        function install() {
          global $db;
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_SORT_ORDER', '450', 'Sort order of display.', '6', '2', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Extra Order Fee', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE', 'false', 'Do you want to allow Extra order fees?', '6', '3', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Extra Order Fee', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE', '5.00', 'For Percentage Calculation - include a % Example: 10%<br />For a flat amount just enter the amount - Example: 5 for $5.00', '6', '5', '', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS', '0', 'Use the following tax class on the Extra order fee.', '6', '7', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Extra Charge Zone', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE', '0', 'If a zone is selected, only enable this Extra charge for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
        }
    
        function remove() {
          global $db;
          $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE\_ORDER\_TOTAL\_EXTRAORDERFEE\_%'");
    
        }
      }

  6. #1676
    Join Date
    May 2021
    Location
    New York
    Posts
    16
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    The file that he's saying to edit is what I mean

  7. #1677
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    @Spanky and @diptimoy, please refer to my response in post #1672.

  8. #1678
    Join Date
    Apr 2012
    Posts
    209
    Plugin Contributions
    1

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    @Spanky and @diptimoy, please refer to my response in post #1672.
    I did the changes as mentioned by you .@spanky will test and reply you back.

  9. #1679
    Join Date
    May 2021
    Location
    New York
    Posts
    16
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Ok so - that change made it so that when I edit shipping/product quantity everything looks good. However, if I try to edit the product price, it just ignores it and reverts back. Any ideas there?

  10. #1680
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by Spanky View Post
    Ok so - that change made it so that when I edit shipping/product quantity everything looks good. However, if I try to edit the product price, it just ignores it and reverts back. Any ideas there?
    If you're not using manual-entry pricing, the product prices are automatically calculated and override any manual entry.

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 797
    Last Post: 23 Mar 2024, 06:51 AM
  2. 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
  3. Edit Orders v3.0 for ZC 1.3.9 [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 656
    Last Post: 18 Apr 2016, 06:28 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