If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Started by divavocals on 4 Dec 2010, 6:07 PM · Views: 84,220

Results 181 to 200 of 660
19 Jan 2011, 7:09 PM
#181
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Great point!!!:smile:

This DEFINITELY a Zen Cart thing, and I ran into the same kind of issues myself when testing this and other modules.. Apparently Zen Cart doesn't like it when you keep previous versions of other files. So regardless as to whether you are installing this module or others, if you are doing file merges, ALWAYS make sure that you do not upload the .bak files your file merge program may create.. AND do not even upload previous version of the same files along with the new version (even if you rename them you may run into erros from blank pages or other related errors)

soxophoneplayer:

Admin login lost when updating.

I updated this mod from v 3.02 to 3.03 on my zc 1.3.9h (test site only). I lost my admin login, replaced with a blank page. Front end of store worked fine.

Peeking in the cache/debug files, I was getting a "can not re-declare zen_bd_scrub in ()..." message. This was in ref to admin/includes/functions/extra_functions/common_orders_functions.php.

When I edit/merge or replace files there is always a .bak file created - I don't know if this is a zen cart thing or a windows thing. But anyway, common_orders_functions.php.bak was clearly not playing nice with the new file. When I removed the .bak file everything returned to normal and my login worked fine.

I post this in case someone else hits the same snag ;o)

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

22 Jan 2011, 6:15 AM
#182
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

I've run into the 'blank admin' issue.

I initially installed ver 3.02 per instructions and everything looked fine except the 'update' button was not showing in the orders. Once I clicked where the button should be, everything went away.

So I came here, found the new version 3.03, followed the directions in it. Same result. Blank admin.

