$unique_data['minor_product_prior'] = $minor_product_prior; $unique_data['show_major_product'] = $show_major_product; $unique_data['show_minor_product'] = $show_minor_product; // Begin with the product results $result_product = mysql_query($query_product, $connection) or die(debug_print("ERROR: 752932 ", array($query_product, mysql_error()), basename(__FILE__) . ' LINE ' . __LINE__)); $number_of_rows = mysql_num_rows($result_product); $this_row = 0; // Load the data structure with all the values while ($row_product = mysql_fetch_array($result_product)) { $product_data[++$this_row] = (array) $row_product; } // Some generalized product_data values $product_data['row_type'] = $row_type; $product_data['number_of_rows'] = $number_of_rows; // Send the page start $display = open_list_top($product_data, $unique_data); // Start over and cycle through the data $this_row = 0; while ($this_row++ < $number_of_rows) { $product_data['this_row'] = $this_row; // Grab the *unique* producer_fee_percent from the product data (otherwise not available) if (isset($product_data[$this_row]['producer_fee_percent'])) { // NOTE this will give bogus values if the producer_fee_percent is not the same for // every product during the ordering cycle $unique_data['producer_fee_percent'] = $product_data[$this_row]['producer_fee_percent']; } $product_data[$this_row]['random_weight_display'] = random_weight_display_calc($product_data, $unique_data); $product_data[$this_row]['business_name_display'] = business_name_display_calc($product_data, $unique_data); $product_data[$this_row]['pricing_display'] = pricing_display_calc($product_data, $unique_data); // $product_data['total_display'] = total_display_calc($product_data); $product_data[$this_row]['total_display'] = $product_data['amount'];
$display_wholesale_price = true; } else { $display_retail_price = true; } } $row['display_retail_price'] = $display_retail_price; $row['display_wholesale_price'] = $display_wholesale_price; $row['is_wholesale_item'] = $is_wholesale_item; $row['availability_array'] = explode(',', $row['availability_list']); // $row['site_id_you'] = CurrentBasket::site_id(); // $row['site_short_you'] = CurrentBasket::site_short(); // $row['site_long_you'] = CurrentBasket::site_long(); $row['order_open'] = $order_open; // Open the product list if ($first_time_through++ == 0) { $display .= open_list_top($row); } // Set the various fees: $row['customer_customer_adjust_fee'] = 0; $row['producer_customer_adjust_fee'] = 0; if (PAYS_CUSTOMER_FEE == 'customer') { $row['customer_customer_adjust_fee'] = $row['customer_fee_percent'] / 100; } elseif (PAYS_CUSTOMER_FEE == 'producer') { $row['producer_customer_adjust_fee'] = $row['customer_fee_percent'] / 100; } $row['customer_product_adjust_fee'] = 0; $row['producer_product_adjust_fee'] = 0; if (PAYS_PRODUCT_FEE == 'customer') { $row['customer_product_adjust_fee'] = $row['product_fee_percent'] / 100; } elseif (PAYS_PRODUCT_FEE == 'producer') { $row['producer_product_adjust_fee'] = $row['product_fee_percent'] / 100;