Zen Cart Logo
Forums / Addon Admin Tools / Edit Orders v4.0 Support Thread

Edit Orders v4.0 Support Thread

Views: 346,042

Results 861 to 880 of 1,927
28 Feb 2016, 5:10 PM
#861
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Edit Orders v4.0 Support Thread

I've got many sites that are using EO in exactly the manner you describe, but the products' prices are always recalculated properly upon clicking the "update" button. Could the issue be with your incorporation of DPU into the EO plugin?

28 Feb 2016, 7:37 PM
#862
hubert avatar

hubert

Zen Follower

Join Date:
Mar 2005
Posts:
229
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

I've got many sites that are using EO in exactly the manner you describe, but the products' prices are always recalculated properly upon clicking the "update" button. Could the issue be with your incorporation of DPU into the EO plugin?

Not really as my only modification for now is an <JavaScript > line to load dpu's Ajax part and which is working, by working I mean it's loading without any problem, but it' s not working as in "it updates the prices in the page without reloading the page" :-)

28 Feb 2016, 8:47 PM
#863
hubert avatar

hubert

Zen Follower

Join Date:
Mar 2005
Posts:
229
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

The fact is, the change of attributes is here :
when I update and go back to details, the option value is the good one and the order details reflect it.
It even show the price of the option chosen next to its name, but the product total price remains the same as before update. As if the attribute price wasn't important...

29 Feb 2016, 9:04 PM
#864
tary avatar

tary

New Zenner

Join Date:
Feb 2016
Posts:
2
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hi, I have just joined this forum but found it very infomative. i have a bit of problem with edit orders 4.14, i have just intalled zencart 1.5.4 and tried installed the edit order 4.14, it all seems to work except when i edit the amount of the products the price change and so has the total in the individual product line, but the subtotal and total didn't, for example product was say £6.00 each before making it £12.00 in total, after i change the price like

2 X product -- £2.00 = £4.00

Subtotal and tatoal stay the same as £12.00 have i missing changing something in one of the files?

any advice or help would be appreciated.

4 Mar 2016, 10:00 PM
#865
clint6998 avatar

clint6998

Zen Follower

Join Date:
Aug 2012
Posts:
106
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hello All. I am in the process of updating my site design and to v1.5.4 from 1.5.0. I have been using Edit Orders 4.0.2 on my old design but now, when I install the files and modify the modified files, when I go into orders.php, all I get is "Server Error 500." I have combed through this thread, and maybe I have missed something, but I have no idea where to go from here. I even did a fresh, clean install of the cart, then my template, then edit orders, and same thing.

Can anyone offer some words of wisdom?

4 Mar 2016, 11:03 PM
#866
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Checking your server logs or contacting your host to find the reason for the 500 error will be helpful in tracking down the cause.

15 Mar 2016, 1:18 AM
#867
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Small bug: includes/functions/extra_functions/edit_orders_functions.php line 1026
missing the "AS P" part of the query.

                                        'SELECT `p`.`products_quantity` FROM `' . TABLE_PRODUCTS . '` AS `p` ' .
15 Mar 2016, 7:24 AM
#868
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

Thank you for the reminder. In addition to the previously posted bugfix, there are a few other patches posted in this thread since the last release.

16 Mar 2016, 4:23 PM
#869
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

My site: af-company.com
Version: 1.5.4
Error logs: none
Mods: Multisite Module 1.0, Stirling Grand Responsive Template, Fast and Easy Checkout 2.1.4, Add customers from Admin 2.0.8, Admin password change display 1.1.3, Email Archive Manager, Moneris HPP (payment module), Canpar (shipping module)

• All the taxes calculate perfectly when the order is initially place. Because I'm dealing with Canadian taxes I have HST on the Product and a separate line for HST on Shipping, both 13%.
Attachment 16112

• I click edit to make any sort of changes and it changes my taxes. Both sets of taxes become HST on Shipping.
Attachment 16113

I am quite sure I have caused this error somehow by incorrectly merging the files, but I'm at a bit of a loss where to look, or how to fix it. Any help would be appreciate!

21 Mar 2016, 12:08 AM
#870
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

There used to be a blank box in edit orders where storeowners could add arbitrary price adjustments in EO 3. Is there any way we could have this back?

21 Mar 2016, 12:34 PM
#871
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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

21 Mar 2016, 11:49 PM
#872
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

OK - onetime discount is packaged with Edit Orders but where is misc cost?

22 Mar 2016, 12:40 PM
#873
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

swguy:

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!

22 Mar 2016, 12:49 PM
#874
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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

  1. /includes/languages/english/modules/order_total/ot_misc_cost.php:
<?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.');
  1. /includes/modules/order_total/ot_misc_cost.php:
<?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 . ")");
  }
}
22 Mar 2016, 1:25 PM
#875
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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.

23 Mar 2016, 1:18 AM
#876
gigi3 avatar

gigi3

New Zenner

Join Date:
Oct 2015
Location:
BC, Canada
Posts:
41
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

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!

24 Mar 2016, 12:50 AM
#877
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

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

26 Mar 2016, 8:35 PM
#878
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

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!

28 Mar 2016, 10:15 PM
#879
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

I reckon we'd better!

29 Mar 2016, 5:58 AM
#880
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

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.

Attachment 16172