Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

johnnybebad

Pioneers
  • Posts

    670
  • Joined

  • Last visited

Everything posted by johnnybebad

  1. Oh dear U am gettinmg lost again, i will check everything abnd give examples to explain what i have and what I am getting
  2. Hi Jan, thanks for the quick replay, Okay that appears to work for the spcials when I am logged in it shows the customer group price (actaully it doesnt it does show you the saving from msrp compared to sale price though. but doesnt take into account specials when I am not logged in. ie specials at retail(default) rather than the extra I am guessing I need a statement that thakes that into account to show special when customer group is 0? Also the display prices are not quite right. I am currently displaying with the mod to the file you suggsted. RRP and saving and not the usual price and or the sale/ price now. I will look at this a little more and see if I can work it out, I may be back soon though thanks again fro your help.
  3. Hi, I have just found out that my product_info file is not showing specials at all, it is showing sppc changes depending on what group one is logged in as, but not specials. I am guessing that I am currently missing some code to call(query) the specials from sppc and then to have it displayed. below is my product_info file as you can see its heavily modified, if you can help with this please let us know. I can say that my sppc prices work everywhere, and my special sppc prices work everywhere but in the product_info file as far as I can tell. I have looked and I can find the sppc code, but cant find anything on sppc specials code. Thanks <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ 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); /*** Begin Quotes ***/ $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.quotes_expire < now() and 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); $customer_query = tep_db_query("select customers_id, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer = tep_db_fetch_array($customer_query); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); $cust_id_query = tep_db_query("select quotes_email_address, products_id from " . TABLE_PRODUCTS . " where products_id = " . (int)$_GET['products_id'] ); $cust_id = tep_db_fetch_array($cust_id_query); if (empty($cust_id['quotes_email_address'])) { $invalidCust = 'false'; } else if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { if ($cust_id['quotes_email_address'] == $customer['customers_email_address'] || $customer['customers_email_address'] == STORE_OWNER_EMAIL_ADDRESS) $invalidCust = 'false'; else $invalidCust = 'true'; } else { $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 . "'"); $product_check = tep_db_fetch_array($product_check_query); // BOF Separate Pricing per Customer if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } } // EOF Separate Pricing per Customer ?> <!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 type="text/javascript" src="includes/js/prototype.js"></script> <script type="text/javascript" src="includes/js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="includes/js/lightbox.js"></script> <script type= "text/javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } // BOF Product Type Feature /* DDB - 041031 - Form Field Progress Bar */ /*********************************************** * Form Field Progress Bar- By Ron Jonk- http://www.euronet.nl/~jonkr/ * Modified by Dynamic Drive for minor changes * Script featured/ available at Dynamic Drive- http://www.dynamicdrive.com * Please keep this notice intact ***********************************************/ function textCounter(field,counter,maxlimit,linecounter) { // text width// var fieldWidth = parseInt(field.offsetWidth); var charcnt = field.value.length; // trim the extra text if (charcnt > maxlimit) { field.value = field.value.substring(0, maxlimit); } else { // progress bar percentage var percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ; document.getElementById(counter).style.width = parseInt((fieldWidth*percentage)/100)+"px"; document.getElementById(counter).innerHTML="Limit: "+percentage+"%" // color correction on style from CCFFF -> CC0000 setcolor(document.getElementById(counter),percentage,"background-color"); } } function setcolor(obj,percentage,prop){ obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)"; } // EOF Product Type Feature //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <?php /*** Begin Header Tags SEO ***/ ?> <a name="<?php echo $header_tags_array['title']; ?>"></a> <?php /*** End Header Tags SEO ***/ ?> <!-- 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"><?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 Quotes ***/ if ($invalidCust == 'true') { ?> <tr> <td><h1><?php echo HEADING_INVALID_CUSTOMER; ?></h1></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_INVALID_CUSTOMER; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><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></td> </tr> <?php } else { /*** End Quotes ***/ if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><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></td> </tr> <?php } else { // BOF: More Pics 6 Added: , p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6 $product_info_query = tep_db_query("select p.products_id, pd.products_name, p.quotes_email_address, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, pd.products_url,p.products_msrp, 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 . "'"); // EOF: More Pics 6 $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 . "'"); // see if rp product $rp_has_trial = false; if($product_info['products_type'] == 'recurring'){ // recurring product $rp_array = array(); $rp_product_query = tep_db_query('SELECT billingPeriod, billingFrequency, totalBillingCycles, trialBillingPeriod, trialBillingFrequency, trialTotalBillingCycles, trialAmt FROM ' . TABLE_RP_PAYPAL_PRODUCT_PROFILE . ' WHERE products_id=' . (int)$HTTP_GET_VARS['products_id']); if($rp_product = tep_db_fetch_array($rp_product_query)){ // recurring data $rp_array = $rp_product; if(strlen($rp_product['trialBillingPeriod'])>0){ $rp_has_trial = true; } } } /// /// if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // BOF Separate Pricing per Customer if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } } // end if ($customer_group_id > 0) // EOF Separate Pricing per Customer $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 { // BOF Separate Pricing per Customer if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } } // end if ($customer_group_id > 0) // EOF Separate Pricing per Customer $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']; } $products_price = '<table class="" align="right" border="0" width="100%" cellspacing="0" cellpadding="0">'; $new_price = tep_get_products_special_price($product_info['products_id']); if ($product_info['products_msrp'] > $product_info['products_price']) $products_price .= '<tr class="PriceListBIG"><td align="right">' . TEXT_PRODUCTS_MSRP . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; if ($new_price != '') $products_price .= '<tr class="usualpriceBIG"><td align="right">'. TEXT_PRODUCTS_USUALPRICE . ''; else $products_price .= '<tr class="pricenowBIG"><td align="right">'. TEXT_PRODUCTS_OUR_PRICE . ''; $products_price .= $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; if ($new_price != '') {$products_price .= '<tr class="pricenowBIG"><td align="right">' . TEXT_PRODUCTS_PRICENOW . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';} if ($product_info['products_msrp'] > $product_info['products_price']) {if ($new_price != '') {$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_msrp'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) .' ('. number_format(100 - (($new_price / $product_info['products_msrp']) * 100)) . '%)</td></tr>';} else {$products_price .= '<tr class="savingBIG"><td align ="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_msrp'] - $product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($product_info['products_price'] / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}} else {if ($new_price != '') {$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_price'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($new_price / $product_info['products_price']) * 100)) . '%)</td></tr>';}} $products_price .= '</table>'; } 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']; } // rp addition here if(count($rp_array)>0){ include_once(DIR_WS_CLASSES . '/paypal_rp_product_info.php'); $rpPinfo = new paypal_rp_product_info($product_info, $rp_array, $products_price); $rpPinfoHeaderArr = $rpPinfo->getProductInfoHeader(); $rpPInfoArr = $rpPinfo->getProductInfoFull(); } // BOF: More Pics 6 $mopics_image_width = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:''); $mopics_image_height = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:''); if (MOPICS_SHOW_ALL_ON_PRODUCT_INFO=='true') { $mopics_output = ''; $mo_row = 1; $mo_col = 1; $mopics_images = array(); if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'true') { $mopics_images[] = $product_info['products_image']; } for ( $mo_item=1; $mo_item<7; $mo_item++ ) { if (tep_not_null($product_info['products_subimage'.$mo_item])) { $mopics_images[] = $product_info['products_subimage'.$mo_item]; } } $mopics_count = sizeof($mopics_images); if ($mopics_count > 0) { $mopics_output .= '<table border="0" cellspacing="0" cellpadding="6" align="'.MOPICS_TABLE_ALIGNMENT.'">'; for ( $mo_item=0; $mo_item<$mopics_count; $mo_item++ ) { if ($mo_row<(MOPICS_NUMBER_OF_ROWS+1)) { if ($mo_col==1) {$mopics_output.='<tr>'."\n";} $mopics_output .= ' <td align="center" class="smallText"><script type= "text/javascript"><!-- document.write(\'<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\\\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"><\/a>\'); //--></script><noscript> <a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], $product_info['products_name'], $mopics_image_width, $mopics_image_height, 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"></a> </noscript></td>'."\n"; if ($mo_col==MOPICS_NUMBER_OF_COLS) { $mo_col=1; $mo_row++; $mopics_output.='</tr>'."\n"; } else { $mo_col++; } } } if ($mo_col!=1){ while (($mo_col++)<(MOPICS_NUMBER_OF_COLS+1)) { $mopics_output.='<td> </td>'; } $mopics_output.='</tr>'."\n"; } $mopics_output .= '</table>'."\n"; } } // EOF: More Pics 6 //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED if(tep_session_is_registered('wishlist_id')) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <?php if(count($rp_array)>0 and $rp_has_trial){ // rp with trial ?> <td class="pageHeading" align="right" valign="top"><?php echo $rpPinfoHeaderArr['trial']; ?><br><?php print $rpPinfoHeaderArr['normal'];?></td> <?php // rp no trial }elseif (count($rp_array)>0){ ?> <td class="pageHeading" align="right" valign="top"><?php print $rpPinfoHeaderArr['normal']; ?></td> <?php }else{ // standard product ?> <td align="right" valign="top" width="10%"><?php echo $products_price; ?></td> <?php } ?> </tr> <tr> <td class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td> </tr> ?> <?php tep_session_unregister('wishlist_id'); } //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <?php /*** Begin Header Tags SEO ***/ ?> <td valign="top"><h1><?php echo $products_name; ?></h1></td> <td align="right" valign="top"><?php echo $products_price; ?></td> <?php /*** End Header Tags SEO ***/ ?></tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php // BOF: More Pics 6 if (MOPICS_TABLE_LOCATION=='above' && !empty($mopics_output)) { echo ' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText">'.$mopics_output.'</td> </tr> </table> <br>'."\n"; } else if (MOPICS_TABLE_LOCATION=='sides' && !empty($mopics_output)) { echo $mopics_output; } // EOF: More Pics 6 // BOF: More Pics 6 ADDED to if statement: && MOPICS_GROUP_WITH_PARENT == 'false' if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'false') { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <script type= "text/javascript"><!-- document.write('<?php echo '<a href="javascript: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']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"><\/a>'; ?>'); //--></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'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"></a>'; ?> <?php // EOF: More Pics 6 ?> </noscript> <br><br> <?php //affiliate build a link begin if (tep_session_is_registered('affiliate_id')) { ?> <?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, 'individual_banner_id=' . $product_info['products_id']) .'" target="_self">' . tep_image('includes/languages/english/images/buttons/button_affiliate_build_a_link.gif', 'Make a link') . ' </a>'; ?><?php } //affiliate build a link begin ?> </td> </tr> </table> <?php } ?> <p><?php echo stripslashes($product_info['products_description']); ?> <?php // rp check for rp data if(count($rp_array)>0){ print '<p>'; if(array_key_exists('trial', $rpPInfoArr)){ print $rpPInfoArr['trial'] . "<br>\n"; } print $rpPInfoArr['normal']; } // BOF SPPC Hide attributes from customer groups $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 . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 "); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php // BOF Option Type Feature //$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_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_type, popt.products_options_length, popt.products_options_comment 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)) { //clr 030714 add case statement to check option type switch ($products_options_name['products_options_type']) { case PRODUCTS_OPTIONS_TYPE_TEXT: //CLR 030714 Add logic for text option $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'"); $products_attribs_array = tep_db_fetch_array($products_attribs_query); if($customer_group_id > 0 ) { $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups` WHERE products_attributes_id='".$products_attribs_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'"; $tmp_res = tep_db_query($query); if(tep_db_num_rows($tmp_res )) { $products_attribs_array = tep_db_fetch_array($tmp_res); } } // $products_attribs_array = tep_db_fetch_array($products_attribs_query); $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'"> ' . $products_options_name['products_options_comment'] ; if ($products_attribs_array['options_values_price'] != '0') { $tmp_html .= '(' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .')'; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case PRODUCTS_OPTIONS_TYPE_TEXTAREA: //CLR 030714 Add% } // END vEDIT while ($products_options_array = tep_db_fetch_array($products_options_query)) { // START vEDIT if($customer_group_id > 0 ) { $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups` WHERE products_attributes_id='".$products_options_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'"; $tmp_res = tep_db_query($query); if(tep_db_num_rows($tmp_res )) { $tmp_row = tep_db_fetch_array($tmp_res); if($tmp_row['options_values_price']) { $products_options_array['options_values_price'] = $tmp_row['options_values_price']; $products_options_array['price_prefix'] = $tmp_row['price_prefix']; } } } if ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']] || $no_value) { $checked = true; $no_value = false; } else { $checked = false; } // END vEDIT $tmp_html .= '<tr><td class="main">'; $tmp_html .= tep_draw_radio_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked); //$checked = false; $tmp_html .= $products_options_array['products_options_values_name'] ; $tmp_html .=$products_options_name['products_options_comment'] ; if ($products_options_array['options_values_price'] != '0') { $tmp_html .= '(' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } $tmp_html .= '</tr></td>'; } $tmp_html .= '</table>'; ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case PRODUCTS_OPTIONS_TYPE_CHECKBOX: //CLR 030714 Add logic for checkboxes $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix, patrib.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'"); $products_attribs_array = tep_db_fetch_array($products_attribs_query); if($customer_group_id > 0 ) { $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups` WHERE products_attributes_id='".$products_attributes_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'"; $tmp_res = tep_db_query($query); if(tep_db_num_rows($tmp_res )) { $tmp_row = tep_db_fetch_array($tmp_res); if($tmp_row['options_values_price']) { $products_attributes_array['options_values_price'] = $tmp_row['options_values_price']; $attributes_array['price_prefix'] = $tmp_row['price_prefix']; } } } // START vFIX $boxchecked = false; if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $boxchecked = true; % } // END vEDIT while ($products_options_array = tep_db_fetch_array($products_options_query)) { // START vEDIT if($customer_group_id > 0 ) { $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups` WHERE products_attributes_id='".$products_options_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'"; $tmp_res = tep_db_query($query); if(tep_db_num_rows($tmp_res )) { $tmp_row = tep_db_fetch_array($tmp_res); if($tmp_row['options_values_price']) { $products_options_array['options_values_price'] = $tmp_row['options_values_price']; $products_options_array['price_prefix'] = $tmp_row['price_prefix']; } } } if ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']] || $no_value) { $checked = true; $no_value = false; } else { $checked = false; } // END vEDIT $tmp_html .= '<tr><td class="main">'; $tmp_html .= tep_draw_radio_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked); //$checked = false; $tmp_html .= $products_options_array['products_options_values_name'] ; $tmp_html .=$products_options_name['products_options_comment'] ; if ($products_options_array['options_values_price'] != '0') { $tmp_html .= '(' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } $tmp_html .= '</tr></td>'; } $tmp_html .= '</table>'; ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case PRODUCTS_OPTIONS_TYPE_CHECKBOX: //CLR 030714 Add logic for checkboxes $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix, patrib.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'"); $products_attribs_array = tep_db_fetch_array($products_attribs_query); if($customer_group_id > 0 ) { $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups` WHERE products_attributes_id='".$products_attributes_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'"; $tmp_res = tep_db_query($query); if(tep_db_num_rows($tmp_res )) { $tmp_row = tep_db_fetch_array($tmp_res); if($tmp_row['options_values_price']) { $products_attributes_array['options_values_price'] = $tmp_row['options_values_price']; $attributes_array['price_prefix'] = $tmp_row['price_prefix']; } } } // START vFIX $boxchecked = false; if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $boxchecked = true; }else { $boxchecked = false; } // END vFIX echo '<tr><td class="main">' . $products_options_name['products_options_name'] . ': </td><td class="main">'; // START vFIX //echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id']); echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id'], $boxchecked); // END vFIX echo $products_options_name['products_options_comment'] ; if ($products_attribs_array['options_values_price'] != '0') { echo '(' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } echo '</td></tr>'; break; default: //clr 030714 default is select list //clr 030714 reset selected_attribute variable $selected_attribute = false; // EOF Option Type Feature $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, pa.products_attributes_id 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)) { if($customer_group_id > 0 ) { $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups` WHERE products_attributes_id='".$products_options['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'"; $tmp_res = tep_db_query($query); if(tep_db_num_rows($tmp_res )) { $tmp_row = tep_db_fetch_array($tmp_res); if($tmp_row['options_values_price']) { $products_options['options_values_price'] = $tmp_row['options_values_price']; $products_options['price_prefix'] = $tmp_row['price_prefix']; } } } $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 // BOF Option Type Feature //echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . $products_options_name['products_options_comment']; // EOF Option Type Feature ?></td> </tr> <?php // BOF Option Type Feature } // ends the switch clause // EOF Option Type Feature } ?> </table> <?php } // BOF: More Pics 6 if (MOPICS_TABLE_LOCATION=='below' && !empty($mopics_output)) { echo ' <br> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText">'.$mopics_output.'</td> </tr> </table>'."\n"; } // EOF: More Pics 6 ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php /*** Begin Quotes ***/ if (! tep_not_null($customers['customers_email_address'])) { /*** Begin Quotes ***/ $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) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } /*** Begin Quotes ***/ } /*** End Quotes ***/ if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?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><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } /*** Begin Quotes ***/ if (! tep_not_null($customers['customers_email_address'])) { /*** End Quotes ***/ if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } /*** Begin Quotes ***/ } /*** End Quotes ***/ ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <?php /*** Begin Quotes ***/ if (! tep_not_null($customers['customers_email_address'])) { ?> <td class="main"><?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>'; ?></td> <?php } /*** End Quotes ***/ ?><td align="center"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <!--- BEGIN Header Tags SEO Social Bookmarks --> <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); ?> <!--- END Header Tags SEO Social Bookmarks --> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php //added for cross -sell if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_xsell_products(3600); //added for Xsell echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); //added for Xsell include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table></form></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'); ?>
  4. I have instlled this and had no problems.how did you enter the data into mysql?
  5. I definetly have all the edits, the also purchased products I had to use $quotes = (defined('QUOTES_CATEGORY_NAME')) ? " and p.quotes_email_address = '' " : ''; eliminating and p.customers_email_address = '' as this is not in my database appears to work fine in that any products purchased by a person show up as products also purchased but excludes the quote. The issue is probably with the products listing module or something as mentioned above as when i changed the listing type bith displayed the product but the format in which they were listed changed, I am not sure where to edit it to get it to work but at least I know where the problem is now. I only get this issue when i type in yourdomain.com/quotes-c-1.html gpoing back to look at my categories box to see if I have an issue there. as I would like the quotes category to show if the customer has an active quote. Thanks again for another great mod. Thanks
  6. Okay i have found the problem its the product listing mod I think, as this list the products in the given categories in one of two ways but I think the queries that need changing are in the one file:- modules/product_listing.php I am looking through this but its not jumping out at me so feel free to jump in. Hers the code:- <?php /* original: $Id: product_listing.php,v 1.44 2003/06/09 22:49:43 hpdl Exp $ corrected for proper HTML 2005/07/10 JanZ merged and updated by djmonkey1 with indispensable assistance by JanZ 2005/10/05 v2.1 developed by djmonkey1 with indispensable assistance by the Mighty JanZ 2005/10/09 reverted to a non-SPPC state by djmonkey1 v 2.2 modified by adilovetini with small feature 2006/04/18 v 2.2.5 bugfix for "Continue shopping" button bug 2008/02/17 JanZ adapted for Separate Pricing Per Customer v4.2.1 2008/03/16 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ //version 2.2 modification //if number of column per row is 1, include the original product_listing.php if (PRODUCT_LIST_NUMCOL == 1) { include(dirname(__FILE__).'/product_listing.php'); } else { //display the version 2.2 product_listing_col.php code //bof product listing with attributes $list_box_contents = array(); $list_box_contents[] = array('params' => 'class="productListing-heading"'); $cur_row = sizeof($list_box_contents) - 1; // three variables that determine a certain output $use_tr_for_buy_now_button = false; $add_multiple = false; $use_of_attributes = false; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MULTIPLE': $add_multiple = true; $use_of_attributes = true; echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'sort', 'products_id')) . 'action=add_multiple', 'NONSSL') . '">'; break; case 'PRODUCT_LIST_BUY_NOW_MULTIPLE': $use_of_attributes = true; break; case 'PRODUCT_LIST_BUY_NOW': $use_tr_for_buy_now_button = true; break; } } //eof product listing with attributes ?> <?php $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y', 'products_id'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); global $cart; if ($listing_split->number_of_rows > 0) { //BOF version 2.2 modification if (PRODUCT_LIST_NUMCOL <= 0) { $colnum = 3; $tdsize = floor(100/3); } else { $colnum = PRODUCT_LIST_NUMCOL; $tdsize = floor(100/PRODUCT_LIST_NUMCOL); } //EOF version 2.2 modification $row = 0; $column = 0; $listing_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($listing_query); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } while ($_listing = tep_db_fetch_array($listing_query)) { $_listing['total'] = ''; // for number of attributes $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // lets save all the separate count queries that check if a product has attributes // and do it in one (if needed) if ($use_of_attributes == true) { $products_attributes_count_query = tep_db_query("select count(*) as total, patrib.products_id from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id in (" . implode(',', $list_of_prdct_ids) . ") and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' and find_in_set('" . $customer_group_id . "', attributes_hide_from_groups) = 0 group by products_id"); while ($_products_attributes_count = tep_db_fetch_array($products_attributes_count_query)) { $products_attributes_count[] = array('products_id' => $_products_attributes_count['products_id'], 'total' => $_products_attributes_count['total']); } $no_of_products_with_attributes = count($products_attributes_count); for ($x = 0; $x < $no_of_listings; $x++) { if (!empty($products_attributes_count)) { for ($i = 0; $i < $no_of_products_with_attributes; $i++) { if ($listing[$x]['products_id'] == $products_attributes_count[$i]['products_id'] ) { $listing[$x]['total'] = $products_attributes_count[$i]['total']; } } } } // end for ($x = 0; $x < $no_of_listings; $x++) } // end ($use_of_attributes == true) // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where products_id in (" . implode(',', $list_of_prdct_ids) . ") and pg.customers_group_id = '".$customer_group_id."' "); while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if (!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if ($listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['specials_new_products_price'] = $new_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where products_id in (" . implode(',', $list_of_prdct_ids) . ") and status = '1' and customers_group_id = '" . $customer_group_id . "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if (!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if ($listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if (!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) $counter = 0; $class_for_buy_now = 'class="productListing-data" width="' . $tdsize . '%"'; for ($x = 0; $x < $no_of_listings; $x++) { if ($x % PRODUCT_LIST_NUMCOL == 0) { // start of new row if (($counter+1)/2 == floor(($counter+1)/2)) { // start with the background color productListing-odd // if ($counter/2 == floor($counter/2)) { // if you want to start with the background color productListing-even use this $list_box_contents[$row] = array('params' => 'class="productListing-even"'); $class_for_buy_now_row = 'class="productListing-even"'; } else { $list_box_contents[$row] = array('params' => 'class="productListing-odd"'); $class_for_buy_now_row = 'class="productListing-odd"'; } } // end if ($x % PRODUCT_LIST_NUMCOL == 0) $product_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing[$x]['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($_GET['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . (int)$_GET['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing[$x]['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($_GET['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . (int)$_GET['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; //bof product listing with attributes case 'PRODUCT_LIST_BUY_NOW': // this button will be in a separate table row for better aligning $buy_now_button_array[] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','sort', 'products_id')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW, 'style="padding-top: 5px;"') . '</a> '; $lc_text = ''; // otherwise the previous $lc_text will be outputted again break; // Begin Buy Now button with attributes and quantity mod // Begin Add Multiple with attributes Contrib case 'PRODUCT_LIST_MULTIPLE': $lc_align = 'right'; $lc_valign = 'top'; $lc_text = (TABLE_HEADING_MULTIPLE . tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '0', 'size="4"')); if ((int)$listing[$x]['total'] > 0) { $lc_text .= '<table border="0" cellpadding="0" cellspacing"0">'; $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='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected_attribute = false; $products_options_array = array(); $lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing[$x]['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($z = 0 ; $z < count($products_options); $z++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$z]['products_attributes_id']) { $products_options[$z]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$z]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($v = 0 ; $v < count($products_options); $v++) { $options_text = ''; // make it empty again $options_text = $products_options[$v]['products_options_values_name']; if (defined('PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN') && PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN == 'Yes') { // if ((int) $products_options[$v]['options_values_price'] != '0') { if (tep_not_null($listing[$x]['specials_new_products_price'])) { $original_price = $listing[$x]['specials_new_products_price']; } else { $original_price = $listing[$x]['products_price']; } if ($products_options[$v]['price_prefix'] == "-") // in case price lowers, don't add values, subtract { $show_price = 0.0 + $original_price - $products_options[$v]['options_values_price']; // force float (in case) using the 0.0; } else { $show_price = 0.0 + $original_price + $products_options[$v]['options_values_price']; // force float (in case) using the 0.0; } $options_text .= ' (' . $currencies->display_price($show_price, tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; // } } else { if ($products_options[$v]['options_values_price'] != '0') { $options_text .= ' (' . $products_options[$v]['price_prefix'] . $currencies->display_price($products_options[$v]['options_values_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; } } $products_options_array[] = array('id' => $products_options[$v]['products_options_values_id'], 'text' => $options_text); } // end for ($v = 0 ; $v < count($products_options); $v++) // EOF SPPC attributes mod $lc_text .= tep_draw_pull_down_menu('id_'.$listing[$x]['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); $lc_text .= '</td></tr>'; } $lc_text .= '</table>'; } break; case 'PRODUCT_LIST_BUY_NOW_MULTIPLE': $lc_align = 'right'; $lc_valign = 'top'; $lc_text = '<form name="buy_now_' . $listing[$x]['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','sort', 'products_id')) . 'action=buy_now_form', 'NONSSL') . '">'; $lc_text .= (TABLE_HEADING_MULTIPLE) . '<input type="text" name="cart_quantity" value="1" maxlength="6" size="4">'; if ((int)$listing[$x]['total'] > 0) { $lc_text .= '<table border="0" cellpadding="0" cellspacing"0">'; $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='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected_attribute = false; $products_options_array = array(); $lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing[$x]['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($z = 0 ; $z < count($products_options); $z++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$z]['products_attributes_id']) { $products_options[$z]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$z]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($v = 0 ; $v < count($products_options); $v++) { $options_text = ''; // make it empty again $options_text = $products_options[$v]['products_options_values_name']; if (defined('PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN') && PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN == 'Yes') { // if ((int) $products_options[$v]['options_values_price'] != '0') { if (tep_not_null($listing[$x]['specials_new_products_price'])) { $original_price = $listing[$x]['specials_new_products_price']; } else { $original_price = $listing[$x]['products_price']; } if ($products_options[$v]['price_prefix'] == "-") // in case price lowers, don't add values, subtract { $show_price = 0.0 + $original_price - $products_options[$v]['options_values_price']; // force float (in case) using the 0.0; } else { $show_price = 0.0 + $original_price + $products_options[$v]['options_values_price']; // force float (in case) using the 0.0; } $options_text .= ' (' . $currencies->display_price($show_price, tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; // } } else { if ($products_options[$v]['options_values_price'] != '0') { $options_text .= ' (' . $products_options[$v]['price_prefix'] . $currencies->display_price($products_options[$v]['options_values_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) .') '; } } $products_options_array[] = array('id' => $products_options[$v]['products_options_values_id'], 'text' => $options_text); } // end for ($v = 0 ; $v < count($products_options); $v++) // EOF SPPC attributes mod $lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); $lc_text .= '</td></tr>'; } $lc_text .= '</table>'; $lc_text .= tep_draw_hidden_field('products_id', $listing[$x]['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing[$x]['products_name'] . TEXT_NOW); } // end if ((int)$listing[$x]['total'] > 0) if ((int)$listing[$x]['total'] == 0) { $lc_text .= '<br> '; $lc_text .= tep_draw_hidden_field('products_id', $listing[$x]['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing[$x]['products_name'] . TEXT_NOW); $lc_text .= '<br> '; $lc_text .= '<table border="0" cellpadding="0" cellspacing"0"><tr><td class="main"></td><td></td></tr></table>'; } $lc_text .= '</form>'; break; // End Add Multiple mod } $product_contents[] = $lc_text; } $lc_text = implode('<br>', $product_contents); $list_box_contents[$row][$column] = array('align' => 'center', //bof product listing with attributes 'valign' => $lc_valign, //eof product listing with attributes //2.2 modification ,add width in td 'params' => 'class="productListing-data" width="'.$tdsize.'%"', 'text' => $lc_text); $column ++; if ($x == ($no_of_listings -1)) { $last_column = ($x % PRODUCT_LIST_NUMCOL); // x modulus number of columns //BOF version 2.2 modification // fill up the remainder of the table row with empty cells for ($column = ($last_column + 1) ; $column < $colnum; $column++) { $list_box_contents[$row][$column] = array('align' => 'center', //bof product listing with attributes 'valign' => $lc_valign, //eof product listing with attributes //2.2 modification ,add width in td 'params' => 'class="productListing-data" width="'.$tdsize.'%"', 'text' => " "); } } if ($column >= $colnum && $x < ($no_of_listings -1)) { $row ++; // we start a new tr here with $list_box_contents unless we already listed all products // $list_box_contents[$row] = array('params' => $class_for_buy_now); $column = 0; $counter++; // counter only goes up after the buy now buttons have been outputted, counts the real rows if ($use_tr_for_buy_now_button == true) { // make sure all data cells per row are filled $last_column = sizeof($buy_now_button_array); for ($zz = $last_column ; $zz < PRODUCT_LIST_NUMCOL; $zz++) { $buy_now_button_array[] = " "; } $list_box_contents[$row] = array('params' => $class_for_buy_now_row); foreach ($buy_now_button_array as $column1 => $lc_text1) { $list_box_contents[$row][$column1] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => $lc_text1); } unset($buy_now_button_array); $row ++; } // end if ($use_tr_for_buy_now_button == true) // output the last row with buy now buttons if needed } elseif ($x == ($no_of_listings -1) && $use_tr_for_buy_now_button == true) { $row ++; // we start a new tr here with $list_box_contents for the last row with buy now buttons // make sure all data cells per row are filled $last_column = sizeof($buy_now_button_array); for ($zz = $last_column ; $zz < PRODUCT_LIST_NUMCOL; $zz++) { $buy_now_button_array[] = " "; } $list_box_contents[$row] = array('params' => $class_for_buy_now_row); foreach ($buy_now_button_array as $column1 => $lc_text1) { $list_box_contents[$row][$column1] = array('align' => 'center', 'params' => 'class="' . $class_for_buy_now . '"', %20 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_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="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'R0 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_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="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y', 'products_id'))); ?></td> </tr> <?php if ($add_multiple == true){ ?> <tr> <td align="left" class="main"> </td> <td align="right" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); // added end of form here ?></form></td> </tr> <?php } ?> </table> <?php } } ?>
  7. I am regoing through all this again to make sure, but as it stands i can see the quotes category and the quotes in it, when I visit the page directly
  8. Hi Jack I went through them all yesterday/ this morning, and I could still get to the quotes-c-1.html (quotes category is category 1) , the other mods dont display the category, but the index.php has some code in it regardinf categories and this appears untouched, as far as I can tell the its the header tags mod that has the code that needs changing, I had ago my self but when I selected a category the site went to a blank page so I obviously didnt code it correctly. Thanks Wayne
  9. As far as i can see I have category/ies queries in index.php and that maybe why I can still access the quotes page directly with the products showing in the category. I have gone through the thread and corrected my seo, best sellers etc but couldnt find anything on this. Thanks
  10. Hi Jack, hows things? This quotes module, requires a few changes, basically anywhere that reproduces the category list? So, that would include site maps both google and sitemap seo also if i am not logged in but type in the quotes url i can retrive the quote data, have I missed something in the installation? Thanks
  11. I have been thinking about this daily and may even give something like that a go when i have the time. I would guess you would need another field/ table that links in wishlist_id. mayeb another table wislist description, similar to categories and categories description. then on the wish list files where you add or view a wish list, you need that function adding again it be similar to ading a new category I guess. The problem is making it smart so theres little code/ database resources required to run it.
  12. I am using the latest version of the official module by anthony, to be honest it was hell getting it installed as my sites are so heavily modifed there code didnt represent what i had at all. the other dymanic effects or something one I think it is is supposed to work well and modifying is supposed to be easier but i didnt try it, i would try that one first as its probably easier to uninstall, depends how you run your back ups I guess. the problem with the official module was it stored the card data in admin the credit card data is entered on our site?, I know that cardinal verifcation by the bank is entered on the banks site although it appears to be on your own site. The test environment was a joke, I had to do it all live.
  13. I use that code on all my sites with sts over severaldomains and it appaesr to work on them all. example code for complete file <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html $htmlparams> <head> <!--$headcontent--> <link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css"> <link rel="alternate" type="application/rss+xml" title="<?php echo STORE_NAME . ' - ' . BOX_INFORMATION_RSS; ?>" href="<?php echo FILENAME_RSS, '?language=' . $key; ?>"> <link rel="stylesheet" type="text/css" href="ext/jQuery/themes/smoothness/ui.all.css"> </head> <body> <?php include("header.php.html"); ?> <table width="800px" align="center"><tr><td> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td class="headerNavigation"> $breadcrumbs </td> <td align="right" class="headerNavigation"> $myaccountlogoff | $cartcontents | $checkout </td> </tr> </table> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td valign="top" align="left"> <table border="0" width="125" cellspacing="0" cellpadding="2"> <tr><td>$rapidsslbox</td></tr> <tr><td>$categorybox</td></tr> <tr><td>$manufacturerbox</td></tr> <tr><td>$whatsnewbox</td></tr> <tr><td>$specialbox</td></tr> <tr><td>$searchbox</td></tr> <tr><td>$featuredbox</td></tr> <tr><td>$informationbox</td></tr> <tr><td>$paypallogobox</td></tr> <tr><td>$affiliatebox</td></tr> </table> </td> <td valign="top" align="center"> <p>$content </td> <td valign="top" align="right"> <table border="0" width="125" cellspacing="0" cellpadding="2"> <tr><td>$safebuybox</td></tr> <tr><td>$cartbox</td></tr> <tr><td>$competitionbox</td></tr> <tr><td>$orderhistorybox</td></tr> <tr><td>$bestsellersbox</td></tr> <tr><td>$reviewsbox</td></tr> <tr><td>$tellafriendbox</td></tr> <tr><td>$faqdeskbox</td></tr> <tr><td>$newsdeskbox</td></tr> </table> </td> </tr> </table> </td> </tr> </table> <?php include("footer.php.html"); ?> </body> </html> <!-- dialogs_bof //--> <div id="loginBox" title="Log Into My Account" style="display:none;"><table cellpadding="2" cellspacing="0" border="0"> <tr> <td class="main">E-Mail Address:</td> <td><input type="text" name="email_address" id="email_address"></td> </tr> <tr> <td class="main">Password:</td> <td><input type="password" name="login_password" maxlength="40" id="login_password"></td> </tr> <tr> <td colspan="2" align="right"><img src="includes/languages/english/images/buttons/button_login.gif" border="0" alt="IMAGE_LOGIN" title=" IMAGE_LOGIN " width="100" height="22" id="loginWindowSubmit"></td> </tr> </table></div> <div id="addressBook" title="Address Book" style="display:none"></div> <div id="newAddress" title="New Address" style="display:none"></div> <!-- dialogs_eof//--> as you can see the site is heavily modified, if that doesn't work I dont know I could look at the site I guess, and it depends on what version of OPC you are using I guess (i am using a modified version 1.3 I belive)
  14. for thos having trouble getting the address page and log page working in sts, place this code in your checkout.php.html file:- <!-- dialogs_bof //--> <div id="loginBox" title="Log Into My Account" style="display:none;"><table cellpadding="2" cellspacing="0" border="0"> <tr> <td class="main">E-Mail Address:</td> <td><input type="text" name="email_address" id="email_address"></td> </tr> <tr> <td class="main">Password:</td> <td><input type="password" name="login_password" maxlength="40" id="login_password"></td> </tr> <tr> <td colspan="2" align="right"><img src="includes/languages/english/images/buttons/button_login.gif" border="0" alt="IMAGE_LOGIN" title=" IMAGE_LOGIN " width="100" height="22" id="loginWindowSubmit"></td> </tr> </table></div> <div id="addressBook" title="Address Book" style="display:none"></div> <div id="newAddress" title="New Address" style="display:none"></div> <!-- dialogs_eof//--> please note do not pm me for solutions unless I have asked you to do so first, otherwise I will deemed a request for my services and I may ask for a fee first. I give to this community willing and FOC, I do not have time to deal with pms from everyone requesting help, and I AINT THAT GOOD EITHER!
  15. Installed now Like many modules I had to switch off STS first run the file and switch sts back on. that appears to be normal for me i dont know about anyone else, i had forgotten about having to switch sts off first. getting late and I am tired, but with all the attempts latley I need to make sure I get everything I can done to protect. Thanks
  16. Just tried installing this module, Upload SecurityPro_installer.php to your catalog folder. Browse to it and the installation will auto insert your admin settings. its not even seeing this file I get a 500 server error???? I have now removed it until i am able to confirm what I need to do to get past part 1.
  17. Hi, well this module works in that the news article is displayed, but it is always displayed even if its switched off in admin. Any ideas which patch I should use or how to fix this issue, whilst its not a major problem and I can delete old news, it would be nice if I can get it functioning properly. Thanks
  18. just sent you the file, if you want to check it may need tweaking but should be relatively ok as is.
  19. Hi, I am strying to combine sppc for attributes with option_type_feature, whilst i can get them both working seperatly I cant for the hell of me get it to work for both. at the moment i am trying just to get the product_info.php file correct. This the code of my current product_info file which lets the product_type_feature work, the sppc for the product price but not the attribute price. If anyone can help I would be grateful. <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ 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); /*** Begin Quotes ***/ $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.quotes_expire < now() and 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); $customer_query = tep_db_query("select customers_id, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer = tep_db_fetch_array($customer_query); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); $cust_id_query = tep_db_query("select quotes_email_address, products_id from " . TABLE_PRODUCTS . " where products_id = " . (int)$_GET['products_id'] ); $cust_id = tep_db_fetch_array($cust_id_query); if (empty($cust_id['quotes_email_address'])) { $invalidCust = 'false'; } else if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) { if ($cust_id['quotes_email_address'] == $customer['customers_email_address'] || $customer['customers_email_address'] == STORE_OWNER_EMAIL_ADDRESS) $invalidCust = 'false'; else $invalidCust = 'true'; } else { $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 . "'"); $product_check = tep_db_fetch_array($product_check_query); // BOF Separate Pricing per Customer if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } } // EOF Separate Pricing per Customer ?> <!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 type="text/javascript" src="includes/js/prototype.js"></script> <script type="text/javascript" src="includes/js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="includes/js/lightbox.js"></script> <script type= "text/javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } // BOF Product Type Feature /* DDB - 041031 - Form Field Progress Bar */ /*********************************************** * Form Field Progress Bar- By Ron Jonk- http://www.euronet.nl/~jonkr/ * Modified by Dynamic Drive for minor changes * Script featured/ available at Dynamic Drive- http://www.dynamicdrive.com * Please keep this notice intact ***********************************************/ function textCounter(field,counter,maxlimit,linecounter) { // text width// var fieldWidth = parseInt(field.offsetWidth); var charcnt = field.value.length; // trim the extra text if (charcnt > maxlimit) { field.value = field.value.substring(0, maxlimit); } else { // progress bar percentage var percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ; document.getElementById(counter).style.width = parseInt((fieldWidth*percentage)/100)+"px"; document.getElementById(counter).innerHTML="Limit: "+percentage+"%" // color correction on style from CCFFF -> CC0000 setcolor(document.getElementById(counter),percentage,"background-color"); } } function setcolor(obj,percentage,prop){ obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)"; } // EOF Product Type Feature //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <?php /*** Begin Header Tags SEO ***/ ?> <a name="<?php echo $header_tags_array['title']; ?>"></a> <?php /*** End Header Tags SEO ***/ ?> <!-- 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"><?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 Quotes ***/ if ($invalidCust == 'true') { ?> <tr> <td><h1><?php echo HEADING_INVALID_CUSTOMER; ?></h1></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_INVALID_CUSTOMER; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><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></td> </tr> <?php } else { /*** End Quotes ***/ if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><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></td> </tr> <?php } else { // BOF: More Pics 6 Added: , p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6 $product_info_query = tep_db_query("select p.products_id, pd.products_name, p.quotes_email_address, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, pd.products_url,p.products_msrp, 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 . "'"); // EOF: More Pics 6 $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 . "'"); // see if rp product $rp_has_trial = false; if($product_info['products_type'] == 'recurring'){ // recurring product $rp_array = array(); $rp_product_query = tep_db_query('SELECT billingPeriod, billingFrequency, totalBillingCycles, trialBillingPeriod, trialBillingFrequency, trialTotalBillingCycles, trialAmt FROM ' . TABLE_RP_PAYPAL_PRODUCT_PROFILE . ' WHERE products_id=' . (int)$HTTP_GET_VARS['products_id']); if($rp_product = tep_db_fetch_array($rp_product_query)){ // recurring data $rp_array = $rp_product; if(strlen($rp_product['trialBillingPeriod'])>0){ $rp_has_trial = true; } } } /// /// if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // BOF Separate Pricing per Customer if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } } // end if ($customer_group_id > 0) // EOF Separate Pricing per Customer $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 { // BOF Separate Pricing per Customer if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } } // end if ($customer_group_id > 0) // EOF Separate Pricing per Customer $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']; } $products_price = '<table class="" align="right" border="0" width="100%" cellspacing="0" cellpadding="0">'; $new_price = tep_get_products_special_price($product_info['products_id']); if ($product_info['products_msrp'] > $product_info['products_price']) $products_price .= '<tr class="PriceListBIG"><td align="right">' . TEXT_PRODUCTS_MSRP . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; if ($new_price != '') $products_price .= '<tr class="usualpriceBIG"><td align="right">'. TEXT_PRODUCTS_USUALPRICE . ''; else $products_price .= '<tr class="pricenowBIG"><td align="right">'. TEXT_PRODUCTS_OUR_PRICE . ''; $products_price .= $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>'; if ($new_price != '') {$products_price .= '<tr class="pricenowBIG"><td align="right">' . TEXT_PRODUCTS_PRICENOW . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';} if ($product_info['products_msrp'] > $product_info['products_price']) {if ($new_price != '') {$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_msrp'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) .' ('. number_format(100 - (($new_price / $product_info['products_msrp']) * 100)) . '%)</td></tr>';} else {$products_price .= '<tr class="savingBIG"><td align ="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_msrp'] - $product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($product_info['products_price'] / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}} else {if ($new_price != '') {$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_price'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($new_price / $product_info['products_price']) * 100)) . '%)</td></tr>';}} $products_price .= '</table>'; } 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']; } // rp addition here if(count($rp_array)>0){ include_once(DIR_WS_CLASSES . '/paypal_rp_product_info.php'); $rpPinfo = new paypal_rp_product_info($product_info, $rp_array, $products_price); $rpPinfoHeaderArr = $rpPinfo->getProductInfoHeader(); $rpPInfoArr = $rpPinfo->getProductInfoFull(); } // BOF: More Pics 6 $mopics_image_width = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:''); $mopics_image_height = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:''); if (MOPICS_SHOW_ALL_ON_PRODUCT_INFO=='true') { $mopics_output = ''; $mo_row = 1; $mo_col = 1; $mopics_images = array(); if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'true') { $mopics_images[] = $product_info['products_image']; } for ( $mo_item=1; $mo_item<7; $mo_item++ ) { if (tep_not_null($product_info['products_subimage'.$mo_item])) { $mopics_images[] = $product_info['products_subimage'.$mo_item]; } } $mopics_count = sizeof($mopics_images); if ($mopics_count > 0) { $mopics_output .= '<table border="0" cellspacing="0" cellpadding="6" align="'.MOPICS_TABLE_ALIGNMENT.'">'; for ( $mo_item=0; $mo_item<$mopics_count; $mo_item++ ) { if ($mo_row<(MOPICS_NUMBER_OF_ROWS+1)) { if ($mo_col==1) {$mopics_output.='<tr>'."\n";} $mopics_output .= ' <td align="center" class="smallText"><script type= "text/javascript"><!-- document.write(\'<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\\\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"><\/a>\'); //--></script><noscript> <a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], $product_info['products_name'], $mopics_image_width, $mopics_image_height, 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"></a> </noscript></td>'."\n"; if ($mo_col==MOPICS_NUMBER_OF_COLS) { $mo_col=1; $mo_row++; $mopics_output.='</tr>'."\n"; } else { $mo_col++; } } } if ($mo_col!=1){ while (($mo_col++)<(MOPICS_NUMBER_OF_COLS+1)) { $mopics_output.='<td> </td>'; } $mopics_output.='</tr>'."\n"; } $mopics_output .= '</table>'."\n"; } } // EOF: More Pics 6 //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED if(tep_session_is_registered('wishlist_id')) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <?php if(count($rp_array)>0 and $rp_has_trial){ // rp with trial ?> <td class="pageHeading" align="right" valign="top"><?php echo $rpPinfoHeaderArr['trial']; ?><br><?php print $rpPinfoHeaderArr['normal'];?></td> <?php // rp no trial }elseif (count($rp_array)>0){ ?> <td class="pageHeading" align="right" valign="top"><?php print $rpPinfoHeaderArr['normal']; ?></td> <?php }else{ // standard product ?> <td align="right" valign="top" width="10%"><?php echo $products_price; ?></td> <?php } ?> </tr> <tr> <td class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td> </tr> ?> <?php tep_session_unregister('wishlist_id'); } //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <?php /*** Begin Header Tags SEO ***/ ?> <td valign="top"><h1><?php echo $products_name; ?></h1></td> <td align="right" valign="top"><?php echo $products_price; ?></td> <?php /*** End Header Tags SEO ***/ ?></tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php // BOF: More Pics 6 if (MOPICS_TABLE_LOCATION=='above' && !empty($mopics_output)) { echo ' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText">'.$mopics_output.'</td> </tr> </table> <br>'."\n"; } else if (MOPICS_TABLE_LOCATION=='sides' && !empty($mopics_output)) { echo $mopics_output; } // EOF: More Pics 6 // BOF: More Pics 6 ADDED to if statement: && MOPICS_GROUP_WITH_PARENT == 'false' if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'false') { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <script type= "text/javascript"><!-- document.write('<?php echo '<a href="javascript: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']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"><\/a>'; ?>'); //--></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'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img src="images/zoom.gif" alt="zoom"></a>'; ?> <?php // EOF: More Pics 6 ?> </noscript> <br><br> <?php //affiliate build a link begin if (tep_session_is_registered('affiliate_id')) { ?> <?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, 'individual_banner_id=' . $product_info['products_id']) .'" target="_self">' . tep_image('includes/languages/english/images/buttons/button_affiliate_build_a_link.gif', 'Make a link') . ' </a>'; ?><?php } //affiliate build a link begin ?> </td> </tr> </table> <?php } ?> <p><?php echo stripslashes($product_info['products_description']); ?> <?php // rp check for rp data if(count($rp_array)>0){ print '<p>'; if(array_key_exists('trial', $rpPInfoArr)){ print $rpPInfoArr['trial'] . "<br>\n"; } print $rpPInfoArr['normal']; } // BOF SPPC Hide attributes from customer groups $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 . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 "); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php // BOF Option Type Feature //$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_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_type, popt.products_options_length, popt.products_options_comment 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)) { //clr 030714 add case statement to check option type switch ($products_options_name['products_options_type']) { case PRODUCTS_OPTIONS_TYPE_TEXT: //CLR 030714 Add logic for text option $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'"); $products_attribs_array = tep_db_fetch_array($products_attribs_query); $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'"> ' . $products_options_name['products_options_comment'] ; if ($products_attribs_array['options_values_price'] != '0') { $tmp_html .= '(' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .')'; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case PRODUCTS_OPTIONS_TYPE_TEXTAREA: //CLR 030714 Add logic for text option $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'"); $products_attribs_array = tep_db_fetch_array($products_attribs_query); $tmp_html = '<textarea onKeyDown="textCounter(this,\'progressbar' . $products_options_name['products_options_id'] . '\',' . $products_options_name['products_options_length'] . ')" onKeyUp="textCounter(this,\'progressbar' . $products_options_name['products_options_id'] . '\',' . $products_options_name['products_options_length'] . ')" onFocus="textCounter(this,\'progressbar' . $products_options_name['products_options_id'] . '\',' . $products_options_name['products_options_length'] . ')" wrap="soft" name="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" rows=5 id="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] . '"></textarea> <div id="progressbar' . $products_options_name['products_options_id'] . '" class="progress"></div> <script>textCounter(document.getElementById("id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']"),"progressbar' . $products_options_name['products_options_id'] . '",' . $products_options_name['products_options_length'] . ')</script>';?> <!-- DDB - 041031 - Form Field Progress Bar //--> <tr> <?php if ($products_attribs_array['options_values_price'] != '0') { ?> <td class="main"><?php echo $products_options_name['products_options_name'] . '<br>(' . $products_options_name['products_options_comment'] . ' ' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ')'; ?></td> <?php } else { ?> <td class="main"><?php echo $products_options_name['products_options_name'] . '<br>(' . $products_options_name['products_options_comment'] . ')'; ?></td> <?php } ?> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case PRODUCTS_OPTIONS_TYPE_RADIO: //CLR 030714 Add logic for radio buttons $tmp_html = '<table>'; $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 = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); //$checked=true; // START vEDIT if(!isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])){ $no_value = true; } // END vEDIT while ($products_options_array = tep_db_fetch_array($products_options_query)) { // START vEDIT if ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']] || $no_value) { $checked = true; $no_value = false; } else { $checked = false; } // END vEDIT $tmp_html .= '<tr><td class="main">'; $tmp_html .= tep_draw_radio_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked); //$checked = false; $tmp_html .= $products_options_array['products_options_values_name'] ; $tmp_html .=$products_options_name['products_options_comment'] ; if ($products_options_array['options_values_price'] != '0') { $tmp_html .= '(' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } $tmp_html .= '</tr></td>'; } $tmp_html .= '</table>'; ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case PRODUCTS_OPTIONS_TYPE_CHECKBOX: //CLR 030714 Add logic for checkboxes $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'"); $products_attribs_array = tep_db_fetch_array($products_attribs_query); // START vFIX $boxchecked = false; if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $boxchecked = true; }else { $boxchecked = false; } // END vFIX echo '<tr><td class="main">' . $products_options_name['products_options_name'] . ': </td><td class="main">'; // START vFIX //echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id']); echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id'], $boxchecked); // END vFIX echo $products_options_name['products_options_comment'] ; if ($products_attribs_array['options_values_price'] != '0') { echo '(' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } echo '</td></tr>'; break; default: //clr 030714 default is select list //clr 030714 reset selected_attribute variable $selected_attribute = false; // EOF Option Type Feature $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 // BOF Option Type Feature //echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . $products_options_name['products_options_comment']; // EOF Option Type Feature ?></td> </tr> <?php // BOF Option Type Feature } // ends the switch clause // EOF Option Type Feature } ?> </table> <?php } // BOF: More Pics 6 if (MOPICS_TABLE_LOCATION=='below' && !empty($mopics_output)) { echo ' <br> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText">'.$mopics_output.'</td> </tr> </table>'."\n"; } // EOF: More Pics 6 ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php /*** Begin Quotes ***/ if (! tep_not_null($customers['customers_email_address'])) { /*** Begin Quotes ***/ $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) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } /*** Begin Quotes ***/ } /*** End Quotes ***/ if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?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><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } /*** Begin Quotes ***/ if (! tep_not_null($customers['customers_email_address'])) { /*** End Quotes ***/ if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } /*** Begin Quotes ***/ } /*** End Quotes ***/ ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <?php /*** Begin Quotes ***/ if (! tep_not_null($customers['customers_email_address'])) { ?> <td class="main"><?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>'; ?></td> <?php } /*** End Quotes ***/ ?><td align="center"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <!--- BEGIN Header Tags SEO Social Bookmarks --> <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); ?> <!--- END Header Tags SEO Social Bookmarks --> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php //added for cross -sell if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_xsell_products(3600); //added for Xsell echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); //added for Xsell include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table></form></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'); ?>
  20. Hi Jack, when i run the test i get duplicate title and description errors for English. I dont have any other languages running so no entries have been made at all. I am guessing that this error will display if my database has duplicate content or even empty/default content? The reason I say that is that I havent populated the site with many tags yet many are empty, those that I have populated are different. Thanks
  21. the quote expiry date is stored in the products table, it would be useful if in the quotes page it displayed the quote expiry date. I have done that with the code below, but maybe it be better to have, 'Expires In' then the number of days left before the quote expires being displayed as nDays, and maybe make it change colour to red if there is less than a week left on the quote. I will be looking at doing that in the near future. in languages/english.php added define('TEXT_QUOTES_DATE_EXPIRE', 'Expiry Date'); in quotes.php added <th class="quotesBoxHeading"><?php echo TEXT_QUOTES_DATE_EXPIRE; ?></th> before <th class="quotesBoxHeading"><?php echo TEXT_QUOTES_STATUS; ?></th> added <td class="quotesLink" align="center"><?php echo tep_date_only($product_check['quotes_expire']); ?> </td>[/code] after <td class="quotesLink" align="center"><?php echo tep_date_only($product_check['products_date_added']); ?> </td>
  22. Hi Jack, I have the latest 4.6 STS and I can not find anywhere in includes/modules/sts_inc/general.pho if (!isset($sts->template['headertags'])) $sts->template['headertags']= "<title>" . TITLE ."</title>"; so couldn;t possible replace it. actaully ignore the above:- What i do have thats similar is:- $sts->template['headertags']= "<title>" . TITLE ."</title>"; and from your normal install instructions i can see thats what I need to replace, must have missed it previously. Thanks again
  23. cool, its a great mod and appears to be working seemlessly, I have been having a look at the shopping cart to try and work out how to do this but not sure, do you have any tips how I should approach it, if I get a solution I will post it, its knowing what to look at first. thanks
  24. when I use an attribute I get the attribute code {1}503, can this be dispalyed as the actual attribute value sky blie pink with yelow dots instead of the the number? Thanks
×
×
  • Create New...