Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

Anyone having problems with ajax not working although it is turned on, here's what I had wrong - you MUST have atleast one Zone in the localization.

I deleted mine for later setup and the javascript for the editor gets stuck on a zone call.

 

tags: ajax, no ajax, ajax problem

Link to comment
Share on other sites

  • 2 weeks later...

I just tried to update a order after upgrading to 2.3.3.2 and recieved:

 

 

Edit Order #105 of 09/12/2013 19:13:36

 

Fatal error: Call to undefined function tep_add_base_ref() in /xxxxx/xxxxx/x/x/x/xxxx/xxx/adminlb/edit_orders_ajax.php on line 1149

 

The line reads: $email_order = tep_add_base_ref($email_order);

 

I don't know what is wrong with the code. Help Please.

Link to comment
Share on other sites

osCommerce does not contain a function named tep_add_base_ref(), nor is there a file named edit_orders_ajax.php. These are from something that you have added.

 

I would guess that you overwrote a modified file with a 2.3.3.2 file, thereby deleting the modifications. You can't do that. You need to patch the files manually according to the instructions in the upgrade package.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I have a new issue.

Order number #123 of #130 for example - I go to edit the order to add a product. The product is added just fine, but the shipping price disappears and the Total is not updated (neither minus shipping, nor plus new product). And the order dissappears from the orders list.

Had a look in the database and after adding the product, a new set of order_totals_id is set with the highest available numbers for order 123.

 

Now, here's the catch - I made a test order (ie. #131) and it edited completely fine. This leads me to think the problem is related to the order_totals_id (four of them) for that product are not supposed to set a higher number, rather ajax should just edit the values of the existing order_totals_id.

 

Anyone else had this problem?

I overwrote the ftp files associated with the editor, v 5.0.9 just in case, to no avail.

Edited by Fyod
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Hi everyone,

 

I'm using order editor 5.0.5. My problem is when I want to edit an order and when I want to change shipping charge, I doesn't work, it's disappear and do not add to order total.

 

Here is my error message:

 

"You have selected a shipping method for this order but it appears tehre is not one already stored in database. Would you like to add this shipping charge to the order?"

 

Any way yes or no options doesn't matter

 

Thanks for your help

Edited by muzik
Link to comment
Share on other sites

  • 4 weeks later...

Hello

I have a problem too :-

The ot_subtotal is every time a integer. If there is a double value with decimal value in "Gesamt" there will be shown only a integer value without decimal values in Subtotal ("Zwischensumme"). On which point the ot_subtotal will be calculated?

Thanks.

post-106845-0-97567600-1384932856_thumb.jpg

Link to comment
Share on other sites

I get this error, do you have some suggestion how to fix it?

 

 

 

Warning: in_array() expects parameter 2 to be array, null given in/var/www/vhosts/catalog/admin/edit_orders.php on line 569

 

Warning: in_array() expects parameter 2 to be array, null given in/var/www/vhosts/catalog/admin/edit_orders.php on line 569

 

I know that this is old... but could you fix the problem?

I have the same situation: when I try to add a product I receive this error:

 

Warning: in_array() expects parameter 2 to be array, null given in /home/oceanmab/public_html/web/admin/edit_orders.php on line 590

 

Warning: in_array() expects parameter 2 to be array, null given in /home/oceanmab/public_html/web/admin/edit_orders.php on line 590

Link to comment
Share on other sites

  • 2 weeks later...

I have just added this to my v2.3.3.4 store - A great add-on indeed!

 

However I am having a minor problem with url encoding in emails sent from the edit_orders_ajax.php file.

 

The order update email that is sent out includes a link back to the order as below:

 

Detailed Invoice: https://www.mydomain.co.uk/account_history_info.phpEURorder_id=16743

 

As you can see the parameters are preceded by 'EUR' instead of '?' which obviously results in a broken link.

 

I think this probably has something to do with UTF8 encoding, but this is something I really know nothing about, can anybody make any suggestions as to how I could go about trying to fix this?

 

Thanks - Paul

Link to comment
Share on other sites

  • 1 month later...

Hey, this is a great contribution!! Just one thing is a bit annoying and I don't know how to get it right. I would like the default payment method to be an actual payment method instead of the default text : Payment on Local Pickup. We accept cash, Interac, Visa and Master Card....

 

Any ideas how to change it>?

Link to comment
Share on other sites

  • 1 month later...

I have just added this to my v2.3.3.4 store - A great add-on indeed!

 

However I am having a minor problem with url encoding in emails sent from the edit_orders_ajax.php file.

 

The order update email that is sent out includes a link back to the order as below:

 

