$components_reward_credits += $sub_reward_credits * $component_quantity * $quantity; } $selection_name = ""; if (isset($item["PROPERTIES_INFO"][$property_id])) { $selection_name = $item["PROPERTIES_INFO"][$property_id]["NAME"] . ": "; } $t->set_var("selection_name", $selection_name); if ($component_qty_action == 2) { $t->set_var("component_quantity", $component_quantity); } else { $t->set_var("component_quantity", $component_quantity * $quantity); } $t->set_var("component_name", $component_name); $image = $db->f("big_image"); if ($image) { $component_icon = product_image_icon($sub_item_id, $component_name, $image, 3); } else { $component_icon = ""; } $t->set_var("component_icon", $component_icon); if ($tax_prices == 0 || $tax_prices == 1) { $component_shown_price = $component_excl; } else { $component_shown_price = $component_incl; } if ($component_price > 0) { $t->set_var("component_price", $option_positive_price_right . currency_format($component_shown_price) . $option_positive_price_left); } elseif ($component_price < 0) { $t->set_var("component_price", $option_negative_price_right . currency_format(abs($component_shown_price)) . $option_negative_price_left); } else { $t->set_var("component_price", "");
$t->sparse("component_item_code_block", false); } if ($show_manufacturer_code && strlen($component_manufacturer_code)) { $t->set_var("component_manufacturer_code", $component_manufacturer_code); $t->sparse("component_man_code_block", false); } $t->sparse("component_codes", false); } $component_image = $component["super_image"]; $image_type = 4; if (!$component_image) { $component_image = $component["big_image"]; $image_type = 3; } if ($component_image) { $component_icon = product_image_icon($component_id, $component_name, $component_image, $image_type); } else { $component_icon = ""; } $t->set_var("component_icon", $component_icon); // get tax values for component and added them to parent product information $component_tax_values = $component["item_tax_values"]; $component_tax_total_values = $component["item_tax_total_values"]; foreach ($component_tax_total_values as $tax_id => $tax_info) { if (!isset($item_tax_values[$tax_id])) { $item_tax_values[$tax_id] = $component_tax_values[$tax_id]; $item_tax_total_values[$tax_id] = $component_tax_total_values[$tax_id]; $item_tax_values[$tax_id]["tax_amount"] = 0; $item_tax_total_values[$tax_id]["tax_amount"] = 0; } $item_tax_values[$tax_id]["tax_amount"] += $component_tax_values[$tax_id]["tax_amount"] * $component_sub_quantity;