Latest News: (loading..)

kscott

Members
  • Content count

    22
  • Joined

  • Last visited

1 Follower

About kscott

Profile Information

  1. I am working on a wishlist mod for osc. most of the code to add a item and view the wishlist is figured out the main problem is the checkout part setting the delivery address should not be to hard to do but my thoughts lie on abuse of the wishlist eg sending a wislist item per COD fuctions that i am looking into are letting the customer set there wishlist to view or no view for others sending the wish per mail basics are: using the shopping cart functions to add a wish Useing the productlisting to display a wishlist adding the shopping cart display to the customrs details to remove a wish useing the tell a frend to send the wish to others This will not be hard to do because all i am doing is adding another shopping cart and calling it wislist If anyone has any other ideas please post your comments
  2. You could also use the stock to do that $prod_quantity = tep_get_products_stock($reviews_array[$i]['products_id']); switch ($prod_quantity) { case 0: echo ' <a href="shipping.php">'. tep_image_button('rd.gif').'</a> '; break; default: echo ' <a href="shipping.php">'. tep_image_button('gr.gif').'</a> '; } i use that to show a image on my reviews page but you could set the case 0 part to someting like case 0: echo 'Out of Stock '; break; case 1000: echo ' in 5 days'; break; case 2000: echo 'in 3 days '; break; case 2000: echo 'in 24 Hours'; break; default: echo 'Same day' its a cheap way to do it but it works so if you set a products stock that you can deliver in 5 days to 1000 it will echo the text in 5 days important for doing this is to switch of the Subtract stock in admin
  3. Nice mod ive just downloaded this and made a little change to the admin side and added a reset button so you can get rid of the stats once you have viewed them. You can download the page here
  4. Illicious I think this is what your looking for you can see a demo here the Featured Products table http://www.pcbuzzard.de/allprods.php <p> <table cellpadding="3" cellspacing="0" border="0"> <tr> <td class="main"><b>Featured Products :</b></td> </tr> </table> <table bgcolor="#0033FF" cellpadding="1" cellspacing="0" border="0" width="100%"> <tr> <td class="text"> <table width="100%" bgcolor="#FFF8E9" cellpadding="5" cellspacing="0" border="0"> <tr> <td class="text"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="text"> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="4" class="infoBoxContents"> <tr> <?php if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status='1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); $random_product['products_description'] = tep_get_products_description($random_product['products_id']); } if ($random_product['specials_new_products_price']) { $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } ?> <td align="center" class="main" width="33%" valign="top"><?php echo'<a href="' .tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td> <td align="left" class="main" width="33%" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], 'NONSSL') . '"><b>' . $random_product['products_name'] . '</b></a><br><b><font color="#CC0000">' . $whats_new_price . '</font></b><br>' . osc_trunc_string(strip_tags($random_product['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '" alt="More info...">More info...</a></p>'; ?></td></tr><p> <tr> <?php if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status='1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); $random_product['products_description'] = tep_get_products_description($random_product['products_id']); } if ($random_product['specials_new_products_price']) { $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } ?> <td align="center" class="main" width="33%" valign="top"><?php echo'<a href="' .tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td> <td align="left" class="main" width="33%" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], 'NONSSL') . '"><b>' . $random_product['products_name'] . '</b></a><br><b><font color="#CC0000">' . $whats_new_price . '</font></b><br>' . osc_trunc_string(strip_tags($random_product['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '" alt="More info...">More info...</a></p>'; ?></td> </table> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table>
  5. if you need to change it just add the needed html codes on this part $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_mediumimage'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], 'NONSSL') . '">' . $random_product['products_name'] . '</a><br>' . $random_product['products_description'] . '<br>' . $rprod_price
  6. if you want the whole description use this and dont forget to add the extra code to genral.php <!-- show_random //--> <tr> <td> <?php if ($HTTP_GET_VARS['cPath']) { if ($random_product = tep_random_select("select p.products_id, p.products_mediumimage, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where products_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (c.categories_id = '" . $current_category_id . "' OR c.parent_id = '" . $current_category_id . "') order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); $random_product['products_description'] = tep_get_products_description($random_product['products_id']); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => Spotlight ); new infoBoxHeading($info_box_contents, false, false); if ($random_product['specials_new_products_price']) { $rprod_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>'; $rprod_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $rprod_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_mediumimage'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], 'NONSSL') . '">' . $random_product['products_name'] . '</a><br>' . $random_product['products_description'] . '<br>' . $rprod_price ); new infoBox($info_box_contents); } } else { if ($random_product = tep_random_select("select products_id, products_mediumimage, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status='1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); $random_product['products_description'] = tep_get_products_description($random_product['products_id']); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => Spotlight ); new infoBoxHeading($info_box_contents, false, false); if ($random_product['specials_new_products_price']) { $rprod_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>'; $rprod_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $rprod_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_mediumimage'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], 'NONSSL') . '">' . $random_product['products_name'] . '</a><br>' . $random_product['products_description'] . '<br>' . $rprod_price ); new infoBox($info_box_contents); } } ?> </td> </tr> <!-- show_random_eof //-->
  7. do you want it to show the whole description :?:
  8. This should do the trick <!-- show_random //--> <tr> <td> <?php if ($HTTP_GET_VARS['cPath']) { if ($random_product = tep_random_select("select p.products_id, p.products_mediumimage, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where products_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (c.categories_id = '" . $current_category_id . "' OR c.parent_id = '" . $current_category_id . "') order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); $random_product['products_description'] = tep_get_products_description($random_product['products_id']); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => Spotlight ); new infoBoxHeading($info_box_contents, false, false); if ($random_product['specials_new_products_price']) { $rprod_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>'; $rprod_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $rprod_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_mediumimage'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], 'NONSSL') . '">' . $random_product['products_name'] . '</a><br>' . osc_trunc_string(strip_tags($random_product['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<br>' . $rprod_price ); new infoBox($info_box_contents); } } else { if ($random_product = tep_random_select("select products_id, products_mediumimage, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status='1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); $random_product['products_description'] = tep_get_products_description($random_product['products_id']); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => Spotlight ); new infoBoxHeading($info_box_contents, false, false); if ($random_product['specials_new_products_price']) { $rprod_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>'; $rprod_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $rprod_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_mediumimage'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], 'NONSSL') . '">' . $random_product['products_name'] . '</a><br>' . osc_trunc_string(strip_tags($random_product['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<br>' . $rprod_price ); new infoBox($info_box_contents); } } ?> </td> </tr> <!-- show_random_eof //-->
  9. This is a version of featured.php from Featured Products V1.2 located in the modules file you will still need to place the code in general.php <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License Featured Products V1.1 Displays a list of featured products, selected from admin For use as an Infobox instead of the "New Products" Infobox */ ?> <!-- featured_products //--> <?php if(FEATURED_PRODUCTS_DISPLAY == true) { $featured_products_category_id = $new_products_category_id; $cat_name_query = tep_db_query("select categories_name from categories_description where categories_id = '" . $featured_products_category_id . "' limit 1"); $cat_name_fetch = tep_db_fetch_array($cat_name_query); $cat_name = $cat_name_fetch['categories_name']; $info_box_contents = array(); if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) { $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . TABLE_HEADING_FEATURED_PRODUCTS . '</a>'); $featured_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); } else { $info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY, $cat_name)); $featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); } $row = 0; $col = 0; $num = 0; while ($featured_products = tep_db_fetch_array($featured_products_query)) { $num ++; if ($num == 1) { new contentBoxHeading($info_box_contents); } $featured_products['products_name'] = tep_get_products_name($featured_products['products_id']); $featured_products['products_description'] = tep_get_products_description($featured_products['products_id']); if($featured_products['specstat']) { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br>' . osc_trunc_string(strip_tags($featured_products['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<br><s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>'); } else { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br>' . osc_trunc_string(strip_tags($featured_products['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<br>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id']))); } $col ++; if ($col > 2) { $col = 0; $row ++; } } if($num) { new contentBox($info_box_contents); } } else // If it's disabled, then include the original New Products box { include (DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); } ?> <!-- featured_products_eof //-->
  10. and if that dont work remove this aswell in line 33 , '<a><b><em><font><i><s><span><strong><sub><sup><u>'
  11. on line 33 in new products try removeing this osc_trunc_string(strip_tags(
  12. This module will allow you to display a truncated version of your product description in the new products box - The description is truncated at a predefined number of characters (defined in the Admin panel) and a trailing ellipsis (...) added. This is a addon to the Short Description in Product Listing posted by John Poynton Changes are in general.php added this code //// // Return a product's description // TABLES: products description function tep_get_products_description($product_id) { global $languages_id; $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $product_id . "' and language_id = '" . $languages_id . "'"); $product_description = tep_db_fetch_array($product_query); return $product_description['products_description']; } In new_products.php added this at line 30 $new_products['products_description'] = tep_get_products_description($new_products['products_id']); and this at line 33 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><b><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></b><br>' . osc_trunc_string(strip_tags($new_products['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . '<br><b>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']).'</b>')); It will work witout Short Description in Product Listing posted by John Poynton but you will not be able to control the lenght of the description
  13. Ime useing it at this site i chose to let it be edited by hand from the start and just upload a new version when needed http://www.100prozentbike.de/catalog/default.php
  14. Looks to me more like a custom new products box should not be hard to do.