function show_listing_row($data, $row_type) { switch ($row_type) { // Row type case 'product': $row_content = ' <tr id="Y' . $data['product_id'] . '"' . ($data['is_wholesale_item'] ? ' class="wholesale"' : '') . '> ' . $data['row_activity_link'] . ' <td class="product_id"> <strong>#' . $data['product_id'] . '-' . $data['product_version'] . '</strong><br> <span class="conf_status' . $data['confirmed'] . '">' . ($data['confirmed'] == 0 ? 'unconfirmed<br><br>' : '') . ($data['confirmed'] == -1 ? 'preferred<br><br>' : '') . ($data['confirmed'] == 1 ? 'confirmed<br><br>' : '') . '</span> <span class="conf_date">' . date('Y-M-d H:i:s', strtotime($data['modified'])) . '</span> </td> <td class="product' . ($data['availability'] == false || $data['inventory_quantity'] == 0 && $data['inventory_id'] ? ' inactive' : '') . '"> ' . $data['image_display'] . ' <strong>' . $data['product_name'] . '</strong><br> ' . $data['inventory_display'] . $data['ordering_unit_display'] . $data['random_weight_display'] . ' <div id="Y' . $data['product_id'] . '"> ' . $data['product_description'] . ' ' . ($data['is_wholesale_item'] ? wholesale_text_html() : '') . ' </div> </td> <td class="producer"> ' . $data['prodtype'] . '<br> <strong>' . $data['storage_code'] . '</strong> </td> <td class="pricing"> ' . $data['pricing_display'] . ' </td>'; break; // Row type // Row type case 'product_short': $row_content = ' <tr id="Y' . $data['product_id'] . '"' . ($data['is_wholesale_item'] ? ' class="wholesale"' : '') . '> ' . $data['row_activity_link'] . ' <td class="product_short"> <strong>#' . $data['product_id'] . ' – ' . $data['product_name'] . '</strong> <br>' . $data['inventory_display'] . $data['ordering_unit_display'] . $data['random_weight_display'] . ' </td> <td class="storage"> <span class="storage_code">' . $data['storage_code'] . '</span><br><span class="storage_type">(' . $data['storage_type'] . ')</span> </td> <td class="pricing"> ' . $data['pricing_display'] . ' </td> <td class="total"> ' . $data['total_display'] . ' </td>'; break; // Otherwise... $row_content = ' '; break; } return $row_content; }
function show_listing_row($data, $row_type) { switch ($row_type) { // Row type case 'product': $row_content = ' <tr id="Y' . $data['product_id'] . '"' . ($data['is_wholesale_item'] ? ' class="wholesale"' : '') . '> ' . $data['row_activity_link'] . ' <td class="product' . ($data['availability'] == false || $data['inventory_quantity'] == 0 && $data['inventory_id'] ? ' inactive' : '') . '"> ' . $data['image_display'] . ' <strong>#' . $data['product_id'] . ' – ' . $data['product_name'] . '</strong><br> ' . $data['inventory_display'] . $data['ordering_unit_display'] . $data['random_weight_display'] . ' <div id="Y' . $data['product_id'] . '"> ' . $data['product_description'] . ' ' . ($data['is_wholesale_item'] ? wholesale_text_html() : '') . ' </div> </td> <td class="producer"> ' . $data['prodtype'] . '<br> <strong>' . $data['storage_code'] . '</strong> </td> <td class="pricing"> ' . $data['pricing_display'] . ' </td>'; break; // Row type // Row type case 'product_producer': $row_content = ' <tr id="Y' . $data['product_id'] . '"' . ($data['is_wholesale_item'] ? ' class="wholesale"' : '') . '> ' . $data['row_activity_link'] . ' <td class="product' . ($data['availability'] == false || $data['inventory_quantity'] == 0 && $data['inventory_id'] ? ' inactive' : '') . '"> ' . $data['image_display'] . ' <strong>#' . $data['product_id'] . ' – ' . $data['product_name'] . '</strong><br> ' . $data['inventory_display'] . $data['ordering_unit_display'] . $data['random_weight_display'] . ' <div id="Y' . $data['product_id'] . '"> ' . $data['product_description'] . ' ' . ($data['is_wholesale_item'] ? wholesale_text_html() : '') . ' </div> </td> <td class="producer"> ' . $data['business_name_display'] . ' <hr> ' . $data['prodtype'] . '<br> <em>(' . $data['storage_type'] . ')</em> </td> <td class="pricing"> ' . $data['pricing_display'] . ' </td>'; break; // Otherwise... $row_content = ' '; break; } return $row_content; return $row_content; }
function show_listing_row($data, $row_type) { return ' <tr id="X' . $data['product_id'] . '"' . ($data['is_wholesale_item'] ? ' class="wholesale"' : '') . '> ' . $data['row_activity_link'] . ($_SESSION['member_id'] == CHECKOUT_MEMBER_ID ? ' <td> <div class="checkout" id="checkout' . $data['product_id'] . '">' . ($data['site_id'] && $data['delivery_postal_code'] ? $data['checked_out'] ? ' <img class="checkout_check" src="' . DIR_GRAPHICS . 'checkout-ccs.png"> <span class="checkout_text">Ordered!</span>' : ' <input type="image" class="checkout_check" src="' . DIR_GRAPHICS . 'checkout-g.png" onclick="AddToCart(' . $data['product_id'] . ',' . $data['product_version'] . ',\'checkout\'); return false;"> <span class="checkout_text">Checkout Item</span>' : 'Please select a delivery site') . ' </div> </td>' : '') . ' <td width="50%" align="left" valign="top" class="' . ($data['availability'] == false || $data['inventory_quantity'] == 0 && $data['inventory_id'] ? 'inactive' : '') . '"> ' . $data['image_display'] . ' <strong>#' . $data['product_id'] . ' – ' . $data['product_name'] . '</strong><br> ' . $data['inventory_display'] . $data['ordering_unit_display'] . $data['random_weight_display'] . ' <div id="Y' . $data['product_id'] . '"> ' . $data['product_description'] . ' ' . ($data['is_wholesale_item'] ? wholesale_text_html() : '') . ' </div> <div id="message_area' . $data['product_id'] . '"' . ($data['basket_quantity'] == 0 ? ' style="display:none;"' : '') . '> <textarea class="message" id="message' . $data['product_id'] . '" name="message" placeholder="Optional message to producer...">' . $data['customer_message'] . '</textarea> <div class="message_button" id="message_button' . $data['product_id'] . '" onclick="AddToCart(' . $data['product_id'] . ',' . $data['product_version'] . ',\'message\'); return false;">' . ($data['checked_out'] ? '' : ' <img alt="save message" src="' . DIR_GRAPHICS . 'message.png"> <div class="thumb_descr">Update<br>Message</div>') . ' </div> </td> <td class="business"> ' . $data['business_name_display'] . ' <hr> ' . $data['prodtype_display'] . '<br> <em>(' . $data['storage_type'] . ')</em> </td> <td class="pricing"> ' . $data['pricing_display'] . ' </td> <td class="total"> ' . $data['total_display'] . ' </td> </tr>'; }