Jump to content
Dr. Rolex

jQuery/Ajax Advanced Order Handler for osCommerce 2.3.3

Recommended Posts

@@uncoolthreads

 

Hi Russell,

 

Now just my opinion but as you obliviously have not much experience with php etc and are a shop owner who just wants things to work

 

and want an independent online shop  not actually sure if you have found what you are looking for.

 

Why did you not simply ask Dr. Rolex  to fix ??

 

It is simple really you are an online business who wants a shop that caters for your business needs if you can  not do yourself like making a bag of CRISPS you get someone to doooo

 

Now moving to another platform up to you but quite sure you have fees and have paid to get this done

 

 

Big question is why not simply ask a professional for a quote

 

I would say 100% certain if you asked the DR on a professional basis you would have had a professional result in a mater of hours ( that is if he takes commercial enquirys) not sure about that

 

 

Now I am not saying pay for play but if your limits are reached as regards adapting oscommerce for your needs it is worth while to consider asking for a quote to get the job done

 

I needed a few bricks laid recently so I asked a Brickie STRANGE or not !!#

 

commercial support forum 

 

http://forums.oscommerce.com/forum/79-commercial-support-enquiries/

 

Regards

Joli

 

PS: been at this 15 years and know 27.839% so do not expect the world overnight.

 

PPS: DR again sorry if I am diversifying the thread but sometimes just can not keep my mouth shut

 

 

PPS : Russle@@uncoolthreads

 

Do not mean this any way personal it is just this prevalent attitude that you can build a personalized shopping cart completely unique in most cases to your business should be part of  a standard install from oscommerce 

 

and you can do with no knowledge or limited of php, html,  css, jquery etc  customise to your needs

 

Wanted to speak Thai recently so I bought a book :D

 

Did not work so I am asking for my money back haha

 

How should this work ??

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

PPPS: been at this 15 years and know 42.1023% so do not expect the world overnight  (although some people insist it is 42)


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

I'd like to thank you and Joli for your help but I have decided to go for a different option to OSCommerce. I have spent 2 weeks configuring addons and still am nowhere near a finished result. I believe  most of these addons should simply be part of the core and not require changing so many files and causing conflicts between different addons etc. I just wanted an independent online shop for my existing busy eBay business not a new career configuring this. I have spent so long on this I am neglecting my active business and that can't be a good idea.

 

Again thanks for your help and advice, you have both been extremely helpful.

 

I can relate to your situation Russell, I've been there too.

 

I do, however, agree with what John said in his post above that there are a lot of freedom in having an open source system which you're in control over. In my opinion, it was well worth the trouble to get everything to work once when I started with osCommerce instead of going with a commercial solution where you will be locked to their system and they will have access to your database.

 

Just because it's commercial does not necessarily mean that the features you want will work and you're probably going to have to pay for every "extra" feature that you want.

 

I don't know what kind of cart you are looking at as an alternative, there are of course other open source alternatives like Prestashop and Magento. But you will probably run into similar problems with them as well (just guessing, never tried them myself).

 

The problems you're having are probably pretty easy for an experienced programmer to fix and PHP programmers doesn't necessarily cost a lot. ;)

I'm not, currently (ha ha), for sale however, I run my own business just like you and are only creating Add-Ons "for fun". But if you check John's link I'm sure you will get the help you need there.

 

Perfection doesn't happen in two weeks, you know. ;)

 

Good luck with whatever option you go with!

Share this post


Link to post
Share on other sites

As a side note it might be worth suggesting that perhaps the template_top.php needs a refurbish?

I think a lot of problems can come from loading all Javascript and CSS on all pages, even when they're not needed.

 

Since much of the Javascript scripts are jQuery today and almost always will fire when the Document is Ready, Javascript doesn't need to be executed inside the <head> of the page. Executing it last might even be to prefer as it won't interfere with browser rendering, making the page appear to load faster.

Share this post


Link to post
Share on other sites

Joli I'm not averse for paying for a service - been doing it for 5 years. I run a couple of online services and use a programming company in India.

 

It's just that I build my own websites using Joomla! and Wordpress so I thought something I can install from CPanel should be easy enough and I'm not too averse to changing a bit of code here and there but my time is too valuable to me to waste on things that should be included anyway - Product attributes for instance. I install one version and then I'm told "oh really you should install this one.." There should be one version in the core that works and won't clash with other stuff..

 

What shop script doesn't need product attributes?

 

Just paid $100 (whats that worth, a mornings work?) for a complete eccommerce site based on Wordpress in the Warrior Forum - EVERYTHING is included in the price - no configuring whatsoever, every possible feature..

 

Easy life..

- thanks guys!

Share this post


Link to post
Share on other sites

Hi Russell,

 

Small correction product attributes are included in all standard installs

 

With x number of variations according to the shops needs as addon

 

oscommerce = shopping cart (with certain blogging features)

 

word press = blog (with certain selling features)

 

Sure you know what is best for your needs.

 

 

Best of luck with your new venture

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Here's an update to the tep_db_update_totals function in ajax_update.php that will reload and recalculate the shipping module and it's cost every time the order totals are updated (changing quantity, price etc..).

 

I have only tested it with zones shipping, but it should work for more or perhaps even all modules.

I'm not sure, however, if I have made more necessary changes other then replacing the tep_db_update_totals function so report if it didn't work for you..

 

Replace the entire tep_db_update_totals function in ./admin/includes/modules/order_handler/ajax_update.php with this

 

