Jump to content

bhbilbao

Members
  • Content count

    308
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by bhbilbao

  1. bhbilbao

    NEW! Complete Order Editing Tool!

    Need help now with ot_subtotal_ex.php This works fine in the frontend web. In the backend (edit_orders.php) the totals are worng. The orders.php works fine. Anyone knows where to modify to avoid the including VAT on Subtotal EXc. ??
  2. bhbilbao

    Multi_Vendor_Shipping new thread

    That contribution also didnt work for me. Try with Discount Second Unit. http://addons.oscommerce.com/info/7309
  3. bhbilbao

    Multi_Vendor_Shipping new thread

    Yes, thats right. Also add it to filenames.php and create a new language file or adding lines to the old one. I cannot remove Order Editor 5.0.9 because i use it in conjunction with other contribs as google maps, resend order confirmation html, etc. As I see the unique diference in Order Editor V.S Order Editor MVS is that the last one one separates the shippings when adding products. In Order Editor 5.0.9 all items you added are in only one list. In other hand the edit_orders_add_product.php is also diferent, for the last one there is not code input field, and no price in the item lists. This is new for me, and I see extrange things. If you delete a item from edit_orders.php(order editor 5.0.9) the shiping_id remains in the order. You could see 2 shippings_id for only one product!, for that I suggest to detete products from edit_order_mvs.php if the order is a type mvs. Other extrage thing is the ot_subtotal_ex contribution. The base price is wrong calculated in both editors. Im working on it. // bof order list improved $test_string2 = ''; if ( $has_pdf_invoice ) { // use the pdf invoice if ( CONFIG_ADMIN_PDF_INVOICE_PACKINGSLIP == 'PDF' or CONFIG_ADMIN_PDF_INVOICE_PACKINGSLIP == 'BOTH' ) { $test_string2 .= '<a href="' . tep_href_link(FILENAME_PDF_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice_pdf.gif', IMAGE_ORDERS_INVOICE) . '</a> } <a href="' . tep_href_link(FILENAME_PDF_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip_pdf.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> ' ; //CREAR NUMERO FACTURA if ($order->billing['invoice_number'] == 0) { $test_string2 .= '<a href="' . tep_href_link(FILENAME_CREAR_NUM_FACTURA, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_creanumfact.gif', IMAGE_NUM_FACT) . '</a> ' ; } if ( CONFIG_ADMIN_PDF_INVOICE_PACKINGSLIP == 'HTML' or CONFIG_ADMIN_PDF_INVOICE_PACKINGSLIP == 'BOTH' ) { $test_string2 .= '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> ' ; } } else { $test_string2 .= '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> ' ; } if ( $has_order_editor ) { $test_string2 .= '<a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $HTTP_GET_VARS['oID']) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>' ; } if ( $has_order_editor ) { $test_string2 .= '<a href="' . tep_href_link(FILENAME_ORDERS_EDIT_MVS, 'oID=' . $HTTP_GET_VARS['oID']) . '">' . tep_image_button('button_edit_mvs.gif', IMAGE_EDIT_MVS) . '</a>' ; } if ( $has_label_pdf ) { $test_string2 .= '<a href="' . tep_href_link(FILENAME_ORDERS_LABEL, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_label.gif', IMAGE_ORDERS_LABEL) . '</a>' ; } if ( $google_map_directions ) { $test_string2 .= '<a href="' . tep_href_link(FILENAME_GOOGLE_MAP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_google_directions.gif', IMAGE_GOOGLE_DIRECTIONS) . '</a>' ; } $test_string2 .= '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?> <td class="pageHeading" align="center"><?php echo $test_string2 ; ?></td> <?php } // endif show buttons png P.D: need help with the serials contribution. Anyone?
  4. bhbilbao

    Multi_Vendor_Shipping new thread

    I have all installed and working. 1.Order Editor 2.Order editor for MVS 3.Manual Order Maker For Order Editor for MVS I copied edit_orders.php as edit_orders_mvs.php inside /admin. I also created a new class named as order_mvs.php inside /admin/includes/classes with this code: /// Begin mods for Order Editor // Return the tax description for a zone / class // TABLES: tax_rates; function tep_get_tax_description($class_id, $country_id, $zone_id) { $tax_query = tep_db_query("select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' order by tr.tax_priority"); if (tep_db_num_rows($tax_query)) { $tax_description = ''; while ($tax = tep_db_fetch_array($tax_query)) { $tax_description .= $tax['tax_description'] . ' + '; } $tax_description = substr($tax_description, 0, -3); return $tax_description; } else { return ENTRY_TAX; } } //// // Function : tep_get_country_id // Arguments : country_name country name string // Return : country_id // Description : Function to retrieve the country_id based on the country's name function tep_get_country_id($country_name) { $country_id_query = tep_db_query("select * from " . TABLE_COUNTRIES . " where countries_name = '" . $country_name . "'"); if (!tep_db_num_rows($country_id_query)) { return 0; } else { $country_id_row = tep_db_fetch_array($country_id_query); return $country_id_row['countries_id']; } } // Function : tep_get_zone_id // Arguments : country_id country id string zone_name state/province name // Return : zone_id // Description : Function to retrieve the zone_id based on the zone's name function tep_get_zone_id($country_id, $zone_name) { $zone_id_query = tep_db_query("select * from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_name = '" . $zone_name . "'"); if (!tep_db_num_rows($zone_id_query)) { return 0; } else { $zone_id_row = tep_db_fetch_array($zone_id_query); return $zone_id_row['zone_id']; } } // Function : tep_html_quotes // Arguments : string any string // Return : string with single quotes converted to html equivalent // Description : Function to change quotes to HTML equivalents for form inputs. function tep_html_quotes($string) { return str_replace("'", "'", $string); } /////end Order Editor mods Then in admin/orders.php I added: require(DIR_WS_CLASSES . 'order_mvs.php'); For the admin panel I created a new button [DETAILS] = orders.php [MOFIFY] = edit_orders.php [ORDER SUPPLIER] = edit_orders_mvs.php Now im trying to create a button to delete the orders_shipping_id line to convert a partivular mvs-order in standard-order.
  5. is there a maner to work with Send HTML Email V2_1??? I refer to the standard version. When sending order confirmation all goes in plain text, i would like the styles of html. Thanks in advance.
  6. bhbilbao

    Multi_Vendor_Shipping new thread

    Finally solved: MVS+MANUAL ORDER MAKER In create_order_process.php $sql_data_array = array('orders_id' => $insert_id, 'title' => TEXT_DELIVERY, 'text' => $temp_amount, 'value' => "0.00", 'class' => "ot_shipping", 'sort_order' => "3"); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); $sql_data_array = array('orders_id' => $insert_id, 'title' => TEXT_TAX, 'text' => $temp_amount, 'value' => "0.00", 'class' => "ot_tax", 'sort_order' => "4"); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); $sql_data_array = array('orders_id' => $insert_id, 'title' => TEXT_TOTAL, 'text' => $temp_amount, 'value' => "0.00", 'class' => "ot_total", 'sort_order' => "5"); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $insert_id, 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> replacing with: $sql_data_array = array('orders_id' => $insert_id, 'title' => TEXT_DELIVERY, 'text' => $temp_amount, 'value' => "0.00", 'class' => "ot_shipping", 'sort_order' => "3"); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); $sql_data_array = array('orders_id' => $insert_id, 'title' => TEXT_TAX, 'text' => $temp_amount, 'value' => "0.00", 'class' => "ot_tax", 'sort_order' => "4"); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); $sql_data_array = array('orders_id' => $insert_id, 'title' => TEXT_TOTAL, 'text' => $temp_amount, 'value' => "0.00", 'class' => "ot_total", 'sort_order' => "5"); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => "1", 'shipping_module' => "indvship", 'shipping_method' => "Individual shipping", 'shipping_cost' => "12.00", 'shipping_tax' => "0.00", 'vendors_name' => "default", 'vendor_order_sent' => "no"); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $insert_id, 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> This creates a "type-mvs order" that can be useful to make quotations and administrate orders to vendors/suppliers. If then we add diferent vendor then we insert the shipping manually for the new vendor. MVS+RMA RETURNS This for people who had problems before in this thread. In vendor_order_info.php search for: for ($i = 0, $n = sizeof($order->products[$l]['orders_products']); $i < $n; $i++) { add this after: //BEGIN RMA MODULE $returns_check_query = tep_db_query("SELECT r.rma_value, r.returns_id, r.returns_date_finished, rp.products_id FROM " . TABLE_RETURNS . " r, " . TABLE_RETURNS_PRODUCTS_DATA . " rp where r.returns_id = rp.returns_id and r.order_id = '" . $oID . "' and rp.products_id = '" . $order->products[$l]['orders_products'][$i]['id'] . "' "); if (!tep_db_num_rows($returns_check_query)){ if ($order->products[$i]['return'] != '1') { // old $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $oID . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><u>' . '<font color="0066ff">RMA- Gestionar Devolución</font>' .'</a></u>'; $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $oID . '&products_id=' . ($order->products[$l]['orders_products'][$i]['id']), 'NONSSL') . '"><u>' . '<font color="#0066ff">RMA- Gestionar Devolución</font>' .'</a></u>'; } // Don't show Return link if order is still pending or processing // You can change this or comment it out as best fits your store configuration if (($orders_status == '1') OR ($orders_status == '2') ) { $return_link = ''; } } else { $returns = tep_db_fetch_array($returns_check_query); // old $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $oID . '&products_id=' . ($order->products[$l]['orders_products'][$i]['id']), 'NONSSL') . '"><u>' . '<font color="#red">RMA - <blink>En devolución</blink></font>' .'</a></u>'; $return_link = '<a href=' . tep_href_link(FILENAME_RETURNS, 'cID=' . $returns['rma_value']) . '><font color=red><b><i><u>RMA' . $returns['returns_id'] . '</u> - <blink>En devolución</blink></b></i></font></a> - ' . $returns['returns_date_finished'] ; } //END RMA MODULE MVS+PRODUCT SERIAL NUMBERS Need help with tha contribution! All working, except when an order has diferent vendors the first line of all products are duplicating when inserting serial numbers: Example: When inserting serial for product5, it replaces the serial of product1 (..oID=414&serial=0). The serial link for product5 should be http ://www . myweb.es/admin/orders.php?action=edit&oID=414&serial=4 I spent days changing codes but no luck. This is the devil code: orders.php // BEGIN - Product Serial Numbers case 'update_serial': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $serial_number = tep_db_prepare_input($HTTP_POST_VARS['serial_number']); $serial = tep_db_prepare_input($HTTP_GET_VARS['serial']); // old tep_db_query("update " . TABLE_ORDERS_PRODUCTS . " set products_serial_number = '" . tep_db_input($serial_number) . "' where orders_id = '" . tep_db_input($oID) . "' and products_id=" . tep_db_input($serial)); tep_db_query("update " . TABLE_ORDERS_PRODUCTS . " set products_serial_number = '" . tep_db_input($serial_number) . "' where orders_id = '" . tep_db_input($oID) . "'"); $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit&serial_updated=1')); break; // END - Product Serial Numbers //// // Update Order case 'update_order': vendor_order_info.php // $serial_number = "ID#" ; if (tep_not_null($order->products[$l]['orders_products'][$i]['serial_number'])) $serial_number = $order->products[$l]['orders_products'][$i]['serial_number']; echo '<td class="dataTableContent" valign="top"> <a href="' . tep_href_link(FILENAME_ORDERS, 'action=edit&oID=' . $oID . '&serial=' . $i, 'NONSSL') . '">' . $serial_number . '</a> </td>' . "\n" . // at the end: // BEGIN - Product Serial Numbers if (tep_not_null($HTTP_GET_VARS['serial']) && ($HTTP_GET_VARS['serial'] == $i) && ($HTTP_GET_VARS['serial_updated'] <> 1)) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" colspan="3" valign="middle" align="right">s/n#: </td>' . "\n"; echo ' <td class="dataTableContent" colspan="10" valign="middle">' . tep_draw_form('serial_form', FILENAME_ORDERS, 'action=update_serial&oID=' . $oID . '&serial=' . $order->products[$l]['orders_products'][$i]['id'], 'post', '') . tep_draw_input_field('serial_number', $serial_number, '', false, 'text', true) . ' ' .tep_image_submit('button_serial.gif', IMAGE_UPDATE) . '</td>' . "\n" . ' </tr>' . "\n"; } // END - Product Serial Numbers
  7. bhbilbao

    Multi_Vendor_Shipping new thread

    The problem is in orders_shipping database. If I modify it manually creating an order_shiping_id and asigning it to the orders_id it begins to work. Then also working when clicking on Email Sent: no. but the shipping dont work.
  8. bhbilbao

    Multi_Vendor_Shipping new thread

    Hi Jim, I have a new question for you. I installed MVS + Order Editor for MVS + Manual Order maker 1.5.7 Full First from admin panel with Manual Order Maker I select a customer and then I click on [Create order] but always creates a non-mvs order, and I would need it to be an mvs order (to use the vendors email functions). Do you know any trick or some suggestion? Thanks.
  9. bhbilbao

    Error when trying an advanced search

    I reviewed the backup files and the problem is after installing SPPC. Working: <?php /* $Id: advanced_search_result.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADVANCED_SEARCH); // START: Extra Fields Contribution Search Fields 1.0 $pef_fields = array(); $pef_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " WHERE (languages_id = 0 OR languages_id = " . (int)$languages_id . ") AND products_extra_fields_status ORDER BY products_extra_fields_order"); while ($field = tep_db_fetch_array($pef_fields_query)) { $pef_fields[] = $field; } $pef_empty = true; foreach ($pef_fields as $field) { $pef_id = 'pef_'.$field['products_extra_fields_id']; if (isset($HTTP_GET_VARS[$pef_id]) && !empty($HTTP_GET_VARS[$pef_id])) $pef_empty = false; } // END: Extra Fields Contribution $error = false; if ( (isset($HTTP_GET_VARS['keywords']) && empty($HTTP_GET_VARS['keywords'])) && (isset($HTTP_GET_VARS['dto']) && (empty($HTTP_GET_VARS['dto']) || ($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING))) && (isset($HTTP_GET_VARS['pfrom']) && !is_numeric($HTTP_GET_VARS['pfrom'])) && (isset($HTTP_GET_VARS['pto']) && !is_numeric($HTTP_GET_VARS['pto'])) && (isset($HTTP_GET_VARS['pricerange']) && (empty($HTTP_GET_VARS['pricerange'])) ) ) { $error = true; $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT); } else { $dfrom = ''; $dto = ''; $pfrom = ''; $pto = ''; $keywords = ''; // START: Extra Fields Contribution Search Fields 1.0 $pef_values = array(); foreach ($pef_fields as $field) { if (isset($HTTP_GET_VARS['pef_'.$field['products_extra_fields_id']]) && !empty($HTTP_GET_VARS['pef_'.$field['products_extra_fields_id']])) $pef_values[$field['products_extra_fields_id']] = $HTTP_GET_VARS['pef_'.$field['products_extra_fields_id']]; } // END: Extra Fields Contribution if (isset($HTTP_GET_VARS['dfrom'])) { $dfrom = (($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dfrom']); } if (isset($HTTP_GET_VARS['dto'])) { $dto = (($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dto']); } if (isset($HTTP_GET_VARS['pfrom'])) { $pfrom = $HTTP_GET_VARS['pfrom']; } if (isset($HTTP_GET_VARS['pto'])) { $pto = $HTTP_GET_VARS['pto']; } if (isset($HTTP_GET_VARS['pricerange'])) { $pricerange = $HTTP_GET_VARS['pricerange']; switch ($pricerange) { case "1": $pfrom = 0; $pto = 50; break; case "2": $pfrom = 50; $pto = 100; break; case "3": $pfrom = 100; $pto = 150; break; case "4": $pfrom = 150; $pto = 200; break; case "5": $pfrom = 200; $pto = 300; break; case "6": $pfrom = 300; $pto = 400; break; case "7": $pfrom = 400; $pto = 500; break; case "8": $pfrom = 500; $pto = 600; break; case "9": $pfrom = 600; $pto = 800; break; case "10": $pfrom = 800; $pto = 1000; break; case "11": $pfrom = 1000; $pto = 1500; break; case "12": $pfrom = 1500; $pto = 2000; break; case "13": $pfrom = 2000; $pto = 3000; break; case "14": $pfrom = 3000; $pto = 1000000; break; } } if (isset($HTTP_GET_VARS['keywords'])) { $keywords = $HTTP_GET_VARS['keywords']; } $date_check_error = false; if (tep_not_null($dfrom)) { if (!tep_checkdate($dfrom, DOB_FORMAT_STRING, $dfrom_array)) { $error = true; $date_check_error = true; $messageStack->add_session('search', ERROR_INVALID_FROM_DATE); } } if (tep_not_null($dto)) { if (!tep_checkdate($dto, DOB_FORMAT_STRING, $dto_array)) { $error = true; $date_check_error = true; $messageStack->add_session('search', ERROR_INVALID_TO_DATE); } } if (($date_check_error == false) && tep_not_null($dfrom) && tep_not_null($dto)) { if (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) { $error = true; $messageStack->add_session('search', ERROR_TO_DATE_LESS_THAN_FROM_DATE); } } $price_check_error = false; if (tep_not_null($pfrom)) { if (!settype($pfrom, 'double')) { $error = true; $price_check_error = true; $messageStack->add_session('search', ERROR_PRICE_FROM_MUST_BE_NUM); } } if (tep_not_null($pto)) { if (!settype($pto, 'double')) { $error = true; $price_check_error = true; $messageStack->add_session('search', ERROR_PRICE_TO_MUST_BE_NUM); } } if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) { if ($pfrom >= $pto) { $error = true; $messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM); } } if (tep_not_null($keywords)) { if (!tep_parse_search_string($keywords, $search_keywords)) { $error = true; $messageStack->add_session('search', ERROR_INVALID_KEYWORDS); } } // START: Extra Fields Contribution Search Fields 1.0 if (tep_not_null($pef_values)) { foreach ($pef_values as $pef_value) { if (!tep_parse_search_string($pef_value, $pef_value_keywords)) { $error = true; $messageStack->add_session('search', ERROR_INVALID_KEYWORDS . $pef_value ); } } } // END: Extra Fields Contribution } if (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords) // START: Extra Fields Contribution Search Fields 1.0 && !tep_not_null($pef_values) // END: Extra Fields Contribution Search Fields 1.0 ) { $error = true; $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT); } if ($error == true) { tep_redirect(tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(), 'NONSSL', true, false)); } $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH)); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, tep_get_all_get_params(), 'NONSSL', true, false)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table align="center" border="0" width="1000" cellspacing="1" cellpadding="3" bgcolor="#FFFFFF"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE_2; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_2, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_PRICE_EX' => PRODUCT_LIST_PRICE_EX, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; // Unless Customer logged in show products if (!tep_session_is_registered('customer_id')) { $new_products_where=" and p2c.categories_id = c.categories_id and p2c.categories_id <> '$restricted_category' "; } else { $new_products_where=" and p2c.categories_id = c.categories_id "; } for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // p.products_date_added to query for New Product Icon contribution $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_date_added, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price "; if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { $select_str .= ", SUM(tr.tax_rate) as tax_rate "; } // START: Extra Fields Contribution // $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id"; // $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id left join ". TABLE_MANUFACTURERS . " m on p.manufacturers_id=m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id"; // END: Extra Fields Contribution if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { if (!tep_session_is_registered('customer_country_id')) { $customer_country_id = STORE_COUNTRY; $customer_zone_id = STORE_ZONE; } $from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')"; } $from_str .= ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; $where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id" . $new_products_where . ""; if (isset($HTTP_GET_VARS['categories_id']) && tep_not_null($HTTP_GET_VARS['categories_id'])) { if (isset($HTTP_GET_VARS['inc_subcat']) && ($HTTP_GET_VARS['inc_subcat'] == '1')) { $subcategories_array = array(); tep_get_subcategories($subcategories_array, $HTTP_GET_VARS['categories_id']); $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'"; for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) { $where_str .= " or p2c.categories_id = '" . (int)$subcategories_array[$i] . "'"; } $where_str .= ")"; } else { $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'"; } } if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $where_str .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } if (isset($search_keywords) && (sizeof($search_keywords) > 0)) { $where_str .= " and ("; for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) { switch ($search_keywords[$i]) { case '(': case ')': case 'and': case 'or': $where_str .= " " . $search_keywords[$i] . " "; break; default: $keyword = tep_db_prepare_input($search_keywords[$i]); // START: Extra Fields Contribution // $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'"; $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or p2pef.products_extra_fields_value like '%" . tep_db_input($keyword) . "%'"; // END: Extra Fields Contribution if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'"; $where_str .= ')'; break; } } $where_str .= " )"; } // START: Extra Fields Contribution Search Fields 1.0 foreach ($pef_values as $pef_id => $pef_value) { tep_parse_search_string($pef_value, $pef_value_keywords); if (isset($pef_value_keywords) && (sizeof($pef_value_keywords) > 0)) { $where_str .= " and ("; for ($i=0, $n=sizeof($pef_value_keywords); $i<$n; $i++ ) { switch ($pef_value_keywords[$i]) { case '(': case ')': case 'and': case 'or': $where_str .= " " . $pef_value_keywords[$i] . " "; break; default: $keyword = tep_db_prepare_input($pef_value_keywords[$i]); $where_str .= "(p2pef.products_extra_fields_value like '%" . tep_db_input($keyword) . "%'"; $where_str .= " AND p2pef.products_extra_fields_id = ". (int)$pef_id; $where_str .= ')'; break; } } $where_str .= " )"; } } // END: Extra Fields Contribution if (tep_not_null($dfrom)) { $where_str .= " and p.products_date_added >= '" . tep_date_raw($dfrom) . "'"; } if (tep_not_null($dto)) { $where_str .= " and p.products_date_added <= '" . tep_date_raw($dto) . "'"; } if (tep_not_null($pfrom)) { if ($currencies->is_set($currency)) { $rate = $currencies->get_value($currency); $pfrom = $pfrom / $rate; } } if (tep_not_null($pto)) { if (isset($rate)) { $pto = $pto / $rate; } } if (DISPLAY_PRICE_WITH_TAX == 'true') { if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")"; } else { if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) <= " . (double)$pto . ")"; } if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { $where_str .= " group by p.products_id, tr.tax_priority"; } // sort order by drop down menu // if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { if ( (!isset($HTTP_GET_VARS['sortdir'])) || (!isset($HTTP_GET_VARS['sortcol'])) || (!ereg('[1-8]', $HTTP_GET_VARS['sortcol'])) || (!ereg('[ad]', $HTTP_GET_VARS['sortdir'])) || ($HTTP_GET_VARS['sortcol'] > sizeof($column_list)) ) { // sort order by drop down menu for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { // sort order by drop down menu // $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $HTTP_GET_VARS['sortcol'] = $i+1; $HTTP_GET_VARS['sortdir'] = 'a'; // sort order by drop down menu $order_str = ' order by pd.products_name'; break; } } } else { // sort order by drop down menu // $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); // $sort_order = substr($HTTP_GET_VARS['sort'], 1); $sort_col = $HTTP_GET_VARS['sortcol']; $sort_order = $HTTP_GET_VARS['sortdir']; // sort order by drop down menu $order_str = ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $order_str .= "p.products_model " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $order_str .= "pd.products_name " . ($sort_order == 'd' ? "desc" : ""); break; case 'PRODUCT_LIST_MANUFACTURER': $order_str .= "m.manufacturers_name " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $order_str .= "p.products_quantity " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $order_str .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $order_str .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $order_str .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE_EX': $order_str .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } $listing_sql = $select_str . $from_str . $where_str . $order_str; require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> NOT WORKING: <?php /* $Id: advanced_search_result.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADVANCED_SEARCH); // START: Extra Fields Contribution Search Fields 1.0 $pef_fields = array(); $pef_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " WHERE (languages_id = 0 OR languages_id = " . (int)$languages_id . ") AND products_extra_fields_status ORDER BY products_extra_fields_order"); while ($field = tep_db_fetch_array($pef_fields_query)) { $pef_fields[] = $field; } $pef_empty = true; foreach ($pef_fields as $field) { $pef_id = 'pef_'.$field['products_extra_fields_id']; if (isset($HTTP_GET_VARS[$pef_id]) && !empty($HTTP_GET_VARS[$pef_id])) $pef_empty = false; } // END: Extra Fields Contribution $error = false; if ( (isset($HTTP_GET_VARS['keywords']) && empty($HTTP_GET_VARS['keywords'])) && (isset($HTTP_GET_VARS['dto']) && (empty($HTTP_GET_VARS['dto']) || ($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING))) && (isset($HTTP_GET_VARS['dfrom']) && (empty($HTTP_GET_VARS['dfrom']) || ($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING))) && (isset($HTTP_GET_VARS['pfrom']) && !is_numeric($HTTP_GET_VARS['pfrom'])) && (isset($HTTP_GET_VARS['pto']) && !is_numeric($HTTP_GET_VARS['pto'])) && (isset($HTTP_GET_VARS['pricerange']) && (empty($HTTP_GET_VARS['pricerange'])) ) ) { $error = true; $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT); } else { $dfrom = ''; $dto = ''; $pfrom = ''; $pto = ''; $keywords = ''; // START: Extra Fields Contribution Search Fields 1.0 $pef_values = array(); foreach ($pef_fields as $field) { if (isset($HTTP_GET_VARS['pef_'.$field['products_extra_fields_id']]) && !empty($HTTP_GET_VARS['pef_'.$field['products_extra_fields_id']])) $pef_values[$field['products_extra_fields_id']] = $HTTP_GET_VARS['pef_'.$field['products_extra_fields_id']]; } // END: Extra Fields Contribution if (isset($HTTP_GET_VARS['dfrom'])) { $dfrom = (($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dfrom']); } if (isset($HTTP_GET_VARS['dto'])) { $dto = (($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dto']); } if (isset($HTTP_GET_VARS['pfrom'])) { $pfrom = $HTTP_GET_VARS['pfrom']; } if (isset($HTTP_GET_VARS['pto'])) { $pto = $HTTP_GET_VARS['pto']; } if (isset($HTTP_GET_VARS['pricerange'])) { $pricerange = $HTTP_GET_VARS['pricerange']; switch ($pricerange) { case "1": $pfrom = 0; $pto = 50; break; case "2": $pfrom = 50; $pto = 100; break; case "3": $pfrom = 100; $pto = 150; break; case "4": $pfrom = 150; $pto = 200; break; case "5": $pfrom = 200; $pto = 300; break; case "6": $pfrom = 300; $pto = 400; break; case "7": $pfrom = 400; $pto = 500; break; case "8": $pfrom = 500; $pto = 600; break; case "9": $pfrom = 600; $pto = 800; break; case "10": $pfrom = 800; $pto = 1000; break; case "11": $pfrom = 1000; $pto = 1500; break; case "12": $pfrom = 1500; $pto = 2000; break; case "13": $pfrom = 2000; $pto = 3000; break; case "14": $pfrom = 3000; $pto = 1000000; break; } } if (isset($HTTP_GET_VARS['keywords'])) { $keywords = $HTTP_GET_VARS['keywords']; } $date_check_error = false; if (tep_not_null($dfrom)) { if (!tep_checkdate($dfrom, DOB_FORMAT_STRING, $dfrom_array)) { $error = true; $date_check_error = true; $messageStack->add_session('search', ERROR_INVALID_FROM_DATE); } } if (tep_not_null($dto)) { if (!tep_checkdate($dto, DOB_FORMAT_STRING, $dto_array)) { $error = true; $date_check_error = true; $messageStack->add_session('search', ERROR_INVALID_TO_DATE); } } if (($date_check_error == false) && tep_not_null($dfrom) && tep_not_null($dto)) { if (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) { $error = true; $messageStack->add_session('search', ERROR_TO_DATE_LESS_THAN_FROM_DATE); } } $price_check_error = false; if (tep_not_null($pfrom)) { if (!settype($pfrom, 'double')) { $error = true; $price_check_error = true; $messageStack->add_session('search', ERROR_PRICE_FROM_MUST_BE_NUM); } } if (tep_not_null($pto)) { if (!settype($pto, 'double')) { $error = true; $price_check_error = true; $messageStack->add_session('search', ERROR_PRICE_TO_MUST_BE_NUM); } } if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) { if ($pfrom >= $pto) { $error = true; $messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM); } } if (tep_not_null($keywords)) { if (!tep_parse_search_string($keywords, $search_keywords)) { $error = true; $messageStack->add_session('search', ERROR_INVALID_KEYWORDS); } } // START: Extra Fields Contribution Search Fields 1.0 if (tep_not_null($pef_values)) { foreach ($pef_values as $pef_value) { if (!tep_parse_search_string($pef_value, $pef_value_keywords)) { $error = true; $messageStack->add_session('search', ERROR_INVALID_KEYWORDS . $pef_value ); } } } // END: Extra Fields Contribution } if (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords) // START: Extra Fields Contribution Search Fields 1.0 && !tep_not_null($pef_values) // END: Extra Fields Contribution Search Fields 1.0 ) { $error = true; $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT); } if ($error == true) { tep_redirect(tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(), 'NONSSL', true, false)); } $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH)); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, tep_get_all_get_params(), 'NONSSL', true, false)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <?php include (DIR_WS_INCLUDES . 'page-header-inc.htc'); ?> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table align="center" border="0" width="1000" cellspacing="1" cellpadding="3" bgcolor="#FFFFFF"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE_2; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_2, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NUMBER' => PRODUCT_LIST_NUMBER, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_PRICE_EX' => PRODUCT_LIST_PRICE_EX, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } // BOF Separate Pricing Per Customer if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } // EOF Separate Pricing Per Customer $select_column_list = ''; // Unless Customer logged in show products if (!tep_session_is_registered('customer_id')) { $new_products_where=" and p2c.categories_id = c.categories_id and p2c.categories_id <> '$restricted_category' "; } else { $new_products_where=" and p2c.categories_id = c.categories_id "; } for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NUMBER': $select_column_list .= 'p.products_number, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // BOF Separate Pricing Per Customer $status_tmp_product_prices_table = false; $status_need_to_get_prices = false; // find out if sorting by price has been requested if ( (isset($HTTP_GET_VARS['sort'])) && (ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) && (substr($HTTP_GET_VARS['sort'], 0, 1) <= sizeof($column_list)) ){ $_sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); if ($column_list[$_sort_col-1] == 'PRODUCT_LIST_PRICE') { $status_need_to_get_prices = true; } } if ((tep_not_null($pfrom) || tep_not_null($pto) || $status_need_to_get_prices == true) && $customer_group_id != '0') { $product_prices_table = TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id; // the table with product prices for a particular customer group is re-built only a number of times per hour // (setting in /includes/database_tables.php called MAXIMUM_DELAY_UPDATE_PG_PRICES_TABLE, in minutes) // to trigger the update the next function is called (new function that should have been // added to includes/functions/database.php) tep_db_check_age_products_group_prices_cg_table($customer_group_id); $status_tmp_product_prices_table = true; } elseif ((tep_not_null($pfrom) || tep_not_null($pto) || $status_need_to_get_prices == true) && $customer_group_id == '0') { // to be able to sort on retail prices we *need* to get the special prices instead of leaving them // NULL and do product_listing the job of getting the special price // first make sure that table exists and needs no updating tep_db_check_age_specials_retail_table(); $status_tmp_special_prices_table = true; } // end elseif ((tep_not_null($pfrom) || (tep_not_null($pfrom)) && .... if ($status_tmp_product_prices_table == true) { $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, tmp_pp.products_price, p.products_tax_class_id, if(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price "; } elseif ($status_tmp_special_prices_table == true) { // p.products_date_added to query for New Product Icon contribution $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_date_added, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price "; } else { $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, NULL as specials_new_products_price, NULL as final_price "; } // next line original select query // $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price "; if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { $select_str .= ", SUM(tr.tax_rate) as tax_rate "; } if ($status_tmp_product_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . $product_prices_table . " as tmp_pp using(products_id)"; } elseif ($status_tmp_special_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id "; } else { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) "; } // EOF Separate Pricing Per Customer // START: Extra Fields Contribution // $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id"; // $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id left join ". TABLE_MANUFACTURERS . " m on p.manufacturers_id=m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id"; // END: Extra Fields Contribution if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { if (!tep_session_is_registered('customer_country_id')) { $customer_country_id = STORE_COUNTRY; $customer_zone_id = STORE_ZONE; } $from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')"; } $from_str .= ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; $where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id" . $new_products_where . ""; if (isset($HTTP_GET_VARS['categories_id']) && tep_not_null($HTTP_GET_VARS['categories_id'])) { if (isset($HTTP_GET_VARS['inc_subcat']) && ($HTTP_GET_VARS['inc_subcat'] == '1')) { $subcategories_array = array(); tep_get_subcategories($subcategories_array, $HTTP_GET_VARS['categories_id']); $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'"; for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) { $where_str .= " or p2c.categories_id = '" . (int)$subcategories_array[$i] . "'"; } $where_str .= ")"; } else { $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'"; } } if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { $where_str .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } if (isset($search_keywords) && (sizeof($search_keywords) > 0)) { $where_str .= " and ("; for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) { switch ($search_keywords[$i]) { case '(': case ')': case 'and': case 'or': $where_str .= " " . $search_keywords[$i] . " "; break; default: $keyword = tep_db_prepare_input($search_keywords[$i]); // START: Extra Fields Contribution // $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'"; $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or p2pef.products_extra_fields_value like '%" . tep_db_input($keyword) . "%'"; // END: Extra Fields Contribution if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'"; $where_str .= ')'; break; } } $where_str .= " )"; } // START: Extra Fields Contribution Search Fields 1.0 foreach ($pef_values as $pef_id => $pef_value) { tep_parse_search_string($pef_value, $pef_value_keywords); if (isset($pef_value_keywords) && (sizeof($pef_value_keywords) > 0)) { $where_str .= " and ("; for ($i=0, $n=sizeof($pef_value_keywords); $i<$n; $i++ ) { switch ($pef_value_keywords[$i]) { case '(': case ')': case 'and': case 'or': $where_str .= " " . $pef_value_keywords[$i] . " "; break; default: $keyword = tep_db_prepare_input($pef_value_keywords[$i]); $where_str .= "(p2pef.products_extra_fields_value like '%" . tep_db_input($keyword) . "%'"; $where_str .= " AND p2pef.products_extra_fields_id = ". (int)$pef_id; $where_str .= ')'; break; } } $where_str .= " )"; } } // END: Extra Fields Contribution if (tep_not_null($dfrom)) { $where_str .= " and p.products_date_added >= '" . tep_date_raw($dfrom) . "'"; } if (tep_not_null($dto)) { $where_str .= " and p.products_date_added <= '" . tep_date_raw($dto) . "'"; } if (tep_not_null($pfrom)) { if ($currencies->is_set($currency)) { $rate = $currencies->get_value($currency); $pfrom = $pfrom / $rate; } } if (tep_not_null($pto)) { if (isset($rate)) { $pto = $pto / $rate; } } // BOF Separate Pricing Per Customer if ($status_tmp_product_prices_table == true) { if (DISPLAY_PRICE_WITH_TAX == 'true') { if ($pfrom > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")"; } else { if ($pfrom > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) <= " . (double)$pto . ")"; } } else { // $status_tmp_product_prices_table is not true: uses p.products_price instead of cg_products_price // because in the where clause for the case $status_tmp_special_prices is true, the table // specials_retail_prices is abbreviated with "s" also we can use the same code for "true" and for "false" if (DISPLAY_PRICE_WITH_TAX == 'true') { if ($pfrom > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")"; } else { if ($pfrom > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) >= " . (double)$pfrom . ")"; if ($pto > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) <= " . (double)$pto . ")"; } } // EOF Separate Pricing Per Customer BOF Hide products and categories from groups $where_str .= " and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 "; $where_str .= " and find_in_set('".$customer_group_id."', categories_hide_from_groups) = 0 "; // EOF hide products and categories from group if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) { $where_str .= " group by p.products_id, tr.tax_priority"; } // sort order by drop down menu // if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { if ( (!isset($HTTP_GET_VARS['sortdir'])) || (!isset($HTTP_GET_VARS['sortcol'])) || (!ereg('[1-8]', $HTTP_GET_VARS['sortcol'])) || (!ereg('[ad]', $HTTP_GET_VARS['sortdir'])) || ($HTTP_GET_VARS['sortcol'] > sizeof($column_list)) ) { // sort order by drop down menu for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { // sort order by drop down menu // $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $HTTP_GET_VARS['sortcol'] = $i+1; $HTTP_GET_VARS['sortdir'] = 'a'; // sort order by drop down menu $order_str = ' order by pd.products_name'; break; } } } else { // sort order by drop down menu // $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); // $sort_order = substr($HTTP_GET_VARS['sort'], 1); $sort_col = $HTTP_GET_VARS['sortcol']; $sort_order = $HTTP_GET_VARS['sortdir']; // sort order by drop down menu $order_str = ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $order_str .= "p.products_model " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_NUMBER': $order_str .= "p.products_number " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $order_str .= "pd.products_name " . ($sort_order == 'd' ? "desc" : ""); break; case 'PRODUCT_LIST_MANUFACTURER': $order_str .= "m.manufacturers_name " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $order_str .= "p.products_quantity " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $order_str .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $order_str .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $order_str .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE_EX': $order_str .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } $listing_sql = $select_str . $from_str . $where_str . $order_str; require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  10. bhbilbao

    Error when trying an advanced search

    1054 - Unknown column 'tmp_pp.status' in 'where clause' select count(distinct p.products_id) as total from products p left join products_to_products_extra_fields p2pef on p.products_id=p2pef.products_id left join manufacturers m on p.manufacturers_id=m.manufacturers_id left join specials s on p.products_id = s.products_id left join tax_rates tr on p.products_tax_class_id = tr.tax_class_id left join zones_to_geo_zones gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '195') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '179'), products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '3' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '3' and p2c.categories_id = '23' and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= 150) and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= 200) and find_in_set('2', products_hide_from_groups) = 0 and find_in_set('2', categories_hide_from_groups) = 0 same problem with advanced search result. SPPC NEW PRODUCTS ICON BROWSE CATEGORIES NEW FIELDS EVERYWHERE QPBPP The advanced search result (when filter products by price) only works for non logged users. If a user is logged and uses the advanced search result it gets the error.
  11. bhbilbao

    Pricelist HTML enhancement

    How can I show the list for only one language?? The items list are triplicated.
  12. bhbilbao

    Better product listing Rating *****

    Thanks Spooks, its not the first time i have problems with "Better product listting". Tried to add the reviews starts and now the buy_now.gif button dissapeared. ¿? I always must to edit again the products_listing.php file when installing a new contribution. Im boring of it. I will try Product Listing Enhancements.
  13. I need this both working. Better product listing and product info http://addons.oscommerce.com/info/6505 Review Rating In Product Listing 1.0 http://addons.oscommerce.com/info/6674 Better product listing is well installed but when trying to integrate the review system with the points nothing happens. Does anyone how to modify or recomend other rating contribution for modified listings????? This is the product_listing.php: <?php $list_box_contents = array(); $list_box_contents[] = array('params' => 'class="productListing-heading"'); $cur_row = sizeof($list_box_contents) - 1; $add_multiple = false; $use_of_attributes = false; $get_short_description = true; $column_list[] = PRODUCT_SHORT_DESCRIPTION; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MULTIPLE': $add_multiple = true; $use_of_attributes = true; echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'sort', 'products_id')) . 'action=add_multiple', 'NONSSL') . '">'; break; case '$extra_images': $use_of_attributes = true; break; case 'PRODUCT_SHORT_DESCRIPTION': $get_short_description = true; break; } } ?> <?php $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y', 'products_id'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); global $cart; if ($listing_split->number_of_rows > 0) { if (PRODUCT_LIST_GRID <= 0) { $colnum = 3; $tdsize = floor(100/3); } else { $colnum = PRODUCT_LIST_GRID; $tdsize = floor(100/PRODUCT_LIST_GRID); } $row = 0; $column = 0; $listing_query = tep_db_query($listing_split->sql_query); $no_of_listings = tep_db_num_rows($listing_query); while ($_listing = tep_db_fetch_array($listing_query)) { $_listing['total'] = ''; $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } if ($use_of_attributes == true) { $products_attributes_count_query = tep_db_query("select count(*) as total, patrib.products_id from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id in (" . implode(',', $list_of_prdct_ids) . ") and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' group by products_id"); while ($_products_attributes_count = tep_db_fetch_array($products_attributes_count_query)) { $products_attributes_count[] = array('products_id' => $_products_attributes_count['products_id'], 'total' => $_products_attributes_count['total']); } $no_of_products_with_attributes = count($products_attributes_count); for ($x = 0; $x < $no_of_listings; $x++) { if (!empty($products_attributes_count)) { for ($i = 0; $i < $no_of_products_with_attributes; $i++) { if ($listing[$x]['products_id'] == $products_attributes_count[$i]['products_id'] ) { $listing[$x]['total'] = $products_attributes_count[$i]['total']; } } } } } $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where products_id in (" . implode(',', $list_of_prdct_ids) . ") and status = '1'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price']); } for ($x = 0; $x < $no_of_listings; $x++) { if (!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if ($listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; } } } } if ($get_short_description == true) { $short_description_query = tep_db_query("select pd.products_id, pd.products_description from " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.language_id = '" . (int)$languages_id . "' and products_id in (" . implode(',', $list_of_prdct_ids) . ")"); while ($short_description_array = tep_db_fetch_array($short_description_query)) { $short_description[] = array ('products_id' => $short_description_array['products_id'], 'short_description' => substr(strip_tags($short_description_array['products_description']), 0, PRODUCT_LIST_NUM) . '...'); } $number_of_descriptions = count($short_description); for ($x = 0; $x < $no_of_listings; $x++) { if ($number_of_descriptions > 0) { for ($i = 0; $i < $number_of_descriptions; $i++) { if ($listing[$x]['products_id'] == $short_description[$i]['products_id'] ) { $listing[$x]['short_description'] = $short_description[$i]['short_description']; } } } } } $counter = 0; for ($x = 0; $x < $no_of_listings; $x++) { if ($x % PRODUCT_LIST_GRID == 0) { if (($counter+1)/2 == floor(($counter+1)/2)) { $list_box_contents[$row] = array('params' => 'class="productListing-even"'); $class_for_buy_now_row = 'class="productListing-even"'; } else { $list_box_contents[$row] = array('params' => 'class="productListing-even"'); $class_for_buy_now_row = 'class="productListing-odd"'; } } $product_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; $lc_text = array(); switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text['products_model'] = ' ' . $listing[$x]['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($_GET['manufacturers_id'])) { $lc_text['products_name'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . (int)$_GET['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>'; } else { $lc_text['products_name'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>'; } break; case 'PRODUCT_SHORT_DESCRIPTION'; $lc_text['products_short_description'] = $listing[$x]['short_description']; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text['manufacturers_name'] = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a>'; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing[$x]['specials_new_products_price'])) { $lc_text['products_price'] = '<s>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span>'; } else { $lc_text['products_price'] = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text['products_quantity'] = ' ' . $listing[$x]['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text['products_weight'] = ' ' . $listing[$x]['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($_GET['manufacturers_id'])) { $lc_text['products_image'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . (int)$_GET['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH+40, SMALL_IMAGE_HEIGHT +40) . '</a>'; } else { $lc_text['products_image'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH+40, SMALL_IMAGE_HEIGHT +40) . '</a>'; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_text['button_in_cart'] = '<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), tep_get_all_get_params(array('action','sort','products_id')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW, 'style="padding-bottom: 5px;"') . '</a>'; $lc_text['button_continue'] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_CONTINUE, 'style="padding-bottom: 5px;"') . '</a>'; break; case 'PRODUCT_LIST_MULTIPLE': $lc_align = 'right'; $lc_valign = 'top'; $product_list_multiple_text = (TABLE_HEADING_MULTIPLE . tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '0', 'size="4"')); if ((int)$listing[$x]['total'] > 0) { $product_list_multiple_text .= '<table border="0" cellpadding="0" cellspacing"0">'; $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected_attribute = false; $products_options_array = array(); $product_list_multiple_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing[$x]['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); $list_of_prdcts_attributes_id = ''; $products_options = array(); while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; } for ($v = 0 ; $v < count($products_options); $v++) { $options_text = ''; $options_text = $products_options[$v]['products_options_values_name']; if (defined('PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN') && PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN == 'Yes') { if (tep_not_null($listing[$x]['specials_new_products_price'])) { $original_price = $listing[$x]['specials_new_products_price']; } else { $original_price = $listing[$x]['products_price']; } if ($products_options[$v]['price_prefix'] == "-") { $show_price = 0.0 + $original_price - $products_options[$v]['options_values_price']; } else { $show_price = 0.0 + $original_price + $products_options[$v]['options_values_price']; } $options_text .= ' (' . $currencies->display_price($show_price, tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; } else { if ($products_options[$v]['options_values_price'] != '0') { $options_text .= ' (' . $products_options[$v]['price_prefix'] . $currencies->display_price($products_options[$v]['options_values_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; } } $products_options_array[] = array('id' => $products_options[$v]['products_options_values_id'], 'text' => $options_text); } $product_list_multiple_text .= tep_draw_pull_down_menu('id_'.$listing[$x]['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); $product_list_multiple_text .= '</td></tr>'; } $product_list_multiple_text .= '</table>'; $lc_text['product_list_multiple'] = $product_list_multiple_text; } break; case '$extra_images': $lc_align = 'right'; $lc_valign = 'top'; $lc_text_plbnm = '<form name="buy_now_' . $listing[$x]['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','sort','products_id')) . 'action=buy_now_form', 'NONSSL') . '">'; $lc_text_plbnm .= (TABLE_HEADING_MULTIPLE) . '<input type="text" name="cart_quantity" value="1" maxlength="6" size="4">'; if ((int)$listing[$x]['total'] > 0) { $lc_text_plbnm .= '<table border="0" cellpadding="0" cellspacing"0">'; $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected_attribute = false; $products_options_array = array(); $lc_text_plbnm .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing[$x]['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); $list_of_prdcts_attributes_id = ''; $products_options = array(); while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; } for ($v = 0 ; $v < count($products_options); $v++) { $options_text = ''; $options_text = $products_options[$v]['products_options_values_name']; if (defined('PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN') && PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN == 'Yes') { if (tep_not_null($listing[$x]['specials_new_products_price'])) { $original_price = $listing[$x]['specials_new_products_price']; } else { $original_price = $listing[$x]['products_price']; } if ($products_options[$v]['price_prefix'] == "-") { $show_price = 0.0 + $original_price - $products_options[$v]['options_values_price']; } else { $show_price = 0.0 + $original_price + $products_options[$v]['options_values_price']; } $options_text .= ' (' . $currencies->display_price($show_price, tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; } else { if ($products_options[$v]['options_values_price'] != '0') { $options_text .= ' (' . $products_options[$v]['price_prefix'] . $currencies->display_price($products_options[$v]['options_values_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; } } $products_options_array[] = array('id' => $products_options[$v]['products_options_values_id'], 'text' => $options_text); } $lc_text_plbnm .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); $lc_text_plbnm .= '</td></tr>'; } $lc_text_plbnm .= '</table>'; $lc_text_plbnm .= tep_draw_hidden_field('products_id', $listing[$x]['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing[$x]['products_name'] . TEXT_NOW); } if ((int)$listing[$x]['total'] == 0) { $lc_text_plbnm .= '<br> '; $lc_text_plbnm .= tep_draw_hidden_field('products_id', $listing[$x]['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing[$x]['products_name'] . TEXT_NOW); $lc_text_plbnm .= '<br> '; $lc_text_plbnm .= '<table border="0" cellpadding="0" cellspacing"0"><tr><td class="main"></td><td></td></tr></table>'; } $lc_text_plbnm .= '</form>'; $lc_text['$extra_images'] = $lc_text_plbnm; break; default: $lc_text = array(); } if (is_array($lc_text)) { foreach($lc_text as $name => $contents) { $product_contents[$name] = $contents; } } } $class_for_right_side = ''; if (($x % $colnum) < ($colnum - 1)) { $class_for_right_side = ' class="infobox"'; } $class_for_bottom = ''; $last_row = ceil($no_of_listings / $colnum) - 1; if ($row < $last_row) { $class_for_bottom = ' class="infobox"'; } if(PRODUCT_LIST_GRID ==1) { $product_text = "\n"; $product_text .= '<table Width="100%" cellpadding="0" cellspacing="0" border="0">'; $product_text .= ' <tr><td width="25%" rowspan="7" align="center">' . $product_contents['products_image'] . '</td>'; $product_text .= ' <td width="70%" class="pagelisting">' . $product_contents['products_name'] . '</td></tr>'; $product_text .= ' <tr><td width="70%" cellpadding="0" cellspacing="0" class="description"><br>' . $product_contents['products_short_description'] . '<br></td></tr>'; $product_text .= ' <tr><td width="70%" class="price">'. LISTING_PRICE . $product_contents['products_price'] . '</td></tr>'; if (!PRODUCT_LIST_MANUFACTURER == 1) { } else { $product_text .= ' <tr><td width="70%" class="main">'. LISTING_MANUFACTURER . $product_contents['manufacturers_name'] . '</td></tr>'; } if (!PRODUCT_LIST_QUANTITY == 1) { } else { $product_text .= ' <tr><td width="70%" class="main">'. LISTING_QTY . $product_contents['products_quantity'] . '</td></tr>'; } $product_text .= ' <tr><td height="25" align="left">' . $product_contents['button_in_cart'] . ' ' . $product_contents['button_continue'] .'</td></tr>'; $product_text .= '</tr></table><hr>'; $list_box_contents[$row][$column] = array('align' => 'center', 'valign' => $lc_valign, 'params' => 'class="productListing-data" width="'.$tdsize.'%"', 'text' => $product_text); $column ++; if ($x == ($no_of_listings -1)) { $last_column = ($x % PRODUCT_LIST_GRID); $fill_up_empty_cell = tep_draw_separator('pixel_trans.gif', '250px' , '1'); for ($column = ($last_column + 1) ; $column < $colnum; $column++) { $list_box_contents[$row][$column] = array('align' => 'center', 'valign' => $lc_valign, 'params' => 'class="productListing-data" width="'.$tdsize.'%"', 'text' => $fill_up_empty_cell); } } } elseif (PRODUCT_LIST_GRID ==2){ $product_text = "\n"; $product_text .= '<table Width="98%" height="300" cellpadding="0" cellspacing="0" style="border-width:1px; border-color:black; border-style:solid;">'; $product_text .= ' <tr><td colspan="2" class="pagelist">' . $product_contents['products_name'] . '</td></tr>'; $product_text .= ' <tr><td colspan="2" align="center">' . $product_contents['products_image'] . '</td></tr>'; $product_text .= ' <tr><td align="center" colspan="2">' . $product_contents['button_in_cart'] . ' ' . $product_contents['button_continue'] .'</td></tr>'; $product_text .= ' <tr><td colspan="2" class="price">'.LISTING_PRICE . $product_contents['products_price'] . '</td></tr>'; if (!PRODUCT_LIST_MANUFACTURER == 1) { } else { $product_text .= ' <tr><td colspan="2" class="main">'. LISTING_MANUFACTURER . $product_contents['manufacturers_name'] . '</td></tr>'; } if (!PRODUCT_LIST_QUANTITY == 1) { } else { $product_text .= ' <tr><td colspan="2" class="main">'. LISTING_QTY . $product_contents['products_quantity'] . '</td></tr>'; } $product_text .= ' <tr><td colspan="2" class="description">'. LISTING_DESCRIPTION . '<BR>' . $product_contents['products_short_description'] . '<br></td></tr>'; $product_text .= '</table>'; $product_text .= '<table><tr><td></td></tr></table>'; $list_box_contents[$row][$column] = array('align' => 'center', 'valign' => $lc_valign, 'params' => 'class="productListing-data" width="'.$tdsize.'%"', 'text' => $product_text); $column ++; if ($x == ($no_of_listings -1)) { $last_column = ($x % PRODUCT_LIST_GRID); $fill_up_empty_cell = tep_draw_separator('pixel_trans.gif', '220px' , '1'); for ($column = ($last_column + 1) ; $column < $colnum; $column++) { $list_box_contents[$row][$column] = array('align' => 'center', 'valign' => $lc_valign, 'params' => 'class="productListing-data" width="'.$tdsize.'%"', 'text' => $fill_up_empty_cell); } } } if ($column >= $colnum && $x < ($no_of_listings -1)) { $row ++; $column = 0; $counter++; } } new productListingOSCBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y','products_id','sort'))); // sort was added in this file, no point here ?></td> </tr> <?php if ($add_multiple == true){ ?> <tr> <td align="left" class="main"> </td> <td align="right" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form></td> </tr> <?php } ?> </table> <?php } ?>
  14. bhbilbao

    Add Extended Warranties Option - New Module

    On the right: This module is installed Status ok Dealer Id ¿? Dealer Key ¿? Editing a product in categories.php Extended Warranty - Shipsensation.com Category: Extended Warranty Warranty Products No product fount with this condition Product_model Your Cost Cost to Consumer Your Profit Enable eWarranty for this product ok I dont know exactly how this works.
  15. bhbilbao

    Add Extended Warranties Option - New Module

    After installing, on the warranties module. I see that the module is trying to conect an external web. http://shipsensation.com/Warranty/webservice/key.csv I dont know how to replace this or configure. Thanks.
  16. bhbilbao

    Seperate Pricing Per Customer v3.5

    Try to modify checkout_process.php including a line with the type of customer. ref. // lets start with the email confirmation if (EMAIL_USE_HTML == 'true') { $email_order; } else { //Package Tracking Plus BEGIN $email_order = EMAIL_TEXT_GREETING . "\n" . EMAIL_SEPARATOR . "\n" . STORE_NAME . EMAIL_INVOICE . "\n" . //Package Tracking Plus END EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . //Package Tracking Plus BEGIN EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL') . "'>" . 'order_id=' . $insert_id . "</a>\n" . //Package Tracking Plus END 'Email: ' . $order->customer['email_address'] . "\n" . 'TLF: ' . $order->customer['telephone'] . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { + $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } or use a emailed Discount Coupon for specific customer type. P.D: need help with my previous question. anyone??
  17. bhbilbao

    Custom Product Builder

    In one hand there is also a popup imagen when clicking on info button. (popup_image.php) For the mouseover images I suggest you to search diferent solutions here. http://addons.oscommerce.com/category?search=popup+image For you question, the list with images is in product_builder.php <input type="hidden" name="select1" onchange="calc_subtotal(mainform);calc_total(mainform);" size="4" multiple style="width=330"> <tr onClick="oFrame.style.display='none'"> <td width="50%" class="builder_heading" align="left"><?php if (($cpb_build_one_product) && (!$cpb_build_product_details_ontop)) {echo ' ' . TEXT_BUILD_DETAILS;} ?></td> and bottom: <script language="JavaScript"> mainform.elements["qty["+<?php echo $key;?>+"]"].selectedIndex = '<?php echo $qty-1;?>'; add_product('<?php echo $component_note[$key];?>','<?php echo $InsertImage[$key];?>','<?php echo $InsertName[$key];?>','<?php echo $InsertDescription[$key];?>','<?php echo $iprice;?>','<?php echo $InsertProducts[$key];?>',<?php echo $key;?>); </script> The problem with image expando is that you will need 2 images for each product.
  18. bhbilbao

    Install Question STS

    Same problem here. In this case in Order Editof contribution, after clicking "Send order confirmation email". Anyone solved this before??
  19. bhbilbao

    NEW! Complete Order Editing Tool!

    The button is this: <div class="update4" align="center"><?php echo ENTRY_SEND_NEW_ORDER_CONFIRMATION; ?> <?php echo tep_draw_checkbox_field('nC1', '', false); ?></div> <div class="update5" align="center"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></div> The function that dosn´t work is this: // CHECK FOR NEW EMAIL CONFIRMATION if ( (isset($_POST['nC1'])) || (isset($_POST['nC2'])) || (isset($_POST['nC3'])) ) { //then the user selected the option of sending a new email tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=email')); //redirect to the email case } else { //email? email? We don't need no stinkin email! if ($order_updated) { $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=edit')); } break; // 3. NEW ORDER EMAIL ############################################################################################### case 'email': $oID = tep_db_prepare_input($_GET['oID']); $order = new manualOrder($oID); ,,,, ,,,,
  20. bhbilbao

    NEW! Complete Order Editing Tool!

    Need help. This was wonderfull working until now. When I click "Send an order confirmation Button" gets this error: Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php:18) in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php on line 30 I dont know what is the problem because there was working perfect until I instaled SPPC or Header Tags. Contribution instaled order: ORDER EDITOR 5.0.9 > Administration access level acounts > SPPC > HIDE PRODUCTS FOR SPPC > SPECIALS FOR SPPC > SUPPLIER ADMIN AREA > ULTIMATE SEO URLS5 > HEADER TAGS SEO Any suggestion?
  21. bhbilbao

    Manual Order Maker

    Need help. This was wonderfull working until now. When I click "Send an order confirmation Button" gets this error: Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php:18) in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php on line 30 I dont know what is the problem because there was working perfect until I instaled SPPC or Header Tags. Contribution instaled order: ORDER EDITOR 5.0.9 > Administration access level acounts > SPPC > HIDE PRODUCTS FOR SPPC > SPECIALS FOR SPPC > SUPPLIER ADMIN AREA > ULTIMATE SEO URLS5 > HEADER TAGS SEO Any suggestion?
  22. Need a contribution to add the discount percentage as gif over the product image. -20%off -50%Off etc. I have oscthumb but it modifies the image for all products. Any suggestion?
  23. bhbilbao

    Seperate Pricing Per Customer v3.5

    Look for the documentation of the contrib. There was a default login and pass after instaling the contrib. I have similar problem and fixed it entering phpmyadmin and editing and changing admin_password with the code of the old one. ref:
  24. bhbilbao

    Custom Product Builder

    Try with IMAGE EXPANDO palcing the new class on the thumbnail TD. REF: <img class="expando vacation" and then configuring the expand speed as fast.
  25. bhbilbao

    Cool Flash Carousel Menu

    Does anyone knows how to remove the transparency mirror images down to the product???? They appear croped because I increased the size of the original ones.
×