
Originally Posted by
batracy
Ok, I've been merging files into and for zen cart v1.5.4 and for the most part it is pretty straight forward. However, there is one file that really has me puzzled. The admin/includes/classes/order.php file that is part of this plugin is no where near similar in any respects to the same file in zen cart v1.5.4! The zen cart version is a much bigger file in size (over 4 times the amount of code), which has left me wondering what do I do now?
I'm upgrading my store to zen cart v1.5.4 for the latest in security upgrades (good to stay current), and all other plugins I use have merged right in without much difficulty. This one though, which I rely on heavily in my store, has me frustrated and not sure what to do. Does any one have any thoughts or suggestions on a course of action I can take? I can usually find my way around in code pretty well and get things working, but this particular problem kinda has me stumped. Any help would be much appreciated.
Thanks!
Not sure which branch you have downloaded, but the admin/includes/classes/order.php file in the mc12345678_zc154 branch has basically two changes as compared to the ZC 1.5.4 version, which increases the size only slightly. Hopefully files are being compared one for one and not comparing say an admin file against a storeside file.
Changes highlighted below are entered into the sql that begins around line 157.
Code:
// START "Stock by Attributes" added to array products_options_values_id and 'value_id' => $attributes->fields['products_options_values_id'],
$attributes = $db->Execute("select products_options, products_options_values, options_values_price,
price_prefix, products_options_values_id,
product_attribute_is_free
from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
where orders_id = '" . (int)$order_id . "'
and orders_products_id = '" . (int)$orders_products->fields['orders_products_id'] . "'");
if ($attributes->RecordCount()>0) {
while (!$attributes->EOF) {
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'],
'value' => $attributes->fields['products_options_values'],
'value_id' => $attributes->fields['products_options_values_id'],
'prefix' => $attributes->fields['price_prefix'],
'price' => $attributes->fields['options_values_price'],
'product_attribute_is_free' =>$attributes->fields['product_attribute_is_free']);
// END "Stock by Attributes"
That's the only (functional) change made to this file... Should be a snap to "merge".
Bookmarks