P.S. This code will only work with mysqlnd, if you don't have that module you need to make the same type of modifications as you can find in the "Compatible Without mysqlnd" version of ajax_update.php to the statements in the new function. D.S.

  public function tep_db_update_totals( $order_id ) {
    global $cart, $currency, $currencies, $language, $order, $shipping_weight, $shipping_num_boxes;

    $price = 0;
    $total = 0;
    $taxes = array();

    # Set Customers Country and Zone
    $order_query = mysqli_prepared_query( "SELECT currency, entry_country_id, entry_zone_id, countries_name, countries_iso_code_2, countries_iso_code_3 FROM $this->tablename_o o JOIN $this->tablename_ab ab ON (o.customers_id = ab.customers_id) JOIN $this->tablename_co c ON (c.countries_id = ab.entry_country_id) WHERE orders_id = ? LIMIT 1", "i", array( $order_id ) );

    include_once DIR_WS_CLASSES . 'order.php';
    $currency = $order_query[0]['currency'];
    $order = new order( $order_id );

    $cart  = new shoppingCart();
    $order->content_type = $cart->get_content_type();

    $shopping_cart = mysqli_prepared_query( "SELECT * FROM $this->tablename_op WHERE orders_id = ?", "i", array( $order_id ) );
    foreach ( $shopping_cart as $key => $product ) {
      $cart->add_cart($product['products_id'], $product['products_quantity'], '', false);
    }

    $shipping_num_boxes = 1;
    $cart->weight = $cart->show_weight();
    $shipping_weight = $cart->show_weight();

    $order->delivery['country'] =
    array(
      'id'         => $order_query[0]['entry_country_id'],
      'title'      => $order_query[0]['countries_name'],
      'iso_code_2' => $order_query[0]['countries_iso_code_2'],
      'iso_code_3' => $order_query[0]['countries_iso_code_3'],
    );
    $order->delivery['zone_id'] = $order_query[0]['entry_zone_id'];

    #Get the order's currency
    $currency             = mysqli_prepared_query( "SELECT currency, currency_value from $this->tablename_o WHERE orders_id = ?", "i", array( $order_id ) );

    # Add Any Existing Shipping Tax
    $order_shipping_query = mysqli_prepared_query( "SELECT title, value FROM $this->tablename_ot WHERE orders_id = ? AND class = 'ot_shipping'", "i", array( $order_id ) );

    # Continue if Shipping exists
    if ( count( $order_shipping_query ) ) {
      # Get all available Shipping Quotes
      $quote = $this->get_shipping_modules();

      $shipping_total =
        array(
        'title'       => $quote[0]->quotes['methods'][0]['title'] . ":",
        'text'        => $currencies->format( $quote[0]->quotes['methods'][0]['cost'] * ( $quote[0]->quotes['tax'] / 100 + 1 ), true, $currency[0]['currency'], $currency[0]['currency_value'] ),
        'value'       => $quote[0]->quotes['methods'][0]['cost'] * ( $quote[0]->quotes['tax'] / 100 + 1 ),
        'tax'         => $quote[0]->quotes['methods'][0]['cost'] * ( $quote[0]->quotes['tax'] / 100 + 1 ) - $quote[0]->quotes['methods'][0]['cost'],
      );

      $params = array( $shipping_total['title'], $shipping_total['text'], $shipping_total['value'], $order_id );

      # Update Shipping
      mysqli_prepared_query( "UPDATE $this->tablename_ot SET title = ?, text = ?, value = ? WHERE orders_id = ? AND class = 'ot_shipping'", "ssdi", $params );

      # Loop Through Quotes and Search for Shipping Title
      for ( $i=0, $n=sizeof( $quote ); $i<$n; $i++ ) {

        $shipping_modules = preg_replace( '/\s\(.*\)$/', '', $quote[$i]->quotes['module'] . ' (' . $quote[$i]->quotes['methods'][0]['title'] . ')' );

        # If shipping module was found - then
        # get Tax Description and Rate
        if ( stristr( preg_replace( '/\s\(.*\):$/', '', $quote[$i]->quotes['module'] ), $shipping_modules ) ) {
          $tax_info = mysqli_prepared_query( "SELECT tax_rate, tax_description FROM $this->tablename_tr WHERE tax_class_id = ?", "i", array( $quote[$i]->tax_class ) );
          $taxes[] = array( 'tax_description' => $tax_info[0]['tax_description'], 'value' => $shipping_total['tax'] );
        }
      }
    }

    # Select all Order Products
    $products_total_query = mysqli_prepared_query( "SELECT final_price, products_quantity, products_tax FROM $this->tablename_op WHERE orders_id = ?", "i", array( $order_id ) );

    if ( count( $products_total_query ) > 0 ) {
      foreach ( $products_total_query as $products_total ) {
        # Calculate Tax Multiplier
        $tax_percent = round( ( 100 + (float)$products_total['products_tax'] ) / 100, 4 );
        $price += (float)round( ( (float)$products_total['final_price'] * (int)$products_total['products_quantity'] ) * $tax_percent, 2 );
        # If Product have Tax - Then
        # Get Tax Description
        if ( tep_not_null( $products_total['products_tax'] ) && $products_total['products_tax'] > 0 ) {
          $tax_description = mysqli_prepared_query( "SELECT tax_description FROM $this->tablename_tr WHERE tax_rate = ?", "d", array( $products_total['products_tax'] ) );

          # Calculate and Add Taxes to Tax Array
          if ( sizeof( $taxes ) ) {

            $ya_esta = false;
            for ( $i=0; $i<sizeof( $taxes ); $i++ ) {
              if ( isset( $taxes[$i]['tax_description'] ) && $tax_description[0]['tax_description'] === $taxes[$i]['tax_description'] ) {
                $ya_esta = $i;
              }
            }

            if ( $ya_esta === false ) {
              $taxes[] = array( 'tax_description' => $tax_description[0]['tax_description'], 'value' => round( ( ( ( (float)$products_total['final_price'] * (int)$products_total['products_quantity'] ) * (float)$products_total['products_tax'] ) / 100 ), 4 ) );

            } else {
              $taxes[$ya_esta]['value'] += round( ( ( ( (float)$products_total['final_price'] * (int)$products_total['products_quantity'] ) * (float)$products_total['products_tax'] ) / 100 ), 4 );
            }
          } else {
            $taxes[] = array( 'tax_description' => $tax_description[0]['tax_description'], 'value' => round( ( ( ( (float)$products_total['final_price'] * (int)$products_total['products_quantity'] ) * (float)$products_total['products_tax'] ) / 100 ), 4 ) );
          }
        }
      }
    }

    # Get Order Totals excluding Tax
    $orders_total_query = mysqli_prepared_query( "SELECT * FROM $this->tablename_ot WHERE orders_id = ? AND class != 'ot_tax' ORDER BY sort_order", "i", array( $order_id ) );
    # Get 'Default Tax' for use with Totals we don't know Tax Rate of.
    $others_tax = tep_db_fetch_all( "SELECT tax_class_title, tax_rate FROM $this->tablename_tc tc LEFT JOIN $this->tablename_tr tr USING (tax_class_id) WHERE tax_class_id = 1" );

    foreach ( $orders_total_query as $order_total ) {
      if ( $order_total['class'] == 'ot_subtotal' ) {

        $new_value = (float)$price;
        $new_text = $currencies->format( $new_value, true, $currency[0]['currency'], $currency[0]['currency_value'] );

        $total += (float)$new_value;

        $params = array( $new_text, $new_value, $order_total['orders_total_id'] );
        mysqli_prepared_query( "UPDATE $this->tablename_ot SET text = ?, value = ? WHERE orders_total_id = ?", "sdi", $params );
      } elseif ( $order_total['class'] == 'ot_total' ) {
        # Format Order Total and Update Database
        $new_value = (float)$total;
        $new_text = '<strong>' . $currencies->format( round( $new_value ), true, $currency[0]['currency'], $currency[0]['currency_value'] ) . '</strong>';

        $params = array( $new_text, $new_value, $order_total['orders_total_id'] );
        mysqli_prepared_query( "UPDATE $this->tablename_ot SET text = ?, value = ? WHERE orders_total_id = ?", "sdi", $params );
      } elseif ( $order_total['class'] == 'ot_shipping' ) {
        # Add Shipping Cost to Order Total
        $total += round( (float)$order_total['value'], 4 );
      } else {
        #Do the Extra Order Fields
        $updated = false;
        $class = explode( ",", $order_total['class'] );

        # Add Tax if Set
        if ( ! isset( $class[1] ) || ( isset( $class[1] ) && '0' != $class[1] ) ) {
          # Calculate Special Tax Class
          if ( 1 < count( $class ) ) {
            $others_tax_extra = tep_db_fetch_all( "SELECT tax_rate, tax_description FROM tax_rates tr WHERE tax_class_id = " . (int)$class[1] );
            $other_tax = $order_total['value'] - ( $order_total['value'] / ( $others_tax_extra[0]['tax_rate'] / 100 + 1 ) );
            $tax_class_title = $others_tax_extra[0]['tax_description'];
            # Calculate Standard Tax Class
          } else {
            $other_tax = $order_total['value'] - ( $order_total['value'] / ( $others_tax[0]['tax_rate'] / 100 + 1 ) );
            $tax_class_title = $others_tax[0]['tax_class_title'];
          }

          # Add Calculated Tax
          for ( $i=0; $i<sizeof( $taxes ); $i++ ) {
            if ( $taxes[$i]['tax_description'] == $tax_class_title ) {
              $taxes[ $i ]['value'] += (float)$other_tax;
              $updated = true;
              break;
            }
          }
          # Add new Tax Class
          if ( false === $updated ) {
            $taxes[] = array( 'tax_description' => $tax_class_title, 'value' => $other_tax );
          }
        }

        # Add Tax to Order Total
        $total += round( (float)$order_total['value'], 4 );
      }
    }

    # The Taxes
    if ( sizeof( $taxes ) ) {
      $orders_total_tax_query = mysqli_prepared_query( "SELECT * FROM $this->tablename_ot WHERE orders_id = ? AND class = 'ot_tax'", "i", array( $order_id ) );

      # Update the ot_tax with the same title
      # If title doesn't exist, INSERT it
      $tax_updated = array();
      foreach ( $orders_total_tax_query as $orders_total_tax ) {
        $eliminate_tax = true;
        for ( $i=0; $i<sizeof( $taxes ); $i++ ) {
          if ( $orders_total_tax['title'] === $taxes[$i]['tax_description'] && !in_array($taxes[$i]['tax_description'], $tax_updated)) {
            $eliminate_tax = false;
            # Keep in variable that this tax is done
            $tax_updated[] = $orders_total_tax['title'];

            # Prepare text (value with currency)
            $new_text = $currencies->format( $taxes[$i]['value'], true, $currency[0]['currency'], $currency[0]['currency_value'] );

            $params = array( $new_text, $taxes[$i]['value'], $orders_total_tax['orders_total_id'] );
            mysqli_prepared_query( "UPDATE $this->tablename_ot SET text = ?, value = ? WHERE orders_total_id = ? AND class = 'ot_tax'", "sdi", $params );
          }
        }

        # Eliminate Tax Class
        if ( $eliminate_tax == true ) {
          mysqli_prepared_query( "DELETE FROM $this->tablename_ot WHERE orders_total_id = ? limit 1", "i", array( $orders_total_tax['orders_total_id'] ) );
        }
      }

      # INSERT a new tax rate in the orders_total table, if all of taxes[] is not in $tax_updated[]
      for ( $i=0; $i<sizeof( $taxes ); $i++ ) {
        if ( ( ! in_array( $taxes[$i]['tax_description'], $tax_updated ) ) && ( (float)$taxes[$i]['value'] > 0 ) ) {
          # prepare text (value with currency)
          $texto = round( (float)$taxes[$i]['value'], 2 );
          $texto = $currencies->format( $texto, true, $currency[0]['currency'], $currency[0]['currency_value'] );

          if ( null !== $taxes[$i]['tax_description'] )
            $params = array( $order_id, $taxes[$i]['tax_description'], $texto, $taxes[$i]['value'] );

          mysqli_prepared_query( "INSERT INTO $this->tablename_ot (orders_id, title, text, value, class, sort_order) VALUES (?, ?, ?, ?, 'ot_tax', 3)", "issd", $params );
        }
      }
    }

    $order_total_modules = array();
    if ( defined( 'MODULE_ORDER_TOTAL_INSTALLED' ) && tep_not_null( MODULE_ORDER_TOTAL_INSTALLED ) ) {
      $modules = explode( ';', MODULE_ORDER_TOTAL_INSTALLED );

      reset( $modules );
      while ( list( , $value ) = each( $modules ) ) {
        include DIR_FS_CATALOG . DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value;
        include DIR_FS_CATALOG . DIR_WS_MODULES . 'order_total/' . $value;

        $class = substr( $value, 0, strrpos( $value, '.' ) );
        $GLOBALS[$class] = new $class;
        $order_total_modules[ $GLOBALS[$class]->code ] = (int)$GLOBALS[$class]->sort_order;
      }
    }

    $sql   = "UPDATE $this->tablename_ot SET sort_order = ? WHERE orders_id = ? AND class = ?";
    $stmt  = $this->link->prepare( $sql );

    /* Bind parameters. Types: s = string, i = integer, d = double,  b = blob */
    $stmt->bind_param( 'iis', $sort_order, $order_id, $class );

    foreach ( $order_total_modules as $class => $sort_order ) {
      /* Execute statement */
      $stmt->execute();
    }

    $stmt->close();

    #SQL
    $sort_extra_sort_order_sql = "SELECT (SELECT max(sort_order) + 1 FROM orders_total WHERE orders_id = o.orders_id AND class != 'ot_total') as maxim, (SELECT COUNT(class) FROM orders_total WHERE orders_id = o.orders_id AND class like '%ot_extra_%') as class FROM orders o JOIN orders_total USING (orders_id) WHERE orders_id = ? GROUP BY orders_id";
    $sort_extra_sort_order = mysqli_prepared_query( $sort_extra_sort_order_sql, "i", array( $order_id ) );

    # If Extra fields - Then Update Sort Order for Order Total
    if ( ! empty($sort_extra_sort_order) )
      mysqli_prepared_query( "UPDATE $this->tablename_ot SET sort_order = ? WHERE orders_id = ? AND class = 'ot_total'", "ii", array( $sort_extra_sort_order[0]['maxim'], $order_id ) );

  } # End tep_db_update_totals

