Page 88 of 188 FirstFirst ... 3878868788899098138 ... LastLast
Results 871 to 880 of 1873
  1. #871
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,346
    Plugin Contributions
    94

    Default Re: Taxes being duplicated/removed

    @swguy, there are two EO-specific (and optionally-installed) order-total modules -- Misc. Cost and Onetime Discount -- that you can use to add or subtract a value from the order's current total.

  2. #872
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,290
    Plugin Contributions
    125

    Default Re: Taxes being duplicated/removed

    OK - onetime discount is packaged with Edit Orders but where is misc cost?
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #873
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,346
    Plugin Contributions
    94

    Default Re: Taxes being duplicated/removed

    Quote Originally Posted by swguy View Post
    OK - onetime discount is packaged with Edit Orders but where is misc cost?
    My bad; the Misc Cost total is one that I created based on the onetime discount that comes with EO, just with negative logic!

  4. #874
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,346
    Plugin Contributions
    94

    Default Re: Taxes being duplicated/removed

    There are two files associated with the "Misc Cost" order-total:

    1) /includes/languages/english/modules/order_total/ot_misc_cost.php:
    Code:
    <?php
    // -----
    // Gather any Miscellaneous Cost for an order, an order-total created by lat9
    //
    define('MODULE_ORDER_TOTAL_MISC_COST_TITLE', 'Misc. Cost');
    define('MODULE_ORDER_TOTAL_MISC_COST_DESCRIPTION', 'A miscellaneous cost associated with the order.');
    2) /includes/modules/order_total/ot_misc_cost.php:
    Code:
    <?php
    // -----
    // An order-total module to gather any miscellaneous cost associated with an order, created by lat9.
    //
    class ot_misc_cost {
    
      /**
       * The unique "code" identifying this Order Total Module
       * @var string
       */
      var $code;
    
      /**
       * The title shown for this Order Total Module
       * @var string
       */
      var $title;
    
      /**
       * The description shown for this Order Total Module
       * @var string
       */
      var $description;
    
      /**
       * The sort order at which to apply this Order Total Module
       * @var string
       */
      var $sort_order;
    
      /**
       * Indicates if this module is enabled
       * @var unknown
       */
      var $enabled;
    
      /**
       * The output from this Order Total Module
       * @var array
       */
      var $output;
    
      /**
       * Enter description here...
       *
       * @return ot_coupon
       */
      function __construct() {
        $this->code = 'ot_misc_cost';
        $this->title = MODULE_ORDER_TOTAL_MISC_COST_TITLE;
        $this->description = MODULE_ORDER_TOTAL_MISC_COST_DESCRIPTION;
        $this->sort_order = MODULE_ORDER_TOTAL_MISC_COST_SORT_ORDER;
        $this->output = array();
      }
    
      function process() {
        global $db, $currencies, $order;
    
        if(IS_ADMIN_FLAG === true && isset($_GET['oID'])) {
          $query = $db->Execute(
            'SELECT `title`, `text`, `value` ' .
            'FROM `' . TABLE_ORDERS_TOTAL . '` ' .
            'WHERE orders_id = \'' . (int)$_GET['oID'] . '\' ' .
            'AND class = \'' . zen_output_string($this->code, false, true) . '\''
          );
          if(!$query->EOF) {
            // Do we allow changing the "title"?
            if(MODULE_ORDER_TOTAL_MISC_COST_CHANGE_TITLE === 'true')
              $this->title = rtrim($query->fields['title'], ':');
    
            // Apply the discount to the order.
            $discount = (float) $query->fields['value'];
            $order->info['total'] += $discount;
            
            $products_id = $order->products[0]['id'];
            $products_info = $db->Execute ("SELECT products_tax_class_id FROM " . TABLE_PRODUCTS . " WHERE products_id = $products_id LIMIT 1");
            $products_tax_rate = zen_get_tax_rate ($products_info->fields['products_tax_class_id']);
            $order->info['total'] -= $order->info['tax'];
            $order->info['tax'] = zen_calculate_tax ($order->info['total'], $products_tax_rate);
            $order->info['total'] += $order->info['tax'];
            foreach ($order->info['tax_groups'] as $tax_description => $tax_value) {
              $order->info['tax_groups'][$tax_description] = $order->info['tax'];
              
            }
    
            // Output the order total information
            $this->output[] = array(
              'title' => $this->title . ':',
              'text' => $currencies->format($discount, true, $order->info['currency'], $order->info['currency_value']),
              'value' => (string) $discount,
            );
            unset($discount);
          }
        }
      }
    
      function check() {
        global $db;
        if (!isset($this->enabled)) {
          $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_MISC_COST_STATUS'");
          $this->enabled = $check_query->RecordCount();
        }
    
        return $this->enabled;
      }
    
      function keys() {
        return array('MODULE_ORDER_TOTAL_MISC_COST_STATUS', 'MODULE_ORDER_TOTAL_MISC_COST_SORT_ORDER', 'MODULE_ORDER_TOTAL_MISC_COST_CHANGE_TITLE');
      }
    
      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_MISC_COST_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_MISC_COST_SORT_ORDER', '411', '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 changing the title', 'MODULE_ORDER_TOTAL_MISC_COST_CHANGE_TITLE', 'false', 'Allow changing the title of the module while editing an order', '6', '3','zen_cfg_select_option(array(\'true\',\'false\'), ', now())");  }
    
      function remove() {
        global $db;
        $keys = '';
        $keys_array = $this->keys();
        for ($i=0; $i<sizeof($keys_array); $i++) {
          $keys .= "'" . $keys_array[$i] . "',";
        }
        $keys = substr($keys, 0, -1);
    
        $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");
      }
    }
    Last edited by swguy; 23 Mar 2016 at 12:59 AM. Reason: updated path to language file, sort order on module.

  5. #875
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,290
    Plugin Contributions
    125

    Default Re: Taxes being duplicated/removed

    Thanks. Because some of my OT's weren't working, I was thinking you had to do something special to add Cost to the order. (Turns out the issue was I was doing checks of session variables that would have been set during normal checkout on the catalog side but are absent during admin edit.)

    When you get a minute, would you please update the download with the Misc Cost optional module and the recent patches you mentioned? Thanks.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #876
    Join Date
    Oct 2015
    Location
    BC, Canada
    Posts
    41
    Plugin Contributions
    0

    Default Re: Taxes being duplicated/removed

    Hi guys,
    I hope it's okay for me to post this here. If not, please move it to the appropriate area in the forum.

    I use Zen Cart as POS software using several plugins including Edit Orders. Because we have a membership store, it works quite well. However, I am wondering if there is any way someone can add a field on the edit_orders.php for the 'amount tendered by customer' and a button to push that will show correct change.

    Long shot? I'm more than happy to pay someone to create the code to add to edit_orders.php.

    Again, I hope it's okay to post this here, and please move it if it's in the wrong place.

    Thanks!

  7. #877
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,290
    Plugin Contributions
    125

    Default That Software Guy's Discounts + Edit Orders 4

    If you are using any of the following modules, please see the help files on my home page for patches required for interoperability with Edit Orders 4.

    Zen Cart Better Together Admin
    Zen Cart Combination Discounts Admin
    Zen Cart Big Chooser
    Zen Cart Free Gift Chooser
    Zen Cart Free Gift Spender
    Zen Cart Manufacturer Discount
    Zen Cart Coupon Restrictions Chooser
    Zen Cart Table Discounts
    Last edited by swguy; 24 Mar 2016 at 01:37 PM.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #878
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Taxes being duplicated/removed

    Just wondering if there are any plans to update this module to be compatible with the new admin sanitizer, as per this thread:

    https://www.zen-cart.com/showthread.php?219747

    Thanks!
    Danielle

  9. #879
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,290
    Plugin Contributions
    125

    Default Re: Taxes being duplicated/removed

    I reckon we'd better!
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #880
    Join Date
    Oct 2007
    Location
    Emporia, Kansas
    Posts
    1,762
    Plugin Contributions
    0

    Default Re: Taxes being duplicated/removed

    OK, for now still on 1.3.9h and using that EO mod. I use it to add products to various customers (prizes actually) when the members win a prize I go into their account--click the add button--choose from the drop menus what is needed then make it so.
    I then go to the part where things are listed and in a blank line provided I list it as prizes with the negative amount to deduct it -- jot down a note in the other section and finalize it. Everything works beautifully *except for an error in the cache folder each time so need to clear cache often*

    In the 1.5+ zen cart this is not happening anymore so will there be a way to fix that to work as before OR Onetime Discount (does it need installing too), will it work as needed?

    Another thing I could try if it works is once the item(s) are added to the order, changing the price from whatever it is to 0.00 --will this accomplish the need I have for it to do after making it so? As you can see I am still testing this mod so hopefully before the versions of this cart get too far ahead of me I have hopes that the majority of the mods I have installed will all work right...LOL

    Oh I forgot to mention my store is all virtual downloads, if that makes a difference.

    Name:  Screen shot 2016-03-29 at 12.51.52 AM.jpg
Views: 127
Size:  22.0 KB

 

 

Similar Threads

  1. 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
  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