Detailed Invoice: https://www.mydomain.co.uk/account_history_info.phpEURorder_id=16743

 

As you can see the parameters are preceded by 'EUR' instead of '?' which obviously results in a broken link.

 

I think this probably has something to do with UTF8 encoding, but this is something I really know nothing about, can anybody make any suggestions as to how I could go about trying to fix this?

 

Thanks - Paul

 

Same problem... anyone have any idea?

-Dave

Link to comment
Share on other sites

  • 2 weeks later...

I have a problem with this add on. I have used it for the past 2 years with no problems. Then one day it quit working, not completely but most of it. I can click on the edit and it carries me to the next screen. The only thing I can see is customer, shipping address and billing address blocks. They are populated with the customer info, but there is nothing under that. There product info, or no way to change anything.

 

I re-installed the version 5.07 that I was using and still no better.

 

Please help.

Link to comment
Share on other sites

And the last complex warning!!!

OE shopping cart has a great bug when deal with attributes, products weight and attributes weight. So some shipping modules dealing with weight gives incorrect results.

 

I am wondering if anyone has a solution for this.

Currently struggling with the weight calculation. If the order has products with no attributes, the weight calculation is 100% correct and passed to the shipping modules quotations correctly.

However, when there are products with attributes, seems like the calculation skips them, and the weight based quotations show smaller weight and thus cheaper quotations.

Any help will be greatly appreciated.

Link to comment
Share on other sites

Hi,

 

Not sure but may help

 

http://www.oscommerce.com/forums/topic/338661-contribution-option-types-v2/page__st__480#entry1503443

 

Would depend what version of osc you are using I seem to remember it is an rc2 version or??

 

There is also somewhere in the forum the instructions for order editor compatibility

 

You would need to install from the forum explanation

 

for 2.3.3.4 the option types is just being updated as what is available is buggy it will take maybe a week or more but the older rc2 would work

 

Regards

Joli

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

 

Link to comment
Share on other sites

Thank you very much, John. Yes, I am using RC2a.

I don't think the thread you mentioned is related to my issue, although I might be wrong.

To clarify, my issue, as reported by multiple other members on this thread for the past few years, is this:

When there are products with attributes in the order, the total weight calculation calculates only 1 listed attribute line and skips the rest, for example:

 

Product-1

5pc x size 3

3pc x size 6

9pc x size 7

 

Product-2 (no attributes) x 10pc

 

Product-3 (no attributes) x 8pc

 

Product-4

5pc x size 7

12pc x size 9

 

Product-5 (no attributes) x 11pc

 

 

In this case, it will calculate the total weight of Products 2,3 & 5 just fine, as they have no attribute.

But, for products 1 and 4 it calculates only 1 from the list, so for product-1 it may calculate its weight as

either Product-1 x 5pc

or

Product-1 x 3pc

or

Product-1 x 9pc

 

Ignoring the rest of the attribute lines.

 

Same goes for product-4. It will calculate its weight as

either Product-4 x 5pc

or

Product-4 x 12pc

 

 

Weight calculations work just fine on the catalog side, the only problem is in the order editor. Any solution? (I'm really desperate...)

Edited by dr_lucas
Link to comment
Share on other sites

  • 2 weeks later...

I have run into a problem. I have been using order editor and running under 2.3.3.4. I whitched sales tax program over to "oscommerce_taxrates" because it is a lot cleaner to update and run. Runs great in checkout but not at all in order editor. When you go and add an item it gets a headack, greating the followin error code:

 

Warning: require_once(includes/modules/taxrates/func.taxrates.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/l/a/d/lady3597/html/includes/modules/order_total/ot_taxrates.php on line 37

 

Fatal error: require_once() [function.require]: Failed opening required 'includes/modules/taxrates/func.taxrates.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/l/a/d/lady3597/html/includes/modules/order_total/ot_taxrates.php on line 37

 

This error is coming from the new add on (oscommerce_taxrates).

 

Any solutions to get it to work with order editor.

Thanks

Link to comment
Share on other sites

You've got several problems here:

1) Your English makes it a bit hard to understand what you are trying to say, better use a spell checker next time.

2) You should post the code of line 37, also a few lines before and after can help.

3) You are posting in osCommerce forums, which are kind of dead or nobody really seem to care anymore about reading topics, not to mention helping each other these days, except for very very few nice folks, so don't expect much of help here...

Having said that, I will try to help you, if I can.

Link to comment
Share on other sites