I have added a couple of new features so that it will be possible to quickly change shipping & payment methods on an order.

 

I have also worked a bit on an macro based automation engine that can "intelligently" create comments and update orders based on conditions. The goal is to remove the need to handle orders as much as possible and instead let the computer do all the work, just leave the order handler to handle everything just like the autopilot on an airplane. At least for me handling orders are 95% routine "click & print", but it's probably the same for everyone even if the "routine" differs.

 

Initially I have set it to monitor suspicious orders having it look for fraudulent patterns like if the customer have a high rate of returns, incomplete or false address and other factors which is common "red flag" attributes on orders for me. It works pretty well so far.

 

When that works all I need is some kind of robotic system that can handle packaging orders, after that there will be no reason to go to the office at all, at least not every day (as it should be)! B)

 

I have also experimented with live push messages which can be sent from the order handler and seen by all or a specific logged in customers on their screen.

Edited by Dr. Rolex

Share this post


Link to post
Share on other sites

Hi Jonas,

 

I was just testing today and am getting the same error as Russel a few post previously

[02-Sep-2014 04:28:45 America/New_York] PHP Fatal error:  Call to undefined method mysqli_result::fetch_all() in /home/xxxxxt/public_html/xxx/admin/includes/functions/database.php on line 348

line 348 is

    if ( false === $res ) {
      return tep_db_error( $query, mysqli_errno( $$link ), mysqli_error( $$link ) );
    } else {
      return $res->fetch_all(MYSQLI_ASSOC);
    }
  }

