OK, I *think* I have the attributes issue sorted. If someone else would like to test it out in as many scenarios as possible to double check this works 100% correctly please let me know the results. I don't use one time charges, text attributes, price factors, or quantity discounts so I haven't tested for any of these.
In admin/edit_orders.php on line 1364 change:
PHP Code:
$Query = "insert into " . TABLE_ORDERS_PRODUCTS . " set
orders_id = $oID,
products_id = $add_product_products_id,
products_model = '$p_products_model',
products_name = '" . str_replace("'", "'", $p_products_name) . "',
products_price = '$product_price_woa',
final_price = '" . ($product_price_woa + $AddedOptionsPrice) . "',
products_tax = '$ProductsTax',
products_quantity = $add_product_quantity,
onetime_charges = $AddedOptionsPrice_OneTime;";
to this:
PHP Code:
if ($_POST[applyspecialstoprice] && zen_get_products_special_price((int)$add_product_products_id) && $AddedOptionsPrice != 0) {
$Query = "insert into " . TABLE_ORDERS_PRODUCTS . " set
orders_id = $oID,
products_id = $add_product_products_id,
products_model = '$p_products_model',
products_name = '" . str_replace("'", "'", $p_products_name) . "',
products_price = '$product_price_woa',
final_price = '" . ($products_details["final_price"] + $AddedOptionsPrice) . "',
products_tax = '$ProductsTax',
products_quantity = $add_product_quantity,
onetime_charges = $AddedOptionsPrice_OneTime;";
} else {
$Query = "insert into " . TABLE_ORDERS_PRODUCTS . " set
orders_id = $oID,
products_id = $add_product_products_id,
products_model = '$p_products_model',
products_name = '" . str_replace("'", "'", $p_products_name) . "',
products_price = '$product_price_woa',
final_price = '" . ($product_price_woa + $AddedOptionsPrice) . "',
products_tax = '$ProductsTax',
products_quantity = $add_product_quantity,
onetime_charges = $AddedOptionsPrice_OneTime;";
}
So far, if something is on special the price is correct with multiple attributes selected. This is with some attributes being discounted when on sale/special and some not, all attributes being discounted, and even if it's on sale/special but you uncheck the "Use Specials/Sales Price" box in step 4 of adding the product then the non-discounted prices are used correctly.
Hopefully this won't need any more changes! But I am not holding my breath!!
Bookmarks