Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Just tested and this does work. I knew there was a better way of doing it, but with limited knowledge, I did the best I could! Thanks for sorting it out properly! :)
Quote:
Originally Posted by
DivaVocals
If the code above works (and I haven't tested it to know if it resolved the issues it was supposed to resolve) I believe that the code below is the better way of going about this.. I haven't tested this and I'll need someone to grade my homework and let me know if I got this right.. It should avoid anyone having to hard code in table names and language IDs. (which the posted code does and is not recommended) I've included the approximate line numbers to make finding things easier..
in
YOUR_ADMIN_FOLDER/edit_orders.php
Around line 2267 find:
PHP Code:
// ############################################################################
// Get List of All Products
// ############################################################################
$result = $db -> Execute("SELECT products_name, p.products_id, categories_name, ptc.categories_id FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id=p.products_id LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON ptc.products_id=p.products_id LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON cd.categories_id=ptc.categories_id ORDER BY categories_name");
Replace with:
PHP Code:
// ############################################################################
// Get List of All Products
// ############################################################################
$result = $db -> Execute("SELECT products_name, p.products_id, categories_name, ptc.categories_id FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id=p.products_id LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON ptc.products_id=p.products_id LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON cd.categories_id=ptc.categories_id where pd.language_id = '" . (int)$_SESSION['languages_id'] . "' ORDER BY categories_name");
Around line 2371 find:
PHP Code:
// Get Options for Products
$result = $db -> Execute("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . " po ON po.products_options_id=pa.options_id LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov ON pov.products_options_values_id=pa.options_values_id WHERE products_id='$add_product_products_id'");
Replace with:
PHP Code:
// Get Options for Products
$result = $db -> Execute("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . " po ON po.products_options_id=pa.options_id LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov ON pov.products_options_values_id=pa.options_values_id WHERE products_id='$add_product_products_id' AND pov.language_id = '" . (int)$_SESSION['languages_id'] . "' AND po.language_id = '" . (int)$_SESSION['languages_id'] . "'");
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Quote:
Originally Posted by
abcisme
Just tested and this does work. I knew there was a better way of doing it, but with limited knowledge, I did the best I could! Thanks for sorting it out properly! :)
I really didn't do much.. You are the one that posted the changes in code that were needed and where in the code to make the changes (I sure as he!! didn't know that much!!:laugh:) Thanks for confirming the change I posted works.. I''ll bundle it into the final release..
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Quote:
Originally Posted by
buildingblocks
Zen Cart 1.3.9h
PHP Version: 5.3.8
edit_orders_v3.03 installed without super orders
I am seeing this debug error also.
PHP Warning: stripslashes() expects parameter 1 to be string, array given in /home/USER/public_html/ADMIN/edit_orders.php on line 678
Any update or solution for this debug error? I receive exactly the same too.
Thanks
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Ok so I've followed the directions for 4.0.2 from your site 3 times. Each time, I get notification that the install was successful (I completely uninstalled it each time when trying again), however when I click on Customers -> Orders, I get a blank page. This blank page that shows up is completely blank with no coding behind it at all (right click -> View Source). I have no other mods to orders or any other admin files that Edit Orders uses.
Suggestions on where I should be looking?
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Quote:
Originally Posted by
justynp
Ok so I've followed the directions for 4.0.2 from your site 3 times. Each time, I get notification that the install was successful (I completely uninstalled it each time when trying again), however when I click on Customers -> Orders, I get a blank page. This blank page that shows up is completely blank with no coding behind it at all (right click -> View Source). I have no other mods to orders or any other admin files that Edit Orders uses.
Suggestions on where I should be looking?
Blank page = errors..
check your cache folder for error logs.. you need to post the error message.. (most are clear as to what the issue is so you may figure it out after seeing the error log)
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Quote:
Originally Posted by
DivaVocals
Blank page = errors..
check your cache folder for error logs.. you need to post the error message.. (most are clear as to what the issue is so you may figure it out after seeing the error log)
Forgot about those! I will take a peek.
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Ok so it's this line
Code:
require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . 'order_status_email.php');
Saying that the file doesn't exist, and it doesn't... There's an order_status.php but it contains nothing for emailing.
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Just a quick reply. I commented out that line and it now works. Not sure what that require is for since the email portion of the order system is integrated into another Language define file...
Great plugin though! It will be very helpful for us :)
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Quote:
Originally Posted by
justynp
Just a quick reply. I commented out that line and it now works. Not sure what that require is for since the email portion of the order system is integrated into another Language define file...
Great plugin though! It will be very helpful for us :)
It was included an error.. You can delete this line altogether.. I fixed it on the version on my local server, but did not update the package on my site.. I just uploaded the correct version to my site.. The corrected version also includes the changes abcisme posted a few weeks ago so that attributes display in the correct language.
Re: Edit Orders v4.0 for Zen Cart v1.5 is ALMOST ready to release!!!
This might be the solution.. Apparently the same issue is a part of Super Orders v3.x
http://www.zen-cart.com/showthread.p...51#post1112251
HTH
Quote:
Originally Posted by
picandnix
Any update or solution for this debug error? I receive exactly the same too.
Thanks