The admin/get_table.php   is blanko :blush:   I am using Advanced Order Handler Rev3 - Compatible Without mysqlnd

 

Regards

John

 

 

PS: update I have removed the code block and now I am seeing the editor if you want to have look it is a test shop so you can have a look if you want

 if ( false === $res ) {
      return tep_db_error( $query, mysqli_errno( $$link ), mysqli_error( $$link ) );
    } else {
      //return $res->fetch_all(MYSQLI_ASSOC);
      return $result->fetch_all(MYSQLI_ASSOC);
    }
Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Wow now that is looking cool already sent my first email by mistake hahah :D

 

PHP Version:     5.3.28  no  MySQL Native Driver (mysqlnd) installed on my server

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Hi,

 

Just testing a bit but really nor sure what is what yet

 

Now when I try  create a new customer the customer is created with an order of $19.41

 

The customer number in the URL is

 

http://www.xxxxxxx.com/xxxx/admin/create_order.php?Customer_nr=0

 

so when I try to create an order for this new customer I have just made by clicking on the edit left hand side

 

 I was get this error now this file was not included in the download package

 

The requested URL /guns/admin/FILENAME_CREATE_ORDER was not found on this server.

 

so being going back through the thread and copied  the one from an older post and defined in filenames.php now I am taken to get_table.php?

 

Which is looking good but when I click on create new order I am back to a blank page

[02-Sep-2014 06:03:33 America/New_York] PHP Warning:  Invalid argument supplied for foreach() in /home/allesgut/public_html/guns/admin/includes/modules/order_handler/modals.php on line 109

so I am guessing maybe something missing from the package now when I first tried to open using WinRar and zip  he did not unpack properly so I then tried to delete the yellow folder from desktop he will not let me says the file is not empty so it can not be deleted stuck with that for the minute have to get shredder out :lol:

 

I tried again to unpack again possibly using a different order from WinRar and 7Zip not sure because no brand image on the file or maybe my computer

 

well he did unpack this time so ok

 

Now I know you were stuck for space because of the fonts maybe the missing files are from a corrupt package

 

 

Also get this error if I try putting anything in the add new record / search customers address field but not so important.

500: Internal Server Error

2014 - Commands out of sync; you can't run this command now

select 1 from sessions where sesskey = '553a787b2d40580b96609569167cbce9'

Ok going to read the thread again see if I missed anything.

 

Regards

John


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Ok I am back to the includes/functions/database.php

function tep_db_fetch_all( $query, $link = 'db_link' ) {
    global $$link;

    $res = $$link->query( $query );

    if (method_exists('mysqli_result', 'fetch_all')) // Compatibility layer with PHP < 5.3

     if ( false === $res ) {
      return tep_db_error( $query, mysqli_errno( $$link ), mysqli_error( $$link ) );
    } else {
      return $res->fetch_all(MYSQLI_ASSOC);
    }
  }

Shows up and seems smoother and can create an order guess that create order jquery button is from an old version this is a really a  cracker :thumbsup:

 

Ok next problem is the stats are not showing just seeing js chart by amCharts   so going back to template top seen in the instructions if followed it would have been in template top twice

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.time.min.js'); ?>"></script>

so going to position slightly different had this before with some versions of flot

 

Thanks for the great addon looking better all the time

 

Still getting a few errors so going bac through the thread again

 

Regards

John


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

:thumbsup:  getting there done the ajax update that was earlier in the thread ( a few pages back have not tried your new code above) and now my update order beside pending orders jquery button works before was throwing an an error .

 

So at the minute the last error in the logs seems to be

[02-Sep-2014 12:30:34 America/New_York] PHP Warning:  Invalid argument supplied for foreach() in /home/allesgut/public_html/guns/admin/includes/modules/order_handler/modals.php on line 109

so back to google and I changed code block at 109 to

 foreach ((array) $tax_class_query as $tax_class) {
    $tax_class_array[] = array('id' => $tax_class['tax_class_id'],
                               'text' => $tax_class['tax_description'] . " (" . round($tax_class['tax_rate'], 2) . "%)");
  }

error is gone now but really not sure if I am doing right as far as I can see it is functioning by me as it should..

 

Now only thing is the new stats not sure why they are not showing by me I get the pop up but empty except for order handler statistics and the name js chart by amchart.

 

Wow this is really a great mod now again by me there is a small bit of css fix to do as the all orders search box and all orders box in the top nav are overlapping tested with a -75 margin for the refresh button and a slightly smaller orders box width and they slipped into place .

 

So guess ready to go live testing soon can only say very impressed a hell of of lot of great coding Jonas

 

Regards

John

 

PS: Just seen one more mini bug / error when add new record and then in the pop up I enter search customers address I get the warning pop up right hand side

500 internal server error

2014 - Commands out of sync; you can't run this command now

select 1 from sessions where sesskey = '553a787b2d40580b96609569167cbce9'

[TEP STOP]

not sure what thats all about but again not so important.

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Error log

[02-Sep-2014 12:55:34 America/New_York] PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /home/allesgut/public_html/guns/admin/includes/modules/order_handler/ajax_update.php on line 1350

This is the last error message mentioned above seems to be coming from this block of code has been mentioned previously so testing now a bit still do not now what I am doing but seems to be working haha

   #Get the customers info
    $res = $stmt_se->get_result();
	while ( ( $row = $res->fetch_assoc() ) ) {
      $return_arr[] =
        array(
        'id' => tep_href_link( "get_table.php", 'action=get_customer&cID=' . (int)$row['customers_id'] ),
        'value' =>$row['customers_name'] . ': ' . $row['custeroms_address'],
      );
    }
Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

