New Zenner
- Join Date:
- Jul 2013
- Posts:
- 9
- Plugin Contributions:
- 0
Edit Orders v4.0 Support Thread
DivaVocals:
Start by upgrading to the latest version (4.1.2)
Any ideas with my problem? Please give me a path.
Views: 345,921
New Zenner
DivaVocals:
Start by upgrading to the latest version (4.1.2)
Any ideas with my problem? Please give me a path.
Totally Zenned
smurfy1:
...
Ok the error was this:
[10-Oct-2013 10:15:32 America/New_York] PHP Fatal error: Call to undefined function GetRewardPoints() in /home/creative/public_html/includes/modules/order_total/ot_reward_points_display.php on line 40
...
The product pricing will but the subtotal stays the same as the original order
If an error occurs in an Order Total module such as "reward points" it will cause problems with order totals in "Edit Orders". The most common issue we see with Order Total modules is many are not coded to work when loaded in the Zen Cart admin interface. This is documented in the readme.
Most likely your "reward points" module includes some additional files (such as extra_functions) which are not available to the admin (and not loaded on the fly by the order total module at runtime if needed). Easiest solution would be to copy the relevant files (probably a file in "/includes/functions" or "/includes/functions/extra_functions") to the corresponding location on the admin side of Zen Cart.
Totally Zenned
Maladi3:
... I use table discounts to do 90 percent of our store. ... with this new plugin my Table discounts dont show up right inside the invoices.
The "Table Discounts" module is commercial. I do not own a copy of the module and as such am not able to look at the source code to determine the exact cause of the problem.
By default the order total values are passed to and from the Zen Cart database untouched... So if they are entered as negative they stay negative and if they are entered as positive they are left as positive... Which works for about 85% of order total modules.
Some order total modules do need special handling if the modules expect certain global variables or session variables to be populated. It is possible "Table Discounts" is one of these modules will require some special handling. Without knowing the special handling required... It will be hard for us to help you.
New Zenner
lhungil:
Try making the following change (to Edit Orders 4.1.2) and let us know if it solves the problem for you (if you report it fixes the issues - the code will be added to the next release of Edit Orders).
Edit "/admin/edit_orders.php". Around line 245 change the int cast to a float cast. The original code looks like:
$_POST['update_products'] = zen_db_prepare_input($_POST['update_products']);
foreach($_POST['update_products'] as $orders_products_id => $product_update) {
$product_update['qty'] = (int) $product_update['qty'];
> After making your changes the code should look like:
> ```
$_POST['update_products'] = zen_db_prepare_input($_POST['update_products']);
foreach($_POST['update_products'] as $orders_products_id => $product_update) {
$product_update['qty'] = (float) $product_update['qty'];
Thanks!!! It works...
Totally Zenned
nlinksolution:
Sorry i haven't check exact version and said 4.0 because thread title.
But the version i am using for edit order is latest 4.1.2
Just for future reference, ALWAYS provide the EXACT version when reporting issues -- not just for this module, but any module..
Totally Zenned
nlinksolution:
Thanks!!! It works...
Awesome, thank you for letting us know!
New Zenner
I am having a bit of an issue with adding edit order to my Zen Cart install. My problem is that after I have it installed it seems to function normally with the exception that it does not recalculate and additions or subtractions from the order total. Even after using the manual update button no changes are happening to the total. I have already tried an uninstall and re-install of edit orders. This is a newly installed Zen Cart store with only test items. Hopefully someone will have a suggestion.
Here is what I have installed.
Zen Cart 1.5.1
edit orders 4.1.2
easy populate 1.5
quantity discounts 1.12
payment module fee
admin login as customer 3.1
admin new order 1.4
add customers from admin 2.0.5
ckeditor 4.1.2
Totally Zenned
twinkiejr:
I am having a bit of an issue with adding edit order to my Zen Cart install. My problem is that after I have it installed it seems to function normally with the exception that it does not recalculate and additions or subtractions from the order total. ...
Going to "guess" this is an incompatibility between "Edit Orders" and "Quantity Discounts". "Quantity Discounts" does not fully support being loaded and run from the admin interface (for good reason) and at this time no "special" handling has been added to "Edit Orders" for the "Quantity Discounts" order total module.
Just to double check:
New Zenner
lhungil:
Just to double check:
Thanks for the reply.
It does not help to disable "Quantity Discounts". Both "ot_subtotal" and "ot_total" are enabled. I will look in the logs to see if it shows anything. I have setup a second test site and have loaded edit orders and it works. So now I am working through each additional module that to see which one kills edit orders. I will post when that is done in-case it may help someone else.
Totally Zenned
twinkiejr:
Thanks for the reply.
It does not help to disable "Quantity Discounts". Both "ot_subtotal" and "ot_total" are enabled. I will look in the logs to see if it shows anything. I have setup a second test site and have loaded edit orders and it works. So now I am working through each additional module that to see which one kills edit orders. I will post when that is done in-case it may help someone else.
Thank you for replying... Much appreciated if you can narrow down what module is conflicting (so we can look at creating a solution).
Totally Zenned
mydanilo:
PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED
Result looks exactly like in your pictureand I want to add that on the front end all options are working correctly for all products
and I am totally lost by the info in the link you provided, sorry! SQL stuff is not my strength. Can you point out what I should run and look for? I have cpanel access.
@lhungil I still have the issue and no clue where else to look. As it looked like you suggested, do you have another suggestion what this could be?
Totally Zenned
I've tried in a test install to use all Edit Orders files and did not merge with other mods just to be sure I have all in place for this mod to work. Same result. Can't select any attributes when adding new products. Screws up items already on order with attributes too. If I adjust the unit price of an item, the totals are wrong. I think it just keeps adding the price to the total every time I update with a corrected unit price.
Totally Zenned
mydanilo:
I've tried in a test install to use all Edit Orders files and did not merge with other mods just to be sure I have all in place for this mod to work. Same result. Can't select any attributes when adding new products. Screws up items already on order with attributes too. If I adjust the unit price of an item, the totals are wrong. I think it just keeps adding the price to the total every time I update with a corrected unit price.
Did you try a test install with a VANILLA Zen Cart install.. because I cannot repeat this issue.. and since no one else has really reported this issue it leads me to believe it's an as of yet undiscovered issue with your particular setup.. The easiest way to test that is to install a vanilla Zen Cart install (with the test/demo data) and see if you get the same result..
The key to troubleshooting this is to start by narrowing down some of the differences between your store and a stock Zen Cart install with Edit Orders installed..
Totally Zenned
Ok, I'm with you on this one. So what is vanilla Zen Cart install? Just an install with demo products? I was going to try a new install and take my 1.3.9a db and then upgrade and see if the Edit Order works on it with no other mods applied. I want to see if anything is wrong with my db carried over from 1.3.9a. But I must say it worked fine with edit order in 1.3.9a.
Totally Zenned
mydanilo:
Ok, I'm with you on this one. So what is vanilla Zen Cart install? Just an install with demo products? I was going to try a new install and take my 1.3.9a db and then upgrade and see if the Edit Order works on it with no other mods applied. I want to see if anything is wrong with my db carried over from 1.3.9a. But I must say it worked fine with edit order in 1.3.9a.
Yes an install with demo products.. I am suggesting that the issue here is unique to your store (otherwise this would be a much more widespread issue..), and the best way for you to see this is to do a vanilla install then install Edit Orders so you can see that things do work correctly.. After this you should replace the v1.5.x DB from your vanilla install with your 1.3.9 database (JUST THE DB, NOT the v1.3.9 files), and run the upgrade install to update the DB to v1.5.x, and then test again and see if Edit Orders works..
I suspect that the issue here isn't Edit Orders, but rather something has gone awry in your 1.3.9 to 1.5.x conversion.. (likely that you are still using files from a codebase preceding v1.5.x..) This exercise will confirm this..
Totally Zenned
Reporting back on new install with test product and only edit order installed. Seems to work as it should.
Restored 1.3.9a db where old edit order was working, did db upgrade to 1.5.1 and re-uploaded 3_install to trigger db install. Testing an existing order and I have the same problem as in my live stores. I run multiple stores and all have the issue. It's in my db. Seems to be a mod I installed on an older zen version but just now in 1.5.1 it shows up as a problem in combination with the new Edit Orders. How can I look at my db to find the problem?
New Zenner
Greetings! I'm on Zen-cart 1.5.1, and Edit Orders 4.1.2.
PHP Version: 5.4.11 (Zend: 2.4.0) PHP Memory Limit: 90M
Database: MySQL 5.1.56-log
I realize that file uploads are not supported when editing an order which I'm fine with. As the source indicates, PRODUCTS_OPTIONS_TYPE_FILE: TODO in edit_orders.php. My problem however, is when the initial order is placed, and has a file uploaded, that entry makes it into mysql as a product attribute just fine, and all works well. If I attempt to edit the order in any fashion with Edit Order, that product attribute is stripped out of the database as soon as any update is made to any other fields in the order.
Is there a code snippet or some work around to have Edit Order, even if unable to edit such fields, at least pass them through untouched back into the database when the order update re-writes everything back to mysql?
Thanks for your support!
Totally Zenned
lat9:
Another thing to check is whether a previously-installed plugin has "killed" some of the built-in attributes configuration; see this post: http://www.zen-cart.com/showthread.php?170483-Attribute-Required-for-Text-flag-not-working
I can report that my issues are fixed now. It was related to above issues in my DB. Thank you to lhungil for the additional pointers ;)
New Zenner
lhungil:
Thank you for replying... Much appreciated if you can narrow down what module is conflicting (so we can look at creating a solution).
It appear operator error. I setup a new install of zen-cart and installed all of the same addons as stated earlier and all seems to work fine. So I am gonna go with operator error. I must have missed something in the file merging or something. Who knows? Thanks for the help.
For anyone who missed it. Here is the addons I have installed and are working now.
Zen Cart 1.5.1
edit orders 4.1.2
easy populate 1.5
quantity discounts 1.12
payment module fee
admin login as customer 3.1
admin new order 1.4
add customers from admin 2.0.5
ckeditor 4.1.2
Administrator
Is there a general way to give a one-off discount, say $20.00 on an edited order. I have a client who used previous versions of Edit Orders and indicates that he used to be able to simply enter -20.00 (not quite sure where) on the Edit Orders screen to effect the discount.
Fields marked required must be completed.
Tell staff why this post should be reviewed.