Latest News: (loading..)

sw0857

Members
  • Content count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sw0857

Profile Information

  • Real Name
    Jose
  • Gender
    Male
  1. anyone's able to modify code so it get rid of qty 1 rather than entire product within same product_id? $cart->remove($product_info['products_id']); //lets remove current product from cart
  2. I replaced STOCK_REORDER_LEVEL with DB query but can't get it working still. Query generates right number in phpmyadmin... Anyone's able to share some thought? $warning_stock = "SELECT SUM(op.products_quantity) FROM " . TABLE_ORDERS . " o INNER JOIN " . TABLE_ORDERS_PRODUCTS . " op ON o.orders_id = op.orders_id INNER JOIN " . TABLE_ORDERS_STATUS_HISTORY . " osh ON o.orders_id = osh.orders_id WHERE osh.orders_status_id = 1 AND o.date_purchased > DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)"; Another strange I found is my email notification get Resource id #65 on $warning_stock
  3. The default contribution (http://www.oscommerce.com/community/contributions,1891) is able to send out email alert whenever hit preset DB value STOCK_REORDER_LEVEL. What if I'd like to have variable quantity such as last 30 days purchase? Any help will be welcome thanks in advance! /catalog/checkout_process.php $warning_stock = STOCK_REORDER_LEVEL; $current_stock = $stock_left; $low_stock_email = '<b>Low stock warning:</b> ' . $order->products[$i]['name'] . "\n" . '<b>Model No.:</b> ' . $order->products[$i]['model'] . "\n" . '<b>Quantity:</b> ' . $stock_left . "\n" . '<b>Product URL:</b>' . HTTP_SERVER . DIR_WS_CATALOG . 'product_info.php?products_id='. $order->products[$i]['id'] . "\n\n" . '<b>Current Low order limit is ' . $warning_stock . ' units</b>'; $low_stock_subject = 'Low Stock Warning: ' . $order->products[$i]['name'] . ' ' . 'Model No :' . $order->products[$i]['model']; if ($current_stock <= $warning_stock) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $low_stock_subject, $low_stock_email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); }
  4. Got the problem fixed! I looked over the instruction on SPPC 4.22 and found new tax.php within package under new_installations/catalog/includes/classes/tax.php. Soon as updated all tax exempt functions are working correctly!
  5. Hello All, I have this SPPC 420 installed everything seems to work fine except tax exempt does not work on either "customer specific tax exempt" or "group specific tax exempt". I add <?php print_r($_SESSION); ?> to footer and I can see output results shows group tax or specific customer tax enabled no problem(i.e. [sppc_customer_group_tax_exempt] => 1 or [sppc_customer_specific_taxes_exempt] => 1 etc). Weird thing is sales tax will always added up to the cart no matter what. Hope someone from here can help solving the problem. Thanks in advance!
  6. anyone is able to integrate "most reviews" into this contribution? i.e. count (reviews.reviews_rating) thanks in advance. S.S.
  7. Hi All, I could use some help to modify Better Product Display Contribution V2.03 please. I am needing the manufacturer name swapped with manufacturer image instead. The code is listed below. Anyone who's able to help is greatly appreciated. <?php /* $Id: new_products.php,v 2.0 2006/11/13 10:42:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); // new noborderBox($info_box_contents); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $sql = "select distinct p.products_id, p.products_image, p.products_model, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price, mnf.manufacturers_name, rvw.reviews_rating from " . TABLE_PRODUCTS . " p left join ".TABLE_SPECIALS." s on p.products_id = s.products_id left join ".TABLE_MANUFACTURERS." mnf on p.manufacturers_id = mnf.manufacturers_id left join ".TABLE_REVIEWS." rvw on p.products_id = rvw.products_id where p.products_status = '1' order by rand() desc limit ".MAX_DISPLAY_NEW_PRODUCTS; $new_products_query = tep_db_query($sql); } else { $sql = "select distinct p.products_id, p.products_image, p.products_model, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price, mnf.manufacturers_name, rvw.reviews_rating from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on (p.products_id = s.products_id) left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on (p.products_id = p2c.products_id) left join " . TABLE_CATEGORIES . " c on (p2c.categories_id = c.categories_id) left join ".TABLE_MANUFACTURERS." mnf on (p.manufacturers_id = mnf.manufacturers_id) left join ".TABLE_REVIEWS." rvw on (p.products_id = rvw.products_id) where c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by rand() desc limit " . MAX_DISPLAY_NEW_PRODUCTS; $new_products_query = tep_db_query($sql); } $row = 0; $col = 0; $info_box_contents = array(); echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>'; while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); $reviews_rating = $new_products['reviews_rating']; $manufacturers_name = $new_products['manufacturers_name']; if(!$manufacturers_name==null){ $manufacturers_name = '<b>' . TABLE_HEADING_MANUFACTURER . ': </b> ' . $manufacturers_name; } else { $manufacturers_name = ''; } if(!$reviews_rating==null){ $reviews_rating = '<img src="images/stars_'. $new_products['reviews_rating'].'.gif" alt="'.$new_products['reviews_rating'] . TABLE_HEADING_TEXT_OF_5_STARS . ' ('.$new_products['products_name'].')" border="0" align="absmiddle">'; }else { $reviews_rating = '<img src="images/stars_0.gif" alt="Not Rated" border="0" align="absmiddle"><br><span class="smallText"><a href="product_reviews_write.php?products_id='.$new_products['products_id'].'">' . TABLE_HEADING_FIRST_TO_RATE . '</a></span>'; } $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="20%" valign="top"', 'text' => ' <!-- one TBL Product --> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> <tr> <td bgcolor="#FFFFFF" class="main" height="37"><img src="images/lk_blue.gif" width="15" height="15" align="absmiddle" alt="'.$new_products['products_name'] .'"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></td> </tr> <tr> <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" style="padding:3px;"><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></td> <td height="125%" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="17" class="smallText"><br>' . $manufacturers_name . '</td> </tr> <tr> <td height="17" class="smallText"><b><br>' . TABLE_HEADING_PRICE . ': <font color="#FF5C02">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])). '</font></b></td> </tr> <tr> <td height="17" class="smallText"><b><br>' . TABLE_HEADING_RATING . ': </b>'.$reviews_rating.'</td> </tr> </table> </td> </tr> <tr> <td height="30"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> </tr> </table> </td> </tr> </table> <!-- one TBL Product -->'); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); //echo $info_box_contents[0][0]['text']; ?><!-- new_products_eof //-->