so I am guessing maybe something missing from the package now when I first tried to open using WinRar and zip  he did not unpack properly so I then tried to delete the yellow folder from desktop he will not let me says the file is not empty so it can not be deleted stuck with that for the minute have to get shredder out :lol:

 

I tried again to unpack again possibly using a different order from WinRar and 7Zip not sure because no brand image on the file or maybe my computer

 

Did you try with the 7-zip software I mentioned?

http://www.7-zip.org/

 

 

 

I was just testing today and am getting the same error as Russel a few post previously

 

[02-Sep-2014 04:28:45 America/New_York] PHP Fatal error:  Call to undefined method mysqli_result::fetch_all() in /home/xxxxxt/public_html/xxx/admin/includes/functions/database.php on line 348

 

line 348 is

 

    if ( false === $res ) {

      return tep_db_error( $query, mysqli_errno( $$link ), mysqli_error( $$link ) );

    } else {

      return $res->fetch_all(MYSQLI_ASSOC);

    }

  }

 

The admin/get_table.php   is blanko [:blush:]    I am using Advanced Order Handler Rev3 - Compatible Without mysqlnd

 

OK, I'll take a look at it. I didn't really thoroughly test the "Compatible Without mysqlnd" version. I tested the basic functions which worked for me so I don't really know what the problem might be.

 

 

 

I was get this error now this file was not included in the download package

 

The requested URL /guns/admin/FILENAME_CREATE_ORDER was not found on this server.

 

Yeah, I just noticed that I still have that error on my own installation. I never use the "edit order" mode so that's why I haven't noticed it. ;)

To solve it either add the old file from rev2 (I don't know if it will work) or simply remove/comment this code on line 32

tep_draw_button( IMAGE_CREATE_ORDER, 'document', tep_href_link( FILENAME_CREATE_ORDER, 'Customer_nr=' . (int)$GET['cID'] ) ) .

And this code on line 249

. tep_draw_button( IMAGE_CREATE_ORDER, 'document', tep_href_link( FILENAME_CREATE_ORDER, tep_get_all_get_params( array( 'action', 'oID', 'ajax' ) ) . 'Customer=' . (int)$GET['cID'] ) )

 

Ok next problem is the stats are not showing just seeing js chart by amCharts   so going back to template top seen in the instructions if followed it would have been in template top twice

 

 

This is probably due to error in the regex pattern which is used to translate the currency to a float, I gave an answer to this on post #140. Try that and see if it works.

Share this post


Link to post
Share on other sites

Yes 7 zip from the link you mentioned first time did not work 2nd time yes no idea why I know the first I used 7zip but as it was zipped several times I may then have changed the order 7zip - winrar  / winrar-7zip .

Well not so important the upload is there now so that is the main thing next time with any revision just wait for approval (because of size limit).

 

Can only say when the minor bugs are fixed it really is NEXT GENERATION SOFTWARE :thumbsup:

 

Now as regards the first blank page error this is my fix not sure from google or previous posts but simple and works

 

"OK, I'll take a look at it. I didn't really thoroughly test the "Compatible Without mysqlnd" version. I tested the basic functions which worked for me so I don't really know what the problem might be."

	if (method_exists('mysqli_result', 'fetch_all')) // Compatibility layer with PHP < 5.3

	 if ( false === $res ) {
      return tep_db_error( $query, mysqli_errno( $$link ), mysqli_error( $$link ) );
    } else {
      return $res->fetch_all(MYSQLI_ASSOC);
    }
  }

**************************************************************

 

"To solve it either add the old file from rev2 (I don't know if it will work) or simply remove/comment this code on line 32"

 

Yes understand a bit better now after a bit of testing this is the leftover code from the older version now my suggestion here would be after removing the create new order link to then highlight the add product which is text at the minute to the same button style as Payment method and Status:

 

as at least for me it was not very clear how to edit the newly created customer's product ( took a while before I noticed the add product)

 

**********************************************************

"This is probably due to error in the regex pattern which is used to translate the currency to a float, I gave an answer to this on post #140. Try that and see if it works."

 

Yes caught that post #140 working fine now ;)

 

****************************************************************

 

another x 2 forum fixes I needed were......

 

01_03_order_handeler_rev3_module.js  post #165 [jQuery/Ajax Advanced Order Handler for osCommerce 2.3.3: post #165 FIXED

line 2035

Right click menu is not opening

ReferenceError: event is not defined
    

if ( 0 !== event.button ) return false;


01_03_order_handler_rev3_module.js




**************************************

 

 

and

01_03_order_handeler_rev3_module.js

calculate orders totals fixed post #140 [jQuery/Ajax Advanced Order Handler for osCommerce 2.3.3: post #140


TypeError: selectedRows.find(...).innerText is undefined

line 139    

orders_total += parseFloat( selectedRows.find( "td.order_total" )[ i ].innerTex

*******************************

Plus (just putting all the fixes in one thread for better reference)

:thumbsup:  getting there done the ajax update that was earlier in the thread ( a few pages back have not tried your new code above) and now my update order beside pending orders jquery button works before was throwing an an error .

now another change I made just to recap was for an error on /admin/includes/modules/order_handler/modals.php 

 

on line: 109

  $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
  $tax_class_query = tep_db_fetch_all("select tax_class_id, tax_rate, tax_description from $tablename_tr order by tax_class_id");
  foreach ($tax_class_query as $tax_class) {
    $tax_class_array[] = array('id' => $tax_class['tax_class_id'],
                               'text' => $tax_class['tax_description'] . " (" . round($tax_class['tax_rate'], 2) . "%)");
  }
  ?>

to

$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
  $tax_class_query = tep_db_fetch_all("select tax_class_id, tax_rate, tax_description from $tablename_tr order by tax_class_id");
  foreach ((array) $tax_class_query as $tax_class) {
    $tax_class_array[] = array('id' => $tax_class['tax_class_id'],
                               'text' => $tax_class['tax_description'] . " (" . round($tax_class['tax_rate'], 2) . "%)");
  }
  ?>

Is that ok?

 

************************************************************

 

Now can not get this sorted in add new record / Search Customer Address still getting this error

[04-Sep-2014 13:27:14 America/New_York] PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /home/allesgut/public_html/guns/admin/includes/modules/order_handler/ajax_update.php on line 1407

There does seem to have been a typo in the original code (  $row['custeroms_address'],  )  

   #Get the customers info
    $res = $stmt_se->get_result();
    while ( ( $row = $res->fetch_assoc() ) ) {
      $return_arr[] =
        array(
        'id' => tep_href_link( "get_table.php", 'action=get_customer&cID=' . (int)$row['customers_id'] ),
        'value' =>$row['customers_name'] . ': ' . $row['custeroms_address'],
      );
    }

but still getting an error this is of course  a mini bug is this actually a search function??

 

at the minute I have tried this but still no luck

//////////
    #Get the customers info
	if (method_exists('mysqli_result', 'fetch_all')) // Compatibility layer with PHP < 5.3
    $stmt = $mysqli->stmt_init();
	$res = mysqli_get_res( $stmt_se );
   // while ( ( $row = $res->fetch_assoc() ) )
   {
      $return_arr[] =
        array(
        'id' => tep_href_link( "get_table.php", 'action=get_customer&cID=' . (int)$row['customers_id'] ),
        'value' =>$row['customers_name'] . ': ' . $row['customers_address'],
      );
    }

Now a bigger problem is the footer navigation  I have attached a few screenshots of the actual admin and one of zoom out this is in the firefox browser

 

If I add something like this to the stylesheets he is ok but probably not the correct way to do ???

 

nav#navigationBottom.navbar.navbar-default.navbar-fixed-bottom{
height:20px;}

 

 

