I managed to install this contribution with no errors using Winmerge.. what a lifesaver that was as I had done some fairly heavy modifications to some of the code already.
Where it gets tricky is that I've installed the "default specials" contribution so that I have some specials displayed on the main index page. Big problem -- if I add a special under "dealer" pricing, it's coming up on my main page under the default specials for retail customers that aren't logged in even. I tried looking at the code but it's beyond the simple fixing I'm capable of doing. Can anyone help adapt the code to work with SPPC ?
The "default specials" code is in /includes/modules/default_specials.php and it's short so I've posted the whole file that's called from within index.php.
Thanks in advance for any help!
<?php
/*
$Id: default_specials.php,v 2.0 2003/06/13
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
?>
<!-- default_specials //-->
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => TABLE_HEADING_DEFAULT_SPECIALS);
/* new infoBoxHeading($info_box_contents, false, false); */
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<?php echo TABLE_HEADING_DEFAULT_SPECIALS . ' ' . '<a href="specials.php"> <b>[view all specials]</b></a>'; ?>
</td>
</tr>
<tr>
<td height="1" bgcolor="#000000"></td>
</tr>
</table>
<?php
$new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added DESC limit " . MAX_DISPLAY_SPECIAL_PRODUCTS);
$info_box_contents = array();
$row = 0;
$col = 0;
while ($default_specials = tep_db_fetch_array($new)) {
$default_specials['products_name'] = tep_get_products_name($default_specials['products_id']);
$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=' . $default_specials["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . 'small/' . $default_specials['products_image'], $default_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '">' . $default_specials['products_name'] . '</a><br><s>' . 'Reg ' . $currencies->display_price($default_specials['products_price'], tep_get_tax_rate($default_specials['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . 'Sale ' . $currency . $currencies->display_price($default_specials['specials_new_products_price'], tep_get_tax_rate($default_specials['products_tax_class_id'])) . '</span>');
$col ++;
if ($col > 2) {
$col = 0;
$row ++;
}
}
new contentBox($info_box_contents);
?>
<!-- default_specials_eof //-->