Re: Edit Orders v3.0 for Zen Cart 1.3.9 Support Thread
Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]
I am still running Zen Cart 1.3.8a. I have not yet figured out how to upgrade to the latest version. I need to be able to edit my orders and Edit Orders looks like a good solution. Will it work with my version or am I asking for trouble?
Thanks,
Christy
Re: Edit Orders v3.0 for ZC 1.3.9 [Support Thread]
Quote:
Originally Posted by
christymreed
I am still running Zen Cart 1.3.8a. I have not yet figured out how to upgrade to the latest version. I need to be able to edit my orders and Edit Orders looks like a good solution. Will it work with my version or am I asking for trouble?
Thanks,
Christy
Neither the 1.3.9 or v1.5 versions were tested with older versions.. So no clue if they would.. Suggest that you think about upgrading Zen Cart 1.3.8 versus worrying about trying to make a version of Edit Orders written for newer versions of Zen Cart work with an outdated and unsafe version of Zen Cart. Zen Cart v1.3.8 is vulnerable to hackers..
Re: Edit Orders v4.0 for Zen Cart v1.5 attribute handling
Quote:
Originally Posted by
lhungil
I believe the first release of Edit Orders 4.x should be yours to release. The 4.0 version happened because of you (and the community's) hard work. I'm just working on making some additional changes I need (and hopefully others will find useful).
When and If my changes are stable, if you want me to do a 4.1 or 4.2 etc release... I can, but I do not mind you handling the releases. Having another look over my code before a final release of a large module such as Edit Orders is very valuable and I value input from you and the community. I'm not perfect, and thus my code is often not perfect.
I'm trusting y'all to catch (or at least point out) where I may have missed something. Just saw a number of questions about how I was planning to handle things; Wanted to shed a little light on the subject (and share my thoughts)... so y'all can tear it apart if I am missing something big :)
So I am trying to incorporate the patches you posted here, and I am not sure HOW to interpret the content of these files..
Code:
Index: edit_orders_defines.php
===================================================================
--- edit_orders_defines.php (revision 376)
+++ edit_orders_defines.php (working copy)
@@ -1,6 +1,7 @@
<?php
// Admin Menu Boxes
- define('BOX_CONFIGURATION_EDIT_ORDERS', 'Edit Orders');
+define('BOX_CONFIGURATION_EDIT_ORDERS', 'Edit Orders');
+define('FILENAME_EDIT_ORDERS', 'edit_orders');
// DO NOT EDIT!
define('SUPER_ORDERS_VERSION', '4.0');
// DO NOT EDIT!
Not sure if the @ symbol stuff is code or something else, and I don't think I fully understand the + and - signs.. Are the pluses things to add, and the minus things to remove?? Could use an interpreter..
Re: Edit Orders v4.0 for Zen Cart v1.5 attribute handling
Quote:
Originally Posted by
lhungil
I believe the first release of Edit Orders 4.x should be yours to release. The 4.0 version happened because of you (and the community's) hard work. I'm just working on making some additional changes I need (and hopefully others will find useful).
When and If my changes are stable, if you want me to do a 4.1 or 4.2 etc release... I can, but I do not mind you handling the releases. Having another look over my code before a final release of a large module such as Edit Orders is very valuable and I value input from you and the community. I'm not perfect, and thus my code is often not perfect.
I'm trusting y'all to catch (or at least point out) where I may have missed something. Just saw a number of questions about how I was planning to handle things; Wanted to shed a little light on the subject (and share my thoughts)... so y'all can tear it apart if I am missing something big :)
Quote:
Originally Posted by
DivaVocals
So I am trying to incorporate the patches you posted here, and I am not sure HOW to interpret the content of these files..
Code:
Index: edit_orders_defines.php
===================================================================
--- edit_orders_defines.php (revision 376)
+++ edit_orders_defines.php (working copy)
@@ -1,6 +1,7 @@
<?php
// Admin Menu Boxes
- define('BOX_CONFIGURATION_EDIT_ORDERS', 'Edit Orders');
+define('BOX_CONFIGURATION_EDIT_ORDERS', 'Edit Orders');
+define('FILENAME_EDIT_ORDERS', 'edit_orders');
// DO NOT EDIT!
define('SUPER_ORDERS_VERSION', '4.0');
// DO NOT EDIT!
Not sure if the @ symbol stuff is code or something else, and I don't think I fully understand the + and - signs.. Are the pluses things to add, and the minus things to remove?? Could use an interpreter..
Just so it's clear the above file is a sample of one of the files you attached here that I am not quite understanding. I have the same issue understanding what to do exactly with all the patches you have submitted.. I was surprised because I was expecting to find revised PHP files so that I could simply use my file comparison program to see the changes you made.. the text files and this format are a bit confusing to me... Hoping you can help me crack the code :smile:
Re: Edit Orders v4.0 for Zen Cart v1.5 attribute handling
Quote:
Originally Posted by
DivaVocals
Just so it's clear the above file is a sample of one of the files you attached here that I am not quite understanding. I have the same issue understanding what to do exactly with all the patches you have submitted.. I was surprised because I was expecting to find revised PHP files so that I could simply use my file comparison program to see the changes you made.. the text files and this format are a bit confusing to me... Hoping you can help me crack the code :smile:
Remove the line with - and add the lines with +. It looks like there were some extra spaces in front of the first define which is why it's repeated without spaces as the new line.
Leave out the rest ( with @@ and the lines above), this is notes about changes and do not need to be included.
Re: Edit Orders v4.0 for Zen Cart v1.5 attribute handling
Quote:
Originally Posted by
lankeeyankee
Remove the line with - and add the lines with +. It looks like there were some extra spaces in front of the first define which is why it's repeated without spaces as the new line.
Leave out the rest ( with @@ and the lines above), this is notes about changes and do not need to be included.
Yes that solves this one file.. the other files are not as clear cut as there seem to be pluses where no actual change occurred.. I really dunno what to do here.. In the name of expediency I may have to skip all of these patches and come back at them later.. It's taken me long enough to update the readme, and I simply do not have time to figure out these files to get down to the actual changes..:no:
Re: Edit Orders v4.0 for Zen Cart v1.5 attribute handling
Quote:
Originally Posted by
DivaVocals
Yes that solves this one file.. the other files are not as clear cut as there seem to be pluses where no actual change occurred.. I really dunno what to do here.. In the name of expediency I may have to skip all of these patches and come back at them later.. It's taken me long enough to update the readme, and I simply do not have time to figure out these files to get down to the actual changes..:no:
Post them, I'll help you, shouldn't take long. Or, PM for my email and send them to me, I'll do it, should be a quick edit since I am familiar with this.
Re: Edit Orders v4.0 for Zen Cart v1.5 attribute handling
Re: Edit Orders v3.0 for Zen Cart 1.3.9 [Support Thread]
Found one additional change that needs to be made.
In YOUR_ADMIN_FOLDER/edit_orders.php:
Find:
Code:
$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='$regular_product_id' ");
Replace it with:
Code:
$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='$regular_product_id' AND pov.language_id = '" . (int)$_SESSION['languages_id'] . "' AND po.language_id = '" . (int)$_SESSION['languages_id'] . "'");
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'] . "'");