***************************************************************************************************************8

 

Now all are really mini bugs but there is one big one on my test install any ideas

 

He seems to be showing only the last 17 orders although there is over 800 in the database

 

I believe he will add newer orders but have not really had a chance to test properly

 

any ideas on this

 

Regards

John

post-185951-0-52618700-1409855111_thumb.jpg

post-185951-0-12567000-1409855219_thumb.jpg

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Just out of curiosity I installed this add-on and on my localhost and it looks like I have mysqlnd running on my local server.

I tested my real server and there I don't have mysqlnd. So i tried to get the latest version from the Add-ons section which should support it without mysqlnd.

But when i download the package and unzip it i get this file/filename:

 

jQuery Advanced Order Handler 2.3.3 Rev3 Compatible Without mysqlnd

 

as you can see there is no file extension at the end so i tried to open it with notepad++ and I can see some HTML code and some broken characters.

I guess that suppose to be a HTML file with an instruction manual right?

 

So what is going on? How to get this Add-on running without mysqlnd support?

Any advice would be appreciated.

Share this post


Link to post
Share on other sites

 

Hi Jonas,

 

I was just testing today and am getting the same error as Russel a few post previously

[02-Sep-2014 04:28:45 America/New_York] PHP Fatal error:  Call to undefined method mysqli_result::fetch_all() in /home/xxxxxt/public_html/xxx/admin/includes/functions/database.php on line 348

line 348 is

    if ( false === $res ) {
      return tep_db_error( $query, mysqli_errno( $$link ), mysqli_error( $$link ) );
    } else {
      return $res->fetch_all(MYSQLI_ASSOC);
    }
  }

The admin/get_table.php   is blanko :blush:   I am using Advanced Order Handler Rev3 - Compatible Without mysqlnd

 

Regards

John

 

The instructions in the readme.html file for step #7 database.php was not correct. Instead look at the included file in ./catalog/admin/includes/functions/database.php for the correct code.

 

The tep_db_fetch_all functions should look like this

  # Compatability for PHP without MySQL Native Driver support
  function tep_db_fetch_all( $query, $link = 'db_link' ) {
    global $$link;

    $res = $$link->query( $query );

    if ( false === $res ) {
      return tep_db_error( $query, mysqli_errno( $$link ), mysqli_error( $$link ) );
    } else {
      if ( true === function_exists( 'mysqli_fetch_all' ) ) {
        $rows = $res->fetch_all(MYSQLI_ASSOC);
      } else {
        while( $row = $res->fetch_array() ) {
          $rows[] = $row;
        }
      }
      $res->close();
      return $rows;
    }
  }

Share this post


Link to post
Share on other sites

Just out of curiosity I installed this add-on and on my localhost and it looks like I have mysqlnd running on my local server.

I tested my real server and there I don't have mysqlnd. So i tried to get the latest version from the Add-ons section which should support it without mysqlnd.

But when i download the package and unzip it i get this file/filename:

 

jQuery Advanced Order Handler 2.3.3 Rev3 Compatible Without mysqlnd

 

as you can see there is no file extension at the end so i tried to open it with notepad++ and I can see some HTML code and some broken characters.

I guess that suppose to be a HTML file with an instruction manual right?

 

So what is going on? How to get this Add-on running without mysqlnd support?

Any advice would be appreciated.

 

You should try to extract that file "again". First rename the new file to jQuery Advanced Order Handler 2.3.3 Rev3 Compatible Without mysqlnd.tar.gz then try to extract it one more time and then it should work.

 

But since many seem to have problem extracting the archive I have uploaded a "stripped" version without all the screenshots in a "regular" gzip/tar archive instead. I have also applied fixes for some of the bugs mentioned in this thread and corrected Step #7.

 

http://addons.oscommerce.com/info/9055

Share this post


Link to post
Share on other sites

Replaced my patched files with your original and adjusted the function as mentioned above working fine :thumbsup:

 

now x 3 bugs left

 

1: ( mini error ) :  footer is to big as seen in screenshots so just using my fix at the minute

 

2:  ( mini error ) : the   /admin/get_table.php   add new record / search customer address is giving this error

[10-Sep-2014 14:37:49 America/New_York] PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /home/xxx/public_html/xxx/admin/includes/modules/order_handler/ajax_update.php on line 1408

3: Big error :   the   /admin/get_table.php   is only returning 17 orders ??

 

Now if I grab the (page id) from the normal orders table (old order from 2011)

 

/xxx/admin/orders.php?page=39&oID=100&action=edit

http://www.xxx.com/xxxx/admin/get_table.php?oID=39&action=edit_order&cID=0

click any order showing in the ajax order editor and replace the page id  in the url I can the access the order so wonder what is on here??

 

 

Regards

John

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites
There does seem to have been a typo in the original code (  $row['custeroms_address'],  )  

   #Get the customers info
    $res = $stmt_se->get_result();
    while ( ( $row = $res->fetch_assoc() ) ) {
      $return_arr[] =
        array(
        'id' => tep_href_link( "get_table.php", 'action=get_customer&cID=' . (int)$row['customers_id'] ),
        'value' =>$row['customers_name'] . ': ' . $row['custeroms_address'],
      );
    }

 

 

 

Just replace custeroms_address with customers_address. It doesn't matter though since the typo is in both the query/statement and the definition.

 

 

If I add something like this to the stylesheets he is ok but probably not the correct way to do ???

 

nav#navigationBottom.navbar.navbar-default.navbar-fixed-bottom{

height:20px;}

 

 

If it works it works, right? :thumbsup:

 

This is how I've done it, find this code in ./admin/includes/modules/order_handler/css/01_13_order_handler.css

/* Body Prepare */
#body_content.ready {
  width: 100%;
  position: absolute;
  top: 0;
  transition: 1s ease all;

  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
}

Replace With

/* Body Prepare */
#body_content.ready {
  width: 100%;
  position: absolute;
  top: 0;
  padding-bottom: 50px;
  transition: 1s ease all;

  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
}

