
Originally Posted by
mc12345678
Couple of things, the older SBA didn't have extra code to receive and process the selected options (extra_cart_actions file) and most older versions of this did not fully support mixed attributes which is where the consideration of multiple checkboxes could come to be a problem if allowed primarily in the case of multiple attributes where "mixed" checkboxes come into play. So, the base ZC code was able to handle a checkbox. Also, something I added to provide a better customer experience is a check of the attributes pushed to the cart when pushed. A check could be done when moving to checkout, but that seems to be too late in the process. Anyways, that check didn't consider checkboxes as part of the process. I've found some ways around it but am right now trying to address some deeper operations.
Yes, the admin/invoice.php file is the first one attempted to use some newer coding to provide the customid. It does appear to have a problem though an older version of it was functional (could use github to look back on the history of the admin/invoice file and see where the current code was first introduced and revert the changes back to that.) I'll be working on that functionality soon as well because the admin side of the customid needs some work to transition to using the data that it has been storing instead of using what currently exists for the catalog side.
Thank you though for reminding me of that one. I'm going to add it to my list of issues so that I can knock it out for new users to at least have a functional invoice with SBA.
Okay, found and corrected the issue(s).
For all versions of ZC supported by this plugin, on the admin side in admin/includes/classes/observers/class.products_with_attributes_stock.php at/around line 145, change:
Code:
$customid = $products_with_attributes_with_stock_class->zen_get_customid($order->products[$i]['id'],$slipInLoopAttribs);
to:
Code:
$customid = $products_with_attributes_stock_class->zen_get_customid($order->products[$i]['id'],$slipInLoopAttribs);
By removing the additional with_
in the applicable ZC version, admin/invoice.php
Around line 190 depending on the ZC version, change:
Code:
$customid = ' ' . $products_with_attributes_class->zen_get_customid($order->products[$i]['id'],$attributes) . ' ';
to:
Code:
$customid = ' ' . $products_with_attributes_stock_class->zen_get_customid($order->products[$i]['id'],$attributes) . ' ';
by adding the word with underscore: stock_
Both of these issues were introduced when trying to incorporate/reference a variable that previously was individually declared adding more code changes to the files and while there already was a variable declared that just needed to be "shared". Github has been updated with the above edits applied.
These are the only places that I found the variable incorrectly referenced as above. The error in the logs directory should identify that there was a call to a member function XXX on null. The XXX represents the function attempted to be called. This also results in a partial blank screen the help for which is provided in the FAQ section of this forum.
Bookmarks