Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

yesitshere

Archived
  • Posts

    63
  • Joined

  • Last visited

Everything posted by yesitshere

  1. And hey, beware oscommercians !!! I was told to wrote my sitename[dot]com in this manner, not to be spotted by google. Well guess what, google found it this way too..... http://www.google.be/search?rlz=1C1GGLS_en...=kosherdiscount Any way of getting out of this? thanks for everyone that helped or tried to help
  2. Thank You !!! Jonojamesmac is officially the genius from oscommerce. He helped me bring it to a good end, thank you so much !!!!
  3. Hi thanks, I updated it. the frontpage didnt change yet. The order on the homepage is NEW I think, but wouldn't mind random. Maybe the search result changed, but it doesnt show any results, in other words, it doesnt say nothing found, but its just blank.... I've tried to copy the unedited search result back on the site, but it doesnt help. I've uploaded my site (not sql), so that it might be much easier to see whatever the problem might be. Its in a self extracting rar format *** edited, will send the link to you in private message thank you so so much
  4. thank you again. So the only change in search result is pushing in those two = $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, p.products_status, p.products_quantity, 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 "; Now it doesn't show that they are out of stock, see http://kosherdiscount.eu/advanced_search_r...p?keywords=test the product zero stock is my 0 stock test. My homepage is temporarily http://kosherdiscount.eu/index3.php , as the regular homepage is a landings page for google adds, and i didn't want people on it before the opening. PS: off course all links starting with ...icount.eu/index.php/.... will not work for the moment.
  5. Shoot, this Advanced search, has a completely different way of working then products new and specials, I don't find anything to replace... :( Here below the code: Thanks again so much !!! <?php /* $Id: advanced_search_result.php,v 1.72 2003/06/23 06:50:11 project3000 Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADVANCED_SEARCH); $error = false; if ( (isset($HTTP_GET_VARS['keywords']) && empty($HTTP_GET_VARS['keywords'])) && (isset($HTTP_GET_VARS['dfrom']) && (empty($HTTP_GET_VARS['dfrom']) || ($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING))) && (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'])) ) { $error = true; $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT); } else { $dfrom = ''; $dto = ''; $pfrom = ''; $pto = ''; $keywords = ''; 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['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); } } } if (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords)) { $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 border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="col_left"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </td> <!-- body_text //--> <td width="100%" class="col_center"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <?php tep_draw_heading_top();?> <?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_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 = ''; 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; } } $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 "; } $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"; 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 and p2c.categories_id = c.categories_id "; 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]); $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) . "%'"; 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 .= " )"; } 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"; } if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $order_str = ' order by pd.products_name'; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); $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; } } $listing_sql = $select_str . $from_str . $where_str . $order_str; require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> <br style="line-height:1px;"><br style="line-height:10px;"> <table cellpadding="0" cellspacing="0" border="0" align="center"> <tr><td align="right" width="100%"><?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> <td><?php echo tep_draw_separator('spacer.gif', '10', '1'); ?></td> </tr> </table> <br style="line-height:1px;"><br style="line-height:9px;"> <!-- body_text_eof //--> <?php tep_draw_heading_bottom_3();?> <?php tep_draw_heading_bottom();?> </table> </form></td> <!-- body_text_eof //--> <td class="col_right"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--></body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  6. Thanks so so much, I thought I changed it, although I went over several times your comments, I must have missed it. What I still need to change is: advanced_search_result.php and the standard homepage php file, but i'm not sure which one it is. (I mean to say the page that deals with the products that randomly show up on the homepage). PS: let me know if I can help you with anything else. I'm pretty good in the travel sector.
  7. Excellent hunching Fantastic, you are a genius !!! I hope I manage to change the others to, that is specials, the product listings, etc thank you so so much.
  8. Hi, first off all thank you very much for your answers and time. The one thing that seemed to have been solved is turning the out of stock into a static image, but all the other products still appear as zero stock, although it has plenty of stock. I know its long, but I've copy pasted below my whole product-new file, I hope it can be solved this way, once again thanks very much. <?php /* $Id: products_new.php,v 1.27 2003/06/09 22:35:33 hpdl Exp $ 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_PRODUCTS_NEW); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCTS_NEW)); ?> <!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; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <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 border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="col_left"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </td> <!-- body_text //--> <td width="100%" class="col_center"> <?php /* require(DIR_WS_BOXES . 'panel_top.php'); */ ?> <? tep_draw_heading_top();?> <? new contentBoxHeading_ProdNew($info_box_contents);?> <? tep_draw_heading_top_3();?> <?php $products_new_array = array(); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '2'))) { ?> <?php echo tep_draw_result_top_1(); ?> <table border="0" cellspacing="0" cellpadding="0" class="result"> <tr> <td><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php echo tep_draw_result_top(); ?> <?php echo tep_draw_result_bottom_1(); ?> <?php } ?> <?php if ($products_new_split->number_of_rows > 0) { $products_new_query = tep_db_query($products_new_split->sql_query); $row = 0; $col = 0; $info_box_contents = array(); while ($products_new = tep_db_fetch_array($products_new_query)) { $product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_new['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $p_desc = substr(strip_tags($product['products_description']), 0, MAX_DESCR_1); $p_id = $product['products_id']; $p_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; $p_name = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' .$products_new['products_name'] . '</a>'; if ($new_price = tep_get_products_special_price($products_new['products_id'])) { $products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>'; } else { $products_price = '<span class="productSpecialPrice">'.$currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']).'</span>'); } $p_price = $products_price; if($product_info['products_quantity'] <= 0 || $product_info['products_status']==0) { $linkbutton = tep_image_button('button_out_of_stock.gif'); } else { $linkbutton = '<a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a>'; } $products_new['products_name'] = tep_get_products_name($products_new['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => ' style="width:50%;"', 'text' => ' <table cellpadding="0" cellspacing="0" border="0" style="height:154px"> <tr> <td> <table cellpadding="0" cellspacing="0" border="0" style="height:35px "> <tr> <td>'.tep_image(DIR_WS_IMAGES.'q1.gif').'</td> <td class="bg5">'.$p_name.'</td> <td>'.tep_image(DIR_WS_IMAGES.'q2.gif').'</td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" class="bg7" style="height:109px "><tr><td> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="width:104px" align="center" class="vam"> <br style="line-height:2px">'.$p_pic.'</td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:133px"> <tr> <td style="height:88px " class="vam">'.$p_desc.'</td> </tr> </table> </td> <td class="bg8">'.tep_draw_separator('spacer.gif', '1', '1').'</td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" style="height:29px "> <tr> <td width="40%" align="center" class="vam">'.$p_price.'</td> <td width="60%" class="vam" style="height:21px"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td width="100%">' . $linkbutton . ''.tep_image(DIR_WS_IMAGES.'z6.gif').'<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a></td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td> </tr> </table> </td> <td class="bg8">'.tep_draw_separator('spacer.gif', '1', '1').'</td> </tr> </table> </td></tr></table> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td>'.tep_image(DIR_WS_IMAGES.'q3.gif').'</td> <td class="bg6">'.tep_draw_separator('spacer.gif', '1', '1').'</td> <td>'.tep_image(DIR_WS_IMAGES.'q4.gif').'</td> </tr> </table> </td> </tr> </table> '); $col ++; if ($col > 1) { $col = 0; $row ++; } } new contentBox($info_box_contents); } else { ?> <table border="0" cellspacing="0" cellpadding="0" class="box_width_cont"> <tr><td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td></tr> <tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr> </table> <?php } ?> <?php echo tep_draw_result_bottom(); ?> <?php if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <?php echo tep_draw_result_top_2(); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="result"> <tr> <td><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php echo tep_draw_result_bottom_2(); ?> <?php } ?> <? tep_draw_heading_bottom_3();?> <? tep_draw_heading_bottom();?> </td> <!-- body_text_eof //--> <td class="col_right"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--></body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  9. Hi, thanks so much for your time and efforts. It seems to work, except: it shows all articles "out of stock" (even the ones that have a stock, and the "out of stock" is clickable (if iy could be just a static image, it would be wonderful. thanks again
  10. To finish off in even more style, I have the following question. I used MODs, most of them (in this specific case) didnt work well, but one off them managed to change the "add to cart" button, to a static "sold out" picture when out of stock, but only in the product description, but not on the pages where you can see several products at the same time, such as: homepage, specials, new products. I'll copy paste below the codes which I supppose are the appropriate ones, if you need more/different ones, please let me know. Thank you so so much. PRODUCT_INFO.PHP, WORKS :rolleyes: <?php if($product_info['products_quantity'] <= 0 || $product_info['products_status']==0) echo tep_image_button('button_out_of_stock.gif'); else echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?> </td> SPECIALS.PHP, DOES NOT WORK <td width="100%" nowrap><a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a>'.tep_image(DIR_WS_IMAGES.'z6.gif').'<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a></td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td> PRODUCTS_NEW.PHP, DOES NOT WORK <_< <td width="100%"><a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a>'.tep_image(DIR_WS_IMAGES.'z6.gif').'<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a></td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td> INCLUDES/MODULES/NEW_PRODUCTS.PHP, DOES NOT WORK :blush: <td width="100%"><a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a>'.tep_image(DIR_WS_IMAGES.'z6.gif').'<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a></td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td> INCLUDES/MODULES/PRODUCT_LISTING.PHP, DOES NOT WORK :blink: <td width="100%"><a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a>'.tep_image(DIR_WS_IMAGES.'z6.gif').'<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a></td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td>
  11. Hi, At first i didnt find:"case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {", as i had a variation. I changed it, and it works, Thank you so much, and G-d bless !!!
  12. Thank you very much for your response. I thought that would finally do it, but unfortunately it didn't. Can you please maybe think of another possibility? Thanks again very much yesitshere
  13. Hi, their online form doesn't work (result in error), and when sending to 2 of the 3 email addresses provided on their site, it returns as error... Please someone come up with an alternative <_< PS: I have used freelancers (with excellent rating on guru.com) and badly burned myself....
  14. I thank you very much, i will contact them, however, more suggestions are welcome, in case they can't solve it.
  15. Hey guys, 300+ views and still no real answer... Is there anyone who could reffer me to someone that really knows php/oscommerce ? I'm willing to pay, but want to be sure that I'm dealing with an honest person, as i have been ripped off before.... Thanks alot, I'm really desperate !
  16. hi thanks for your answer. the fact is that the <form>-tag is in the php_info.php, which actually does work (and indeed the form-tag gets closed in later code). For more convenience, I have posted both the working code from php_info.php en from products_new.php which does not. Maybe this way the error will become clearer. Thanks again for your efforts. the code in php_info.php, which is working: <?php /* $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $ 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_PRODUCT_INFO); /** original **/ //$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); /** show-soldout-v1.0 **/ $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!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; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </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 border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="col_left"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </td> <!-- body_text //--> <td width="100%" class="col_center"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr><td> <? tep_draw_heading_top(); ?> <table cellpadding="0" cellspacing="0" border="0" style="height:35px;" class="product"> <tr> <td><img alt="" src="images/q1.gif"></td> <td class="bg5"><em><?php echo TEXT_PRODUCT_NOT_FOUND;?></em></td> <td><img alt="" src="images/q2.gif"></td> </tr> </table> <? tep_draw_heading_top_4(); ?> <!-- <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td> --> <br style="line-height:1px;"><br style="line-height:12px;"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table> <!-- </td> </tr> </table> --> <? tep_draw_heading_bottom_4(); ?> <? tep_draw_heading_bottom(); ?> <?php } else { /** original **/ //$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); /** show-soldout-v1.0 **/ $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td> <? tep_draw_heading_top(); ?> <?php echo tep_draw_title_top();?> <?php echo $breadcrumb->trail(' » ')?> <?php echo tep_draw_title_bottom();?> <? /* tep_draw_heading_top_2(); */ ?> <?php if (tep_not_null($product_info['products_image'])) { ?> <table cellpadding="0" cellspacing="0" border="0" style="height:35px;" class="product"> <tr> <td><img alt="" src="images/q1.gif"></td> <td class="bg5"><em><?php echo $products_name; ?></em></td> <td><img alt="" src="images/q2.gif"></td> </tr> </table> <? tep_draw_heading_top_4(); ?> <table cellspacing="0" cellpadding="0" border="0" class="product"> <tr><td> <table cellspacing="0" cellpadding="0" border="0"> <tr><td height="100%"> <table cellpadding="0" cellspacing="0" border="0" align="left" class="prod_info" style=" margin-right:15px;"> <tr><td class="pic" align="center"> <br style="line-height:1px;"><br style="line-height:9px;"> <?php echo tep_draw_prod_top();?> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?> </noscript> <?php echo tep_draw_prod_bottom();?> </td></tr> <tr><td align="center"> <script language="javascript"><!-- document.write('<?php echo '<div><a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>'); //--></script> <noscript> <?php echo '<div><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank"><br style="line-height:7px">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?> </noscript> </td></tr> </table> <div class="padd3"><?php echo stripslashes($product_info['products_description']); ?> <br><br style="line-height:11px"><span class="productSpecialPrice"><?=$products_price?></span></div> </td></tr> </table> </td> </tr> </table> <?php } ?> <? /* tep_draw_heading_bottom_2(); */ ?> <table cellspacing="0" cellpadding="0" border="0" align="center" style="margin:0px 0px 15px 0px; height:1px;"> <tr><td><?php echo tep_draw_separator('spacer.gif', '1', '1');?></td></tr> </table> <? tep_draw_heading_top_2();?> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table cellpadding="0" cellspacing="0" class="box_width_cont product"> <tr><td height="25" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td></tr> <?php $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='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <tr><td height="10" colspan="2"></td></tr> <?php } ?> </table> <?php } ?> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } if (tep_not_null($product_info['products_url'])) { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } else { ?> <table cellpadding="0" cellspacing="0" class="product box_width_cont"> <tr><td class="line_h"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td></tr> <tr><td height="17"></td></tr> </table> <?php } ?> <!-- <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"><td> --> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="product box_width_cont"> <tr> <td class="main bg_input"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?><?php echo tep_draw_separator('spacer.gif', '15', '1'); ?> <?php if($product_info['products_quantity'] <= 0 || $product_info['products_status']==0) echo tep_image_button('button_out_of_stock.gif'); else echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?> </td> </tr> </table><br style="line-height:1px;"><br style="line-height:10px;"> <!-- </td></tr> </table> --> <? tep_draw_heading_bottom_2();?> <? tep_draw_heading_bottom_4(); ?> <?php tep_draw_heading_bottom();?> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table></form></td> <!-- body_text_eof //--> <td class="col_right"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--></body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> the code in products_new.php, which is not working: <?php /* $Id: products_new.php,v 1.27 2003/06/09 22:35:33 hpdl Exp $ 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_PRODUCTS_NEW); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCTS_NEW)); ?> <!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; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <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 border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="col_left"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </td> <!-- body_text //--> <td width="100%" class="col_center"> <?php /* require(DIR_WS_BOXES . 'panel_top.php'); */ ?> <? tep_draw_heading_top();?> <? new contentBoxHeading_ProdNew($info_box_contents);?> <? tep_draw_heading_top_3();?> <?php $products_new_array = array(); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '2'))) { ?> <?php echo tep_draw_result_top_1(); ?> <table border="0" cellspacing="0" cellpadding="0" class="result"> <tr> <td><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php echo tep_draw_result_top(); ?> <?php echo tep_draw_result_bottom_1(); ?> <?php } ?> <?php if ($products_new_split->number_of_rows > 0) { $products_new_query = tep_db_query($products_new_split->sql_query); $row = 0; $col = 0; $info_box_contents = array(); while ($products_new = tep_db_fetch_array($products_new_query)) { $product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_new['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $p_desc = substr(strip_tags($product['products_description']), 0, MAX_DESCR_1); $p_id = $product['products_id']; $p_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; $p_name = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' .$products_new['products_name'] . '</a>'; if ($new_price = tep_get_products_special_price($products_new['products_id'])) { $products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>'; } else { $products_price = '<span class="productSpecialPrice">'.$currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']).'</span>'); } $p_price = $products_price; $products_new['products_name'] = tep_get_products_name($products_new['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => ' style="width:50%;"', 'text' => ' <table cellpadding="0" cellspacing="0" border="0" style="height:154px"> <tr> <td> <table cellpadding="0" cellspacing="0" border="0" style="height:35px "> <tr> <td>'.tep_image(DIR_WS_IMAGES.'q1.gif').'</td> <td class="bg5">'.$p_name.'</td> <td>'.tep_image(DIR_WS_IMAGES.'q2.gif').'</td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" class="bg7" style="height:109px "><tr><td> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="width:104px" align="center" class="vam"> <br style="line-height:2px">'.$p_pic.'</td> <td> <table cellpadding="0" cellspacing="0" border="0" style="width:133px"> <tr> <td style="height:88px " class="vam">'.$p_desc.'</td> </tr> </table> </td> <td class="bg8">'.tep_draw_separator('spacer.gif', '1', '1').'</td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" style="height:29px "> <tr> <td width="40%" align="center" class="vam">'.$p_price.'</td> <td width="60%" class="vam" style="height:21px"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td width="100%"><a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a>'.tep_image(DIR_WS_IMAGES.'z6.gif').'<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a></td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td> </tr> </table> </td> <td class="bg8">'.tep_draw_separator('spacer.gif', '1', '1').'</td> </tr> </table> </td></tr></table> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td>'.tep_image(DIR_WS_IMAGES.'q3.gif').'</td> <td class="bg6">'.tep_draw_separator('spacer.gif', '1', '1').'</td> <td>'.tep_image(DIR_WS_IMAGES.'q4.gif').'</td> </tr> </table> </td> </tr> </table> '); $col ++; if ($col > 1) { $col = 0; $row ++; } } new contentBox($info_box_contents); } else { ?> <table border="0" cellspacing="0" cellpadding="0" class="box_width_cont"> <tr><td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td></tr> <tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr> </table> <?php } ?> <?php echo tep_draw_result_bottom(); ?> <?php if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <?php echo tep_draw_result_top_2(); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="result"> <tr> <td><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php echo tep_draw_result_bottom_2(); ?> <?php } ?> <? tep_draw_heading_bottom_3();?> <? tep_draw_heading_bottom();?> </td> <!-- body_text_eof //--> <td class="col_right"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--></body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> thanks again so much for all your help yesitshere
  17. hi thanks, I was hoping you would reply as you seem like THE authority covering all aspects of oscommerce. I read your post of the other day http://www.oscommerce.com/forums/index.php?sho...p;#entry1386248 but I fail to see how this concerns my problem... And errrhh, what do you mean by: "Check you closed the form" ? I'm looking already weeks for a solution, and there are topics that seem similar or even discuss similar problems, even when the source of it seems different then mine, I still try to figure out if I can squeeze out any info that might help me, to no avail. I'm not the lazy guy that just asks, when with some research an answer could be found.
  18. 63 views and still no reply? Isn't there anyone able to help? Please, it's very important to me. yesitshere
  19. Seriously, this is very important! Can someone please help? Much appreciated yesitshere
  20. Anyone able to help? I'm really desperate on this. Thanks a lot yesitshere
  21. Anyone? This really important to me and I can't seem to find any help elsewhere. Thanks very much in advance yesitshere
  22. Hi I've added quite a few contribs to my shop and it's starting to take shape. Suddenly, I realized a glitch on all the 'listing' pages (new products, index, specials, etc.) whereby when one would click on 'add to cart' it does not actually add the product to the shopping basket (as it does fine in the regular products_info.php). I've looked all over for help, even reviewed some completed contribs and i still can't seem to figure it out. Any help would be much appreciated. You can check out my shop at the following address: http://www.kosherdiscount[dot]eu/index3.php The codes from the php_info.php and (for example the listing page of) products_new.php should do about the same (except for the 'details' and 'reviews' links), but they somehow use different code, and the one on the listing pages does not work. here the (working!) code from php_info.php <?php if($product_info['products_quantity'] <= 0 || $product_info['products_status']==0) echo tep_image_button('button_out_of_stock.gif'); else echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?> here the code that does not seem to work in (as an example) products_new.php: <td width="100%"><a href="'.tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART).'<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a></td><td>'.tep_draw_separator('spacer.gif', '5', '1').'</td> If you need any more info or code, I'd be happy to provide it. Again, this is really important to me, and any help is very much appreciated. Thanks very much in advance yesitshere
  23. Does that mean that you are okay now? By the way use a program like editplus so that you can search in all files in one shot, for example for "lbs" or so. download it here. enjoy.
×
×
  • Create New...