
Originally Posted by
ivopivo
I have attached a screenshot to provide more clarity. (easier than my attempts at explaining)
Actually, upon second look, I installed it from a zip file titled "Stock_By_Attributes_Combined-master.zip". The stock by attributes file has *
Stock by Attributes 1.5.4 15-11-14 mc12345678 in the opening.
I have restored the original file (without the changes from the bottom of the post). Thanks
Okay, and in a way good... Hmm.. Two options of potential solutions... Based on no customid being defined, I'm thinking the query may be returning nothing when asking for the customid on the product because no customid is defined, the other is the potential out-of-scope issue...
So first to try to address the potential out-of-scope variable... At line 727 of admin/includes/classes/products_with_attributes_stock.php, please add:
Code:
$stock_attributes_comb = null;
This would be just below:
Code:
$products_id = zen_get_prid($products_id);
Clear your cache/logout of the admin screen then return to the order and see if the error remains.
Okay I should have posted this a while back when I first wrote it, but I wanted an opportunity to run some of the code basically through some sql tests to see if there was an issue with the sql queries specifically, but have again come back to the fact that $stock_attributes_comb is "empty" within the second query loop... One way around that is to join the values differently so that worst case there would be a series of values like ("","") but ultimately that shouldn't even happen either, because $stock_attributes_comb ought to have values in it if the product 1) has attributes (obviously it does) and 2) is tracked by SBA... So, try the above first and then I may have to modify how the check is done, but that also seems like it will not return any values...
Bookmarks