Trying to get Order Editor, to pull sales tax from the new add on: osCommerce Taxrates program. It allows me to pull down state tax (from web site) by zipcode without having to rekey every zip code as does ot_tax. OSC taxrates is a much smoother program. Download the program and you can see the files. http://addons.oscommerce.com/info/8985

 

The admin/edit_orders_add_product.php is not picking up the correct new tax amount. It errors out.

 

I just need OE to be able to pick up the ot_taxrates instead of the old ot_tax. I tried to change admin/edit_order_process.php line 243 from class=>ot_tax to ot_taxrates and admin/edit_orders.php lines 509, 513, 515, 569 & 1684 from ot_tax to ot_taxrates and admin/edit_orders_ajax.php lines 312, 316, 318, 372 & 851 from ot_tax to ot_taxrates. That had no effect. Still had the same error as above.

 

The osC taxrates addon / added 4 new parts to the customer side.

catalog/includes/lang/eng/mod/order_total/ot_taxrates.php

catalog/includes/mod/order total/ot_taxrates.php

catalog/includes/mod/taxrates/func.taxrates.php

catalog/includes/mod/taxrates/taxtables/(csv file - taxrates.com)

 

I think we need to add func.taxrates to the admin side and ot_taxrates also.

 

Did not update anything on the admin side for order editor. Hope this helps. For those of us whos states has a lot of sales tax codes (mine has 501) Osc taxrates program is a time saver and smoother. Thanks for your help.

Link to comment
Share on other sites

First, I am not sure why your module directories are set as /mod/ instead of /modules/, this can be what's causing the problem...or u were just lazy to write the full path? :P

If they are set as /modules/ try this and see if it helps.

 

Go to /home/content/l/a/d/lady3597/html/includes/modules/order_total/ot_taxrates.php

 

Change this line

require_once DIR_WS_MODULES . 'taxrates/func.taxrates.php';

 

To this

// require_once DIR_WS_MODULES . 'taxrates/func.taxrates.php';