Also, in the same file, I'm not sure if I forgot to add this CSS rule which will hide long comments. If comments are displayed on more than one line, then add this code to bottom of file:

#orderTable .comments {
    display: block;
    float: left;
    max-width: 200px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
    -ms-text-overflow: ellipsis;
    text-overflow: ellipsis;
    -webkit-transition: width .2s ease;
    -moz-transition: width .2s ease;
    -o-transition: width .2s ease;
    -ms-transition: width .2s ease;
    transition: width .2s ease;
}

Fixing the size on the navbars is just a matter of trial and error. Decrease Width/Padding/Margin or Remove/Hide buttons to get everything to fit on one row.

 

A tip is to start with removing the "Menu" header to the left, replace this code in ./admin/includes/modules/order_handler/navbars.php

    <!-- Navbar Header -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"></button>
      <a class="navbar-brand" href="javascript:void(0);">Menu</a>
    </div>
    <!-- END Navbar Header -->

With This

    <!-- Navbar Header
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"></button>
      <a class="navbar-brand" href="javascript:void(0);">Menu</a>
    </div>
    END Navbar Header -->

Another tip is to use Bootstaps native size classes to change size of the buttons.

http://getbootstrap.com/css/#buttons-sizes

 

Example: Replace all occurrences of -lg to -sm in ...../navbars.php and 01_03_order....module.js. You probably also want to change this code in navbars.php

      <!-- Ajax Polling Menu -->
      <div class="input-group input-group-lg btn-group navbar-form navbar-right" style="width:12%;min-width:200px;padding:0;margin-left:10px;margin-right:10px;" id="poller" data-toggle="buttons">
        <span class="input-group-addon"><i class="fa fa-cog"></i></span>
          <?php echo tep_draw_input_field('poll_timer', '20', 'id="poll_timer" class="form-control tooltip_set" data-placement="top" title="' . TOOLTIP_TIMEOUT . '" placeholder="20" style="width:55px;height:46px;"'); ?>

        <label class="btn btn-lg btn-default" style="padding: 9px 16px 8px 10px;" id="enable_button">
          <i class="fa fa-check fa-2 tooltip_set" data-placement="top" title="<?php echo TOOLTIP_ENABLE_POLLING; ?>" style="width: 20px;font-size:1.5em;"></i>
          <?php echo tep_draw_checkbox_field('long_poller'); ?>
        </label>

        <label class="btn btn-lg btn-danger active" style="padding: 9px 14px 8px 12px;z-index:100;" id="disable_button">
          <i class="fa fa-times fa-2 tooltip_set" data-placement="top" title="<?php echo TOOLTIP_DISABLE_POLLING; ?>" style="width: 20px;font-size:1.5em;z-index:0;"></i>
          <?php echo tep_draw_checkbox_field('long_poller'); ?>
        </label>
      </div>
      <!-- END Ajax Polling Menu -->

To This

      <!-- Ajax Polling Menu -->
      <div class="input-group input-group-sg btn-group navbar-form navbar-right" style="width:12%;min-width:200px;padding:0;margin-left:10px;margin-right:10px;" id="poller" data-toggle="buttons">
        <span class="input-group-addon"><i class="fa fa-cog"></i></span>
          <?php echo tep_draw_input_field('poll_timer', '20', 'id="poll_timer" class="form-control tooltip_set" data-placement="top" title="' . TOOLTIP_TIMEOUT . '" placeholder="20" style="width:55px;height:30px;"'); ?>

        <label class="btn btn-sm btn-default" style="" id="enable_button">
          <i class="fa fa-check fa-2 tooltip_set" data-placement="top" title="<?php echo TOOLTIP_ENABLE_POLLING; ?>" style="width: 20px;font-size:1.5em;"></i>
          <?php echo tep_draw_checkbox_field('long_poller'); ?>
        </label>

        <label class="btn btn-sm btn-danger active" style="" id="disable_button">
          <i class="fa fa-times fa-2 tooltip_set" data-placement="top" title="<?php echo TOOLTIP_DISABLE_POLLING; ?>" style="width: 20px;font-size:1.5em;z-index:0;"></i>
          <?php echo tep_draw_checkbox_field('long_poller'); ?>
        </label>
      </div>
      <!-- END Ajax Polling Menu -->

This will make all Navbar Buttons the second smallest size of the buttons on the link above, which will free up a lot more space.

 

 

 

He seems to be showing only the last 17 orders although there is over 800 in the database

 

Try to change the sorting to Pending and then back to All Orders.

 

This should fix all your bugs, right? Most of them was because of the faulty tep_db_fetch_all function in database.php.

 

 

I have made some updates to the Order Handler which I was planning to push to a new release this week but I'm not sure I will make it. Next week I will be away working abroad so I won't have any time to work on Add-Ons for probably a couple of weeks or a month or two. Well, we'll see how it goes! :ph34r:

Share this post


Link to post
Share on other sites

Ok will do

 

as mentioned the bugs are just mini bugs !!

 

Computer and Me say  "a really nice addon all credit great work"  :thumbsup:

 

:ph34r:  come on Ninja where you going hehe ??

 

*********************************************************************

 

"Also, in the same file, I'm not sure if I forgot to add this CSS rule which will hide long comments."

 

yeah was annoying me forgot to mention.

 

Ok Thanks have a nice break/change ...

 

Catch you later

 

Regards

 

John


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites
2:  ( mini error ) : the   /admin/get_table.php   add new record / search customer address is giving this error

[10-Sep-2014 14:37:49 America/New_York] PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /home/xxx/public_html/xxx/admin/includes/modules/order_handler/ajax_update.php on line 1408

 

Is line 1408 inside the get_customer or search_customers function?

 

I can't reproduce this error myself so post the entire function where this error occurs.

Share this post


Link to post
Share on other sites

Now have not applied all of your fixes yet but the line in question that the error is reporting  is /admin/includes/modules/order_handler/ajax_update.php on line 1408

 

It happens when I try the admin/orders/order handler r3/add new record (top right ) Search Customer Address  ( which I presume is a search function)

 

The line it refers to is ajax_update.php

$rs = $stmt_account->get_result();
 #Execute statement
    $stmt_account->execute();

    $rs = $stmt_account->get_result();
    $arr = $rs->fetch_all( MYSQLI_ASSOC );
    $account = $arr[0];
    $customers_id = $arr[0]['customers_id'];
    $stmt_account->close();

    return json_encode( $account );
  } # END get_customer

now maybe better I run the the updates first at the minute I have only updated the includes/functions/database.php

 

The ajax_update.php   I did have a few self made fixes and a few from the thread  so not sure if the error is real or is maybe fixed in your update module??

 

John

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Hi Jonas

 

Thanks for the latest add-on upload. I could successfully install the non-mysqlnd version. (Vanilla osC 2.3.4)

Now i created a list here with following mini bugs (as John likes to call them.)

 

