Is this module compatible with v 1.5.1?
I don't know but it looks like it doesn't work with 1.5.4. Can anyone suggest an alternative?
Rick
RixStix (dot) com
aka: ChainWeavers (dot) com
Thanks Rick!!
Well, I don't have this working completely. I got to the point of removing the order comments because of the doubling of the items. But changing the language with 0 for comments removed the comments and now I have varying duplications - up to 7 of each line. There's obviously an error in the code somewhere.
My client asked me why this kind of thing isn't part of zen cart and I told him that is it right and proper that the zen cart core team work on the core code and that our wonderful developers who frequently work for free are the one's that create these mods.
But something as basic as grabbing the orders from the database? I'm horrified that we don't have a good working version of this. I'm actually thinking it would be easier for me to write something from scratch than deal with this thing.
Any suggestions?
My guess is that grabbing orders from the database is not the major problems. It's probably all the attributes that is generating the additional line items.
Since I only use a very small subset of the available data (OID, Name, Product name, Qty and Values) and commented out the data not needed, that might be why I have learned to live with the inconveniences.
IIRC, there were several 'switches' added within the code to enable/disable various options. I did upgrade from ZC1.5.3 to ZC1.5.4 over the weekend and have not seen any difference in functionality of the data we use to generate product labels.
Rick
RixStix (dot) com
aka: ChainWeavers (dot) com
I went back to the old code to see if I could update it. There's very little to update to msqli. I got it partly done but just don't know enough to finish it. This is the best way to take care of this mod for the moment. Anyone able to help out a bit?
I replaced $row = mysql_fetch_array($result); with $row = $result -> fetch_assoc(); in two places in ordersExport.php and changed the mysql to mysqli in the extra functions file but more is needed in that file.
This what I haveerrors returned arePHP Code:
function mat_query($query) {
// global $mat_debug_logging, $mat_debug_logging_all, $mat_stack_sql_error;
global $mat_sql_errors_msgs, $mat_stack_sql_error;
$result = mysqli_query($query);
if (mysqli_errno()) {
$mat_stack_sql_error = true;
$mat_sql_errors_msgs .= "<br />".mysqli_errno() . ": " . mysqli_error() . "\n";
}
return $result;
}
So is the problem in the main file or the functions file?PHP Code:
[14-Jul-2015 07:42:37 America/New_York] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/admin/includes/functions/extra_functions/ordersExport_functions.php on line 29
[14-Jul-2015 07:42:37 America/New_York] PHP Warning: mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/admin/includes/functions/extra_functions/ordersExport_functions.php on line 30
[14-Jul-2015 07:42:37 America/New_York] PHP Fatal error: Call to a member function fetch_assoc() on a non-object in /home/domain/public_html/admin/ordersExport.php on line 264
A better way to handle this update is to modify the plugin to use the built-in Zen Cart database object ($db) to perform those database manipulations. That way, a single version of the plugin will operate on all versions of Zen Cart. The path you're heading down will result in a plugin that will work properly only on Zen Cart v1.5.2 (where the mysql->mysqli change was first implemented) and later.
okay, so I'm simply not able to do this. That's what I suspected. I'm talking with mc12345678 about incorporating this in easy populate.
Bookmarks