function taxrates_lookup_tax($order, $products) {
 global $db, $messageStack;

 // Calculate the coupon discount amount for fixed value coupons only
  if ($_SESSION['cc_id']) {
   $coupon = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_id = '" . (int)$_SESSION['cc_id'] . "'");
   if ($coupon->fields['coupon_type'] == 'F') {
     $coupon_value = $coupon->fields['coupon_amount'] * -1;
   }
 }

 // Get taxable address information.
 if (MODULE_ORDER_TOTAL_TAXRATES_ADDRESS == "shipping") {
   $region = $order->delivery['state'];
   $zip = $order->delivery['postcode'];
 }
 else {
   $region = $order->billing['state'];
   $zip = $order->billing['postcode'];
 }

 // State data used to convert state long names to two character abbreviation
 $states = array(
   'AL' => ('Alabama'),
   'AK' => ('Alaska'),
   'AZ' => ('Arizona'),
   'AR' => ('Arkansas'),
   'CA' => ('California'),
   'CO' => ('Colorado'),
   'CT' => ('Connecticut'),
   'DE' => ('Delaware'),
   'DC' => ('District Of Columbia'),
   'FL' => ('Florida'),
   'GA' => ('Georgia'),
   'HI' => ('Hawaii'),
   'ID' => ('Idaho'),
   'IL' => ('Illinois'),
   'IN' => ('Indiana'),
   'IA' => ('Iowa'),
   'KS' => ('Kansas'),
   'KY' => ('Kentucky'),
   'LA' => ('Louisiana'),
   'ME' => ('Maine'),
   'MD' => ('Maryland'),
   'MA' => ('Massachusetts'),
   'MI' => ('Michigan'),
   'MN' => ('Minnesota'),
   'MS' => ('Mississippi'),
   'MO' => ('Missouri'),
   'MT' => ('Montana'),
   'NE' => ('Nebraska'),
   'NV' => ('Nevada'),
   'NH' => ('New Hampshire'),
   'NJ' => ('New Jersey'),
   'NM' => ('New Mexico'),
   'NY' => ('New York'),
   'NC' => ('North Carolina'),
   'ND' => ('North Dakota'),
   'OH' => ('Ohio'),
   'OK' => ('Oklahoma'),
   'OR' => ('Oregon'),
   'PA' => ('Pennsylvania'),
   'RI' => ('Rhode Island'),
   'SC' => ('South Carolina'),
   'SD' => ('South Dakota'),
   'TN' => ('Tennessee'),
   'TX' => ('Texas'),
   'UT' => ('Utah'),
   'VT' => ('Vermont'),
   'VA' => ('Virginia'),
   'WA' => ('Washington'),
   'WV' => ('West Virginia'),
   'WI' => ('Wisconsin'),
   'WY' => ('Wyoming'),
   'AA' => ('Armed Forces (Americas)'),
   'AE' => ('Armed Forces (Europe, Canada, Middle East, Africa)'),
   'AP' => ('Armed Forces (Pacific)'),
   'AS' => ('American Samoa'),
   'FM' => ('Federated States of Micronesia'),
   'GU' => ('Guam'),
   'MH' => ('Marshall Islands'),
   'MP' => ('Northern Mariana Islands'),
   'PW' => ('Palau'),
   'PR' => ('Puerto Rico'),
   'VI' => ('Virgin Islands'),
 );

 // Array of states that require separately identified shipping to be taxed
 $shipping_states = array('AR','CT','DC','GA','HI','IN','KS','KY','MI','MN','MS','NE','NJ','NM','NY','NC','ND','OH','PA','SC','SD','TN','TX','VT','WA','WV','WY');  

 $tr_state = array_search($region, $states);
 $rate_date = MODULE_ORDER_TOTAL_TAXRATES_DATE;

 $tax_rate = 0;
 $n = 0;

 // Exit if delivery state is not a TaxRate state.
 $taxrates_states = array();
 $taxrates_states_str = MODULE_ORDER_TOTAL_TAXRATES_STATES;
 if ($taxrates_states_str) {
   $taxrates_states = explode(", ", $taxrates_states_str);
   if (in_array($tr_state, $taxrates_states)) {
     if (file_exists(DIR_WS_MODULES . 'taxrates/taxtables/TAXRATES_ZIP5_' . $tr_state . '' . $rate_date . '.csv')) {
       $file = fopen(DIR_WS_MODULES . 'taxrates/taxtables/TAXRATES_ZIP5_' . $tr_state . '' . $rate_date . '.csv', 'r');
       $data = array();
       while($row = fgetcsv($file)) {
         $data[] = $row;
         if ($data[$n][1] == $zip) {
           $tax_rate = $data[$n][4];
           break;
         }
         $n ++;
       }
       fclose($file);
     }
     else {
       $messageStack->add('checkout_confirmation', 'Error: TaxRates did not find a data file for this selected state.', 'error');
       if ($messageStack->size('checkout_confirmation') > 0) echo $messageStack->output('checkout_confirmation');
     }
   }
 }
 else {
   $messageStack->add('checkout_confirmation', 'Error: Please configure the TaxRates states.', 'error');
   if ($messageStack->size('checkout_confirmation') > 0) echo $messageStack->output('checkout_confirmation');
 }

 $taxable_amount = 0;
 $total_amount = 0;
 foreach ($products as $k => $product) {
   $line_value = $product['final_price'] * $product['qty'];
   $taxable_amount = $taxable_amount + $line_value;
   $total_amount = $total_amount + $line_value;
 }

 // Adjust taxable amount for fixed coupon amount
 if ($coupon->fields['coupon_type'] == 'F') {
   $taxable_amount = $taxable_amount + $coupon_value;
   $total_amount = $total_amount + $coupon_value;
 }

 // Adjust taxable amount for percentage coupon amount
 if ($coupon->fields['coupon_type'] == 'P') {
   $taxable_amount = $taxable_amount + (int)$coupon->fields['coupon_amount'] * -1 * $prod_total /100;
   $total_amount = $total_amount + (int)$coupon->fields['coupon_amount'] * -1 * $prod_total /100;
 }

 // Include shipping cost in taxable amount for selected States
 if (in_array($tr_state, $shipping_states)) {
   $ship_tax = $order->info['shipping_cost'];
   $taxable_amount = $taxable_amount + $ship_tax;
 }
 $total_amount = $total_amount + $ship_tax;

 // Calculate sales tax - rate * total taxable amount
 $sales_tax = $taxable_amount*$tax_rate;

 // Return sales tax data
 $tax_data = array(
   'tax_amount' => $sales_tax,
   'taxable_amount' => $taxable_amount,
   'total_amount' => $total_amount + $sales_tax,
   );
 return $tax_data;
}

Link to comment
Share on other sites

By the way, thinking again, I am pretty sure that your configure.php in the /includes and /admin/includes are pointing to a different DIR_WS_MODULES directory, I bet one is to modules and the other one to mod, which is incorrect and should be the same in both of the configuration files and of course should match your directory tree.

So, check this first...

Link to comment
Share on other sites

yes being lazy. :)

just looked at admin/includes/configure.php and it says define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

and includes/configure.php says define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

Link to comment
Share on other sites

Cool. Did u try editing the file I suggested?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...