Bug 1:

Invoice function inside the footer menu outputs an empty invoice page.
No customer info, no order details (except for order number and date), just the stylesheet is loaded nothing else.
This doesn't happen if I click the jquery ui invoice button inside the order detail page where it loads the vanilla osC invoice.
Tested with all three browsers. Same result.

Bug 2:

Calculation of the total amount is rounding up/down or not calculating properly. After the Tax value has been once edited/touched/changed.

Example:

I place an order, Products Samsung Galaxy Tab $749.99, Tax Rate is 0%, Flat rate shipping $5.00

Samsung Galaxy Tab $749.99
Flat Rate $5.00
-------------------------
Total: $754.99

That is correct but after changing the Tax Rate value to 7% it starts to round up the total and/or even calculate wrong.

Now it shows

Samsung Galaxy Tab: (excl.) $749.99 (incl.) $802.49
Flat Rate: $5.00
FL TAX 7.0%: $52.5
-----------------------------------------------------
Total: $807.00

it should say 807.49 and since the TAX RATE of 52.50 is not added it should probably not be in that place/position.
Maybe after the Total saying (Price incl. VAT $52.50) could look better.
Of course the total amount can be changed manually to the correct amount that is no problem at all but the purpose of it i think is to have it calculate automatically.
The other/old Order Editor also never really worked 100% perfect in this matter so I still think your Add-on is the better choice regarding this since
you allow the total amount to be changed manually.

Bug 3:

After adding a new record the customers name is showing the first name twice.
Example:

It should be John Doe but when I click on add new record, it finds the correct customer data but after i click save it shows John John in the Listing and Order Details (Shipping Address, Payment Address)
And when adding a new record it finds an existing custmor but it won't recognize it's country setting. I always have to choose the correct country.
Correct country should be Japan but i always get Jamaica. (Don't know if you are doing some weed stuff in private Dr. lol )

Bug 4:

Don't know if this is really a bug or intended but when leaving the suburb field empty it shows 3 underscores in the order details addresses. Can this be avoided and just keep it empty or even removed?

Bug 5: (already known bug)

Right click function doesn't work in Firefox. (I guess we could use Chrome to edit the orders.)

Bug 6: (support topic, post no. 140)

 

 

 regarding the operation of the Calculate Orders Totals - I select 2 or 3 items, click on Calculate Orders Total and then nothing appears,  Without anything selected I get a popup saying the totals are 0

 

Did the js file fix, didn't work for me. Still not working with firefox. (Here again we could use Chrome to edit orders then this is not an issue anymore.)

 

All in all it is an awesome feature this Order Handler and looking at all the files and code you must have spend hours and hours of coding into this add-on. So thank you *VERY* much for all your effort and great support in all of your support topics. :thumbsup:

 

Kind regards

Lambros

Edited by Tsimi

Share this post


Link to post
Share on other sites

Hi Jonas

 

Thanks for the latest add-on upload. I could successfully install the non-mysqlnd version. (Vanilla osC 2.3.4)

Now i created a list here with following mini bugs (as John likes to call them.)

 

Bug 1:

 

Invoice function inside the footer menu outputs an empty invoice page.

No customer info, no order details (except for order number and date), just the stylesheet is loaded nothing else.

This doesn't happen if I click the jquery ui invoice button inside the order detail page where it loads the vanilla osC invoice.

Tested with all three browsers. Same result.

 

Bug 2:

 

Calculation of the total amount is rounding up/down or not calculating properly. After the Tax value has been once edited/touched/changed.

 

Example:

 

I place an order, Products Samsung Galaxy Tab $749.99, Tax Rate is 0%, Flat rate shipping $5.00

 

Samsung Galaxy Tab $749.99

Flat Rate $5.00

-------------------------

Total: $754.99

 

That is correct but after changing the Tax Rate value to 7% it starts to round up the total and/or even calculate wrong.

Now it shows

 

Samsung Galaxy Tab: (excl.) $749.99 (incl.) $802.49

Flat Rate: $5.00

FL TAX 7.0%: $52.5

-----------------------------------------------------

Total: $807.00

 

it should say 807.49 and since the TAX RATE of 52.50 is not added it should probably not be in that place/position.

Maybe after the Total saying (Price incl. VAT $52.50) could look better.

Of course the total amount can be changed manually to the correct amount that is no problem at all but the purpose of it i think is to have it calculate automatically.

The other/old Order Editor also never really worked 100% perfect in this matter so I still think your Add-on is the better choice regarding this since

you allow the total amount to be changed manually.

 

Bug 3:

 

After adding a new record the customers name is showing the first name twice.

Example:

 

It should be John Doe but when I click on add new record, it finds the correct customer data but after i click save it shows John John in the Listing and Order Details (Shipping Address, Payment Address)

And when adding a new record it finds an existing custmor but it won't recognize it's country setting. I always have to choose the correct country.

Correct country should be Japan but i always get Jamaica. (Don't know if you are doing some weed stuff in private Dr. lol )

 

Bug 4:

 

Don't know if this is really a bug or intended but when leaving the suburb field empty it shows 3 underscores in the order details addresses. Can this be avoided and just keep it empty or even removed?

 

Bug 5: (already known bug)

 

Right click function doesn't work in Firefox. (I guess we could use Chrome to edit the orders.)

 

Bug 6: (support topic, post no. 140)

 

 

 

Did the js file fix, didn't work for me. Still not working with firefox. (Here again we could use Chrome to edit orders then this is not an issue anymore.)

 

All in all it is an awesome feature this Order Handler and looking at all the files and code you must have spend hours and hours of coding into this add-on. So thank you *VERY* much for all your effort and great support in all of your support topics. :thumbsup:

 

Kind regards

Lambros

 

I only glanced at your "mini bugs" ;) now but I noticed most of them myself when I tried the non-mysqlnd compatible version myself to help John with his problems.

 

I was hoping that someone else would take it upon them to make a version that was compatible without mysqlnd but since that obviously was not going to happen I kind of "threw together" a version that worked but I didn't do a lot of testing like I do with the "regular" version with mysqlnd support.

 

I have however on the new update I'm working on fixed probably most or all of the issues you have on the non-mysqlnd version and if I can't get a proper release ready before I leave next week I will post fixes for those errors.

 

Regarding Bug 4, this is intended and will not appear on invoices or inserted to database. It's only purpose is to easily make it possible to add a second row (suburb) to the address if the customer hasn't given one. Otherwise the row would be empty and not possible to edit.

 

Bug 5 can be fixed by commenting or removing a line in one of the javascript files, look at post #165 for solution.

Using the right click menu is totally optional, I never use it myself.

 

You can expand the order by clicking the two arrows pointing towards each other, column number five, counting from left. If you want the "click area" to be bigger then expand the column by dragging the left or right border of the column in the heading.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×