Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

b00

Pioneers
  • Posts

    20
  • Joined

  • Last visited

Profile Information

  • Real Name
    b00

Recent Profile Visitors

8,328 profile views

b00's Achievements

  1. i looked at your site. do you have register globals on?
  2. hey james - could you post a link to your site so i could see what the problem is? :>)
  3. 1. i downloaded the zip files myself and had no problem. maybe there is something wrong with your zip setup or how you are doing it. 2. i believe your HTTP_COOKIE_PATH in the /catalog/includes/configure.php is blank. for this mod to work do the following the steps in this order: --- 1. backup your site completely --- 2. edit your /catalog/includes/configure.php file ---- find this code: define('HTTP_COOKIE_PATH', ''); ---- and replace it with this: define('HTTP_COOKIE_PATH', '/catalog/'); good luck :>)
  4. sorry jan, i may not have the answer to either, but here goes. problem #1 - in regards to "Price: ?18.95" , maybe check in admin - localization- currencies and see what the symbol left and right are for the currency you use. : www.yoursite.com/catalog/admin/currencies.php problem #2 - you say "when you have seen a product twice, it is showed two times in the list Recently viewed." for me this is not a problem in any of my stores. products visited more than once are only displayed once. this is the case in both my stock oscommerce store(no seo-urls) in my heavily modified stores(with seo-urls). thanks - b00
  5. jan s - try replacing the code in your catalog\recently_viewed.php with this(idea for change provided courtesy of jan z): <?php /* recently_viewed.php */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RECENTLY_VIEWED_MORE); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_RECENTLY_VIEWED_MORE)); ?> <!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; ?> Recently Viewed</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="3" cellpadding="3"> <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; ?></td> <!-- <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, 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> <?php if (strlen(trim($recently_viewed)>0)) { // if (strlen($recently_viewed>1)) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php $prod_viewed = str_replace(";" , "," , $recently_viewed ); $prod_viewed = strtr($prod_viewed, ',,',',' ) ; if (strrpos($prod_viewed , "," ) > 0) { $prod_viewed = substr($prod_viewed,0, strrpos( "," , $prod_viewed ) -1 ) ; }//if (strrpos($prod_viewed , "," ) > 0) { $m_id=0; while ($m_id=0) { $m_id=rand(0,1000000); $ses_id_query = tep_db_query("select ses_id from recently_view for ses_id = '" . $m_id . "' "); if (tep_db_num_rows($ses_id_query)) { $m_id=0; }//if (tep_db_num_rows($ses_id_query)) { }//while ($m_id=0) { $counter = 0; $recent_products = split(';',$recently_viewed); foreach ($recent_products as $recent) { if ((strlen($recent) >0)) { $counter++; if (strlen($counter) < 2) { $counter = '0' . $counter; }//if (strlen($counter) < 2) { tep_db_query(" insert into recently_view (products_id,ses_id,ses_date) VALUES (" . $recent .",". $m_id . ",current_date) "); }//if ((strlen($recent) >0)) { }//foreach ($recent_products as $recent) { $products_array = array(); // original $products_query_raw = "select m.manufacturers_name,rv.rec_v_id, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added,pd.products_description from " . TABLE_PRODUCTS . " p, recently_view as rv, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id where p.products_id in (" . $prod_viewed . ") and p.products_status = '1' and p.products_id = rv.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rv.rec_v_id"; // next line changed for sql5 $products_query_raw = "select m.manufacturers_name,rv.rec_v_id, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added,pd.products_description from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, recently_view as rv, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id in (" . $prod_viewed . ") and p.products_status = '1' and p.products_id = rv.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rv.rec_v_id"; $products_split = new splitPageResults($products_query_raw, MAX_DISPLAY_PRODUCTS_NEW); $products_query = tep_db_query($products_split->sql_query); while ($products = tep_db_fetch_array($products_query)) { if ($new_price = tep_get_products_special_price($products['products_id'])) { $products_price = '<s>' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products['products_tax_class_id'])) . '</span>'; } else {//if ($new_price = tep_get_products_special_price($products['products_id'])) { $products_price = $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])); }//if ($new_price = tep_get_products_special_price($products['products_id'])) { ?> <tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td> <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '"><b><u>' . $products['products_name'] . '</u></b></a><br><br>' . $products['products_description']; ?></td> <?php $lc_text = '<div><form name="buy_now_' . $products['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL') . '">'; $lc_text .= '<input type="hidden" name="products_id" value="' . $products['products_id'] . '">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="absbottom"') . ' '. '<br>'; $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $products['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) { // product has attributes $lc_text .= '</div>' . TEXT_PRICE . ' ' . '<b>' . $products_price . '</b><br>' .TEXT_PRODUCT_OPTIONS . '<br>'; $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='" . $products['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 = '" . $products['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($products['products_tax_class_id'])) .') '; } //($products_options['options_values_price'] != '0') { } //while ($products_options = tep_db_fetch_array($products_options_query)) { 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 {// if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = false; } //if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $lc_text .= ''. $products_options_name['products_options_name'] . ':' .''. '' . tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . '<br>'; $lc_text .= ' '; $lc_text .= '</a><br>'; }//while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $lc_text .= '</form>'; if($products['manufacturers_name']<>'') { ?> <td align="center" valign="middle" class="main"><?php echo TEXT_MANUFACTURER . '<br>' . $products['manufacturers_name'] . '<br><br>' . $lc_text . '</form> ' . '</a>'; ?> <?php } else { //if($products['manufacturers_name']<>'') { ?> <td align="center" valign="middle" class="main"><?php echo $lc_text . '</form> ' . '</a>'; ?> <?php } //if($products['manufacturers_name']<>'') { } Else { //if ($products_attributes['total'] > 0) { // product does not have attributes if($products['manufacturers_name']<>'') { ?> <td align="center" valign="middle" class="main"><?php echo TEXT_MANUFACTURER . '<br>' . $products['manufacturers_name'] . '<br><br>' . TEXT_PRICE . ' ' . '<b>' . $products_price . '</b><br><br>' . ' ' . '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, 'products_id=' . $products['products_id']) . '">' . '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, 'products_id=' . $products['products_id']) . '">' . '</a>' . tep_draw_form('buy_now' . $products['products_id'], tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products['products_id']), 'POST') . '<span align="right" >' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="absbottom"') . '</span></form> ' . '</a>'; ?> <?php } else { //if($products['manufacturers_name']<>'') { ?> <td align="center" valign="middle" class="main"><?php echo TEXT_PRICE . ' ' . '<b>' . $products_price . '</b><br><br><br>' . ' ' . '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, 'products_id=' . $products['products_id']) . '">' . '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, 'products_id=' . $products['products_id']) . '">' . '</a>' . tep_draw_form('buy_now' . $products['products_id'], tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products['products_id']), 'POST') . '<span align="right" >' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="absbottom"') . '</span></form> ' . '</a>'; ?> <?php } //if($products['manufacturers_name']<>'') { } //if ($products_attributes['total'] > 0) { ?> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php }//while ($products = tep_db_fetch_array($products_query)) { ?> </td> </tr> <!-- customer_orders_eof //--> <?php // } if (($products_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="main"><?php echo $products_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td align="right" class="main"><?php echo TEXT_RESULT_PAGE . ' ' . $products_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php }//if (($products_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { tep_db_query(" delete from recently_view where ses_id='" . $m_id . "' "); // clean out unneeded records from recently_view db tep_db_query(" delete from recently_view where ses_date < current_date - interval 1 day "); // clean out unneeded records from recently_view db } //if (strlen(trim($recently_viewed)>0)) { ?> </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'); ?> please let me know how it works for you. thanks to you all - b00
  6. sorry to say Jan, i do not think this contribution is for you. it seems your products table is different than the stock oscommerce v2.2 table and does not contain the necessary manufacturers_id field. i would venture to guess you may also have a problem with the products_new.php script? it may be possible to add this field to the table, but doing so may have unitended consequences. i am not sure. you have a nice site and i would not make wholesale changes to incorporate this contribution. maybe someone else may have a solution. thanks - b00
  7. the recently viewed box only shows up when there have been products that have been viewed by the customer (when the customer has viewed the product_info.php page and has exited to another page). thanks - b00
  8. maybe this will help. take a look at the code below and compare it to yours in catalog/product_info.php <!-- body_text //--> <td width="100%" valign="top"><?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 ///////////// begin recently_viewed if (!tep_session_is_registered('recently_viewed')) { tep_session_register('recently_viewed'); $recently_viewed = $HTTP_GET_VARS['products_id'] . ';'; } $dup_recent_viewed = 'n'; $recent_products = split(';',$recently_viewed); foreach ($recent_products as $recent) { if ($recent == $HTTP_GET_VARS['products_id']) $dup_recent_viewed = 'y'; }//foreach ($recent_products as $recent) { if ($dup_recent_viewed == 'n') $recently_viewed = $HTTP_GET_VARS['products_id'] . ';' . $recently_viewed ; ///////////// end recently_viewed if ($product_check['total'] < 1) { ?> please let me know if this helps, if not please post your product_info.php code and any error messages you received. thanks- b00
  9. Recently Viewed Products(sales optimized) for osCommerce-ms2 Support thread - Recently Viewed Products(sales optimized) Allows your customers to see what products they have recently viewed and then easily allows them to order those products. In an infobox placed in either the right or left column a list of products viewed is displayed. Your customer can then either click on the name of the product or click the "See More" button for the page of recently viewed products. All the products on this page have a buy now button. please check out the screen shot. This is a very effective sales tool that minimizes clicks, making it is easy for a customer to purchase items they have recently viewed. The object in retailing is to increase sales. With this goal in mind, this contribution makes it easier for customers to buy these products. All this is without slowing down the product info page (as no extra database queries are required there). Screenshot included! Keywords: product history, viewing history, browsing history http://addons.oscommerce.com/info/5520 Please report bugs/problems/issues in this thread. Please do not pm/email. thanks - b00 :>)
  10. a call for help: i have installed this wonderful contribution, but i have been unable to fully used it. i have read through the posts and i can't seem to find the answer. thanks in advance for your help. i am hoping to have my url's be: mysite/cat-name-product-p-25.html instead i am getting: mysite/product-p-25.html any ideas how i can fix this? ps - i have the "Add category parent to begining of URLs" set to true (and the category parent is larger than the short word filter).
  11. thanks for the hard work! i have one question i hope you can help with; i have the "Add category parent to begining of URLs" set to true but, the category parent is not shown on the url (yes, the category parent is larger than the short word filter). what can i do?
×
×
  • Create New...