I went thru and removed all of the Edit Orders files, reuploaded the original 1.3.9h orders.php and ran the uninstall sql via phpMyAdmin in cpanel (since I couldn't access my admin to do it).

It's still blank and I'm getting the following in my debug file:

[21-Jan-2011 23:17:01] PHP Warning:  require(includes/languages/1.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/xxxxxx/public_html/xxxxxx/includes/init_includes/init_languages.php on line 35
[21-Jan-2011 23:17:01] PHP Warning:  require(includes/languages/1.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/xxxxx/public_html/xxxxx/includes/init_includes/init_languages.php on line 35
[21-Jan-2011 23:17:01] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/1.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/xxxxx/includes/init_includes/init_languages.php on line 35

Note: This is the same thing it said when the blank pages originally appeared. So I'm getting the same error even after uninstalling everything which makes no sense to me. I've uninstalled many a mod and everything always went back to normal. :huh:

I'm running:

Zencart version 1.3.9h (new install - not an upgrade)
PHP Version: 5.2.15
Server OS: Linux 2.6.34.6
Database: MySQL 5.1.52

Using Filezilla 3.3.5.1 to FTP

Mods Installed:

User Tracking
Database Backup - MySQL
Easy Populate
Reward Points Suite
Image Handler
Fual Slimbox
Quick Updates
Black-Admin Theme
Sales Report

I tried // out the line referred to in the debug file (includes/init_includes/init_languages.php on line 35) just to see what would happen and the admin did come back, but all the headers/text was fubarbed. (EX: HEADER_TITLE_TOP)

If you can help me figure out how to get my admin back to normal, I will be eternally grateful. :smile:

I'll finish that project tomorrow, I've made enough mistakes today!

22 Jan 2011, 6:56 AM
#183
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Dunno what else to say here.. v3.03 resolves the blank page and language errors. The code that was the cause of the problem is no longer there and there is no other reason for the error to appear unless you have somehow not replaced your current files with the ones from the v3.03 fileset..

Suggest making a backup and doing a file comparison between the v3.03 fileset and files in your store.. I'm fairly certain you will find that somehow the files in place are not from the current fileset..

Boggled:

I've run into the 'blank admin' issue.

I initially installed ver 3.02 per instructions and everything looked fine except the 'update' button was not showing in the orders. Once I clicked where the button should be, everything went away.

So I came here, found the new version 3.03, followed the directions in it. Same result. Blank admin.

I went thru and removed all of the Edit Orders files, reuploaded the original 1.3.9h orders.php and ran the uninstall sql via phpMyAdmin in cpanel (since I couldn't access my admin to do it).

It's still blank and I'm getting the following in my debug file:

[21-Jan-2011 23:17:01] PHP Warning: require(includes/languages/1.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/xxxxxx/public_html/xxxxxx/includes/init_includes/init_languages.php on line 35
[21-Jan-2011 23:17:01] PHP Warning: require(includes/languages/1.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/xxxxx/public_html/xxxxx/includes/init_includes/init_languages.php on line 35
[21-Jan-2011 23:17:01] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/1.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/xxxxx/includes/init_includes/init_languages.php on line 35

> 
> I'm running:
> 
> Zencart version 1.3.9h  (new install - not an upgrade)
> PHP Version: 5.2.15
> Server OS: Linux 2.6.34.6  
> Database: MySQL 5.1.52
> 
> Using Filezilla 3.3.5.1 to FTP
> 
> 
> Mods Installed:
> 
> User Tracking
> Database Backup - MySQL
> Easy Populate
> Reward Points Suite
> Image Handler
> Fual Slimbox
> Quick Updates
> Black-Admin Theme
> Sales Report
> 
> 
> I tried // out the line referred to in the debug file (includes/init_includes/init_languages.php on line 35)  just to see what would happen and the admin did come back, but all the headers/text was fubarbed.  (EX:  HEADER_TITLE_TOP)
> 
> If you can help me figure out how to get my admin back to normal, I will be eternally grateful.  :smile:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

2 Feb 2011, 2:35 PM
#184
gearheadniko avatar

gearheadniko

New Zenner

Join Date:
Oct 2009
Posts:
63
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Hello Diva et al, Thank you for the great job.

Zen Cart 1.3.9h
Database Patch Level: 1.3.9h
PHP Version 5.2.15
super_orders_30
edit_orders_v3.02
better_together_2.3a
jscroller_sidebox_package_2-1
return_authorization_v2-3-3a
order_total_insurance by Numinix
userCurrency (when a customer logs in currency is auto selected)
simple_google_analytics_ver1-2-2
corner_site_seal_1.0
FR-lang-zen-cart-v1.3.9-1.0 (not being used)

Everything works great, no blank pages no error messages. I have looked through both forums for others with my situation but no luck.
I use Super Orders and Edit orders to simply add a serial# to the product description line. The Edit order page comes up fine except that the tax is set at 0% beside the shipping charge. If I do not insert the correct tax rate before I update the total gets reset to no tax on shipping. Any help would be appreciated. Thanks again for all your hard work.
Niko

2 Feb 2011, 4:55 PM
#185
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Edit Orders has ALWAYS worked this way (hence the on-screen hint that indicates that the shipping tax rate is not saved in the database)

gearheadniko:

Hello Diva et al, Thank you for the great job.

Zen Cart 1.3.9h
Database Patch Level: 1.3.9h
PHP Version 5.2.15
super_orders_30
edit_orders_v3.02
better_together_2.3a
jscroller_sidebox_package_2-1
return_authorization_v2-3-3a
order_total_insurance by Numinix
userCurrency (when a customer logs in currency is auto selected)
simple_google_analytics_ver1-2-2
corner_site_seal_1.0
FR-lang-zen-cart-v1.3.9-1.0 (not being used)

Everything works great, no blank pages no error messages. I have looked through both forums for others with my situation but no luck.
I use Super Orders and Edit orders to simply add a serial# to the product description line. The Edit order page comes up fine except that the tax is set at 0% beside the shipping charge. If I do not insert the correct tax rate before I update the total gets reset to no tax on shipping. Any help would be appreciated. Thanks again for all your hard work.
Niko

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

2 Feb 2011, 6:32 PM
#186
gearheadniko avatar

gearheadniko

New Zenner

Join Date:
Oct 2009
Posts:
63
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Thanks Diva, I'll look forward to any updates on this great add on
Niko

4 Feb 2011, 12:41 AM
#187
xcooling avatar

xcooling

New Zenner

Join Date:
Apr 2008
Location:
internet
Posts:
41
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Busy with a nice update for you guys :P

[ updates | coding | maintenance | bug fixes | dedicated servers ]

4 Feb 2011, 1:24 AM
#188
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

xcooling:

Busy with a nice update for you guys :PCan't wait to see it...:smile:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

9 Feb 2011, 8:28 AM
#189
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Run into a "bummer" - Edit order (V3.03) doesn't take multiple taxes as well as ZenCart (1.3.9h). I do understand that this is a minor issue for most, but it would of course be nice if the functionality was consistent throughout the system....

9 Feb 2011, 8:37 AM
#190
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Forgot to mention - it DOES show all the tax classes, but the value is the same in all, which is shouldn't be, as the order contained only one tax this time...

9 Feb 2011, 9:17 AM
#191
xcooling avatar

xcooling

New Zenner

Join Date:
Apr 2008
Location:
internet
Posts:
41
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

exactly which values ?
tax per each product ?
tax on total ?

[ updates | coding | maintenance | bug fixes | dedicated servers ]

9 Feb 2011, 9:19 AM
#192
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Rumbling along.... It would seem like - in edit_orders.php - that it would be smarter to use table orders_products instead of table orders_total, because the former contains real tax values. Assuming one wants to solve the problem!

Forgot to mention that "order totals" is the area, which doesn't work! Every different tax class has the same value. It is the correct value for one of the tax classes, but now it's "everywhere".

9 Feb 2011, 1:01 PM
#193
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

kalastaja:

Rumbling along.... It would seem like - in edit_orders.php - that it would be smarter to use table orders_products instead of table orders_total, because the former contains real tax values. Assuming one wants to solve the problem!

Forgot to mention that "order totals" is the area, which doesn't work! Every different tax class has the same value. It is the correct value for one of the tax classes, but now it's "everywhere".Somewhere in the old support thread are Scott's old messages on taxes and Edit Orders WHY it's not as "easy" a fix as it appears (and thus why he did not address this). If I get some time I'll try to look them up and post 'em (I may have already post some of these links here). If you want a FULL understanding of the issue, you should search the old support thread for the search terms "taxes" and "sturner"..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

9 Feb 2011, 1:41 PM
#194
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

OK, but using table orders_products instead of table orders_total to keep the taxes apart, would seem a good way to go!? What then remains is to update the table orders_total with the new values. Yes?

9 Feb 2011, 1:46 PM
#195
xcooling avatar

xcooling

New Zenner

Join Date:
Apr 2008
Location:
internet
Posts:
41
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

can u show an example of how u want the total to display ?

Because im not understanding what you are trying to acheive.
Do u want to use different tax classes for the products or display different (multiple) tax totals ?
In the current edit_orders it will only display 1 tax total called "ot_tax", as it overwrites.

edit_orders 3.5

if ($sendtotaltoorders == 2)  {  
 // Update Taxes in TABLE_ORDERS
$Query = "UPDATE " . TABLE_ORDERS . " SET order_tax = '".ot_value."' WHERE orders_id = '".$oID."'";
//die("Line:954: ".$Query);
$db -> Execute($Query);
}

from orders.php

      /*********************************************
       * Calculate taxes for this product
       *********************************************/
      $shown_price = (zen_add_tax($this->products[$index]['final_price'] * $this->products[$index]['qty'], $this->products[$index]['tax']))
      + zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']);
      $this->info['subtotal'] += $shown_price;
      $this->notify('NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE', array('shown_price'=>$shown_price));
      // find product's tax rate and description
      $products_tax = $this->products[$index]['tax'];
      $products_tax_description = $this->products[$index]['tax_description'];

      if (DISPLAY_PRICE_WITH_TAX == 'true') {
        // calculate the amount of tax "inc"luded in price (used if tax-in pricing is enabled)
        $tax_add = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
      } else {
        // calculate the amount of tax for this product (assuming tax is NOT included in the price)
//        $tax_add = zen_round(($products_tax / 100) * $shown_price, $currencies->currencies[$this->info['currency']]['decimal_places']);
        $tax_add = ($products_tax/100) * $shown_price;
      }
      $this->info['tax'] += $tax_add;
      foreach ($taxRates as $taxDescription=>$taxRate)
      {
        $taxAdd = zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate)
                +  zen_calculate_tax($this->products[$index]['onetime_charges'], $taxRate);
        if (isset($this->info['tax_groups'][$taxDescription]))
        {
          $this->info['tax_groups'][$taxDescription] += $taxAdd;
        } else
        {
          $this->info['tax_groups'][$taxDescription] = $taxAdd;
        }
      }
      /*********************************************
       * END: Calculate taxes for this product
       *********************************************/
      $index++;
    }

[ updates | coding | maintenance | bug fixes | dedicated servers ]

9 Feb 2011, 1:57 PM
#196
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]


Yes, we do have 4 different tax classes. The only one in the picture that should contain a value other than 0 is "13%".

9 Feb 2011, 2:04 PM
#197
xcooling avatar

xcooling

New Zenner

Join Date:
Apr 2008
Location:
internet
Posts:
41
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

.. i can fix that. (will need array dumps or dev access)

Are you having the following issue:
after you edit the order, the tax values get changed / overwritten ?

[ updates | coding | maintenance | bug fixes | dedicated servers ]

9 Feb 2011, 2:08 PM
#198
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

kalastaja:

OK, but using table orders_products instead of table orders_total to keep the taxes apart, would seem a good way to go!? What then remains is to update the table orders_total with the new values. Yes?Again you should find Scott's old posts on this topic.. there is a VERY GOOD reason why this doesn't work the way YOU think it should work.. Now I don't remember all details of these old posts, but I do remember that multiple taxes appeared to be a LOT MORE complicated to resolve and that's why Scott never tackled it..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

9 Feb 2011, 2:15 PM
#199
xcooling avatar

xcooling

New Zenner

Join Date:
Apr 2008
Location:
internet
Posts:
41
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

Are you having the following issue:
after you edit the order, the tax values get changed / overwritten ?

[ updates | coding | maintenance | bug fixes | dedicated servers ]

9 Feb 2011, 2:34 PM
#200
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]

... there is a VERY GOOD reason why this doesn't work the way YOU think it should work ...
Might be, but then again maybe not... I assume "can be done" if I don't see any major flaw. Tax info is per product and the necessary tax values are saved in orders_products for each product. Updating the orders_total is the only hassle!

.. i can fix that. (will need array dumps or dev access)
What exactly are you going to fix? A new version of edit_order.php would seem enough.

edit_orders 3.5
Didn't see your code examples before - current question "3.5"? I'm using Edit Orders V3.03!