iLLuSiOnS Posted July 1, 2009 Share Posted July 1, 2009 Hi, I wanted to know how easy it would be to be able to take every price and lets say for example automatically add $300 to all prices in the products description with a strikethrough it, and right under it have my price like this Retail price: $800 (with a strikethrough) Our price: $500 I dont want it to list in the category list, just in the products description. Thanks Link to comment Share on other sites More sharing options...
rescuestat Posted July 2, 2009 Share Posted July 2, 2009 Hi, I wanted to know how easy it would be to be able to take every price and lets say for example automatically add $300 to all prices in the products description with a strikethrough it, and right under it have my price like this Retail price: $800 (with a strikethrough) Our price: $500 I dont want it to list in the category list, just in the products description. Thanks Always backup first before doing any changes...the first time you don't and something happens you will know why and probably kick yourself for not doing it. Find in product_info.php page around line #93 <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> To do exactly what you want above adding $300.00 to price and strikethrough..change to <td class="pageHeading" align="right" valign="top"><del><?php echo $products_price+300; ?></del><br /><?php echo $products_price; ?></td> Frank Link to comment Share on other sites More sharing options...
iLLuSiOnS Posted July 2, 2009 Author Share Posted July 2, 2009 wow, thanks for your quick reply, its seems like such an amazing solution, but UNFORTUNATELY it didnt work, it just posts my price and under it, it just has the number 500, it looks like its not adding it. My code was a little bit different then what you posted, maybe thats the reason? here is what I had, and here is what I added <div><?php echo $products_price?></div> changed to <div><?php echo $products_price?><br /> <?php echo $products_price+500?></div> I tried it with the ; after the 500 and that didnt do anything either. Any suggestions? Link to comment Share on other sites More sharing options...
Guest Posted July 2, 2009 Share Posted July 2, 2009 Sean, Try this: http://addons.oscommerce.com/info/3574 Chris Link to comment Share on other sites More sharing options...
iLLuSiOnS Posted July 2, 2009 Author Share Posted July 2, 2009 That seems like to much work for such a little thing, I really really liked Franks idea, anyone know how I can get his method to work? Thanks -Sean Link to comment Share on other sites More sharing options...
♥ecartz Posted July 2, 2009 Share Posted July 2, 2009 You could do this without code changes simply by setting specials for every product in admin. Then you could have a different discount for every product. Take the following code if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $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 { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } and change it to if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $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 { $products_price = '<s>' . $currencies->display_price($product_info['products_price'] + 500, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } The other way, you were adding a string representing the price to a number. It evaluated the string as zero, so you just got the number. This makes the change prior to adding the currency symbol. I haven't tested it at all though. Backup first and watch out for mistakes. Always back up before making changes. Link to comment Share on other sites More sharing options...
iLLuSiOnS Posted July 2, 2009 Author Share Posted July 2, 2009 I have like 1000 products and cant really add all of them to specials, I wish Franks solution could work well if anyone else has suggestions I would truly appreciate them, thanks for all the help guys Link to comment Share on other sites More sharing options...
♥ecartz Posted July 2, 2009 Share Posted July 2, 2009 Sorry, I see that I didn't explain fully. The first paragraph is all right. Without any coding changes, you could just use the special's feature to do this. In the next paragraph (where I propose coding changes), I should have said, "If that is not feasible for you, then" before "Take the following code". The code that I posted should make Frank's idea work. Also, the code I posted would allow you override your default price difference in admin by posting a special for that product. For example, if you used +500 most places and wanted one product to be +1000. The information is all there but the transition was lacking :( Always back up before making changes. Link to comment Share on other sites More sharing options...
iLLuSiOnS Posted July 3, 2009 Author Share Posted July 3, 2009 Excuse me if this sounds a bit dumb, but where exactly is this code located? Is it in the products_info.php? I am running creloaded do you think this poses a problem? this is where I thought it would be (were frank told me to look) <?php echo $products_price?> thanks You could do this without code changes simply by setting specials for every product in admin. Then you could have a different discount for every product. Take the following code if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $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 { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } and change it to if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $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 { $products_price = '<s>' . $currencies->display_price($product_info['products_price'] + 500, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } The other way, you were adding a string representing the price to a number. It evaluated the string as zero, so you just got the number. This makes the change prior to adding the currency symbol. I haven't tested it at all though. Backup first and watch out for mistakes. Link to comment Share on other sites More sharing options...
♥ecartz Posted July 3, 2009 Share Posted July 3, 2009 Excuse me if this sounds a bit dumb, but where exactly is this code located? Is it in the products_info.php? I am running creloaded do you think this poses a problem? this is where I thought it would be (were frank told me to look) <?php echo $products_price?>In a standard osCommerce install, it would be in products_info.php. In one of the bundled versions? Not sure. If you can't get help from the bundler (perhaps they have forums), you could trace back where the $products_price is used. It's not far from the echo line in a stock osCommerce. Here's the block of code that includes both: if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $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 { $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']; } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> </table></td> </tr> Always back up before making changes. Link to comment Share on other sites More sharing options...
iLLuSiOnS Posted July 3, 2009 Author Share Posted July 3, 2009 here is my entire products_info page <?php /* $Id: product_info.tpl.php,v 1.2.0.0 2008/01/22 13:41:11 datazen Exp $ CRE Loaded, Open Source E-Commerce Solutions http://www.creloaded.com Copyright (c) 2008 CRE Loaded Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // RCI code start echo $cre_RCI->get('global', 'top'); echo $cre_RCI->get('productinfo', 'top'); // RCI code eof echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product' . '&' . $params)); ?> <table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB;?>"> <?php // added for CDS CDpath support $params = (isset($_SESSION['CDpath'])) ? 'CDpath=' . $_SESSION['CDpath'] : ''; 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" > <tr > <?php echo tep_draw_infoBox_top();?> <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, $params) . '">' . tep_template_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> <?php echo tep_draw_infoBox_bottom();?> </td> </tr> </table></td> </tr> <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, 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)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $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)$product_info['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . ' <span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } if ($product_has_sub > '0'){ // if product has sub products $products_price ='';// if you like to show some thing in place of price add here } else { $pf->loadProduct($product_info['products_id'],$languages_id); $products_price = $pf->getPriceStringShort(); } // end sub product check if (SHOW_HEADING_TITLE_ORIGINAL=='yes') { $header_text = ''; ?> <!--tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $products_name; ?></td> <td class="pageHeading" align="right"><?php echo $products_price; ?></td> </tr> </table> </td> </tr---> <?php echo tep_draw_top();?> <?php echo tep_draw_title_top();?> <?php //echo $heading_text_box; echo $breadcrumb->trail(' » '); ?> <?php echo tep_draw_title_bottom();?> <?php echo tep_draw1_top();?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } else { $header_text = $products_name .'</td><td class="productlisting-headingPrice">' . $products_price; } if (MAIN_TABLE_BORDER == 'yes'){ table_image_border_top(false, false, $header_text); } ?> <tr> <td class="main"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" valign="top"> <?php if (tep_not_null($product_info['products_image']) || tep_not_null($product_info['products_image_med'])) { ?> <div class="main prod_info" style="width:<?php echo (MEDIUM_IMAGE_WIDTH +14);?>px;"> <?php echo tep_draw_prod_pic_top();?> <!--table border="0" cellspacing="0" cellpadding="0" align="right"> <tr> <td--> <?php if ($product_info['products_image_med']!='') { $new_image = $product_info['products_image_med']; $image_width = MEDIUM_IMAGE_WIDTH; $image_height = MEDIUM_IMAGE_HEIGHT; } else { $new_image = $product_info['products_image']; $image_width = SMALL_IMAGE_WIDTH; $image_height = SMALL_IMAGE_HEIGHT; } $popup_avail = tep_not_null($product_info['products_image_lrg']) ? true : false; echo tep_javascript_image(DIR_WS_IMAGES . $new_image, 'product' . $product_info['products_id'], addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"', $popup_avail); if (isset($_SESSION['affiliate_id'])) { echo '<br><br><a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, 'individual_banner_id=' . $product_info['products_id'] . '&' . $params) .'" target="_self">' . tep_template_image_button('button_affiliate_build_a_link.gif', LINK_ALT) . ' </a>'; } ?> <!--/td> </tr> </table---> <?php echo tep_draw_prod_pic_bottom();?> </div> <div class="main"><div class="desc"><?php echo stripslashes($product_info['products_description']); ?></div><br> </div> <div style="clear:both;"></div> <?php } ?> <?php echo tep_pixel_trans();?> <?php /* echo tep_draw2_bottom(); */?> <div class="prod_line_x padd_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div> <?php echo tep_draw2_top();?> <?php //echo '<p>' . stripslashes($product_info['products_description']) . '</p>'; echo tep_draw_separator('pixel_trans.gif', '100%', '10'); $products_id_tmp = $product_info['products_id']; if(tep_subproducts_parent($products_id_tmp)){ $products_id_query = tep_subproducts_parent($products_id_tmp); } else { $products_id_query = $products_id_tmp; } $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . (int)$products_id_query . "' "); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { // the tax rate will be needed, so get it once $tax_rate = tep_get_tax_rate($product_info['products_tax_class_id']); ?> <?php echo tep_pixel_trans();?> <table width="100%" border="0" cellspacing="0" cellpadding="0" > <tr><td width="59%"><div style="padding-left:17px; padding-top:8px">Retail Value:<del>$<?php echo $products_price+500 ?>.00</del><br /> Our Price: <?php echo $products_price?></div></td><td> <table width="100%" border="0" cellspacing="0" cellpadding="2" > <tr> <td class="main" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td> </tr> <?php $products_options_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix, po.options_type, po.options_length, pot.products_options_name, pot.products_options_instruct from " . TABLE_PRODUCTS_ATTRIBUTES . " AS pa, " . TABLE_PRODUCTS_OPTIONS . " AS po, " . TABLE_PRODUCTS_OPTIONS_TEXT . " AS pot WHERE pa.products_id = '" . (int)$products_id_query . "' and pa.options_id = po.products_options_id and po.products_options_id = pot.products_options_text_id and pot.language_id = '" . (int)$languages_id . "' ORDER BY pa.products_options_sort_order, po.products_options_sort_order "); // Store the information from the tables in arrays for easy of processing $options = array(); $options_values = array(); while ($po = tep_db_fetch_array($products_options_query)) { // we need to find the values name if ( $po['options_type'] != 1 && $po['options_type'] != 4 ) { $options_values_query = tep_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id ='". $po['options_values_id'] . "' and language_id = '" . (int)$languages_id . "'"); $ov = tep_db_fetch_array($options_values_query); } else { $ov['products_options_values_name'] = ''; } $options[$po['options_id']] = array('name' => $po['products_options_name'], 'type' => $po['options_type'], 'length' => $po['options_length'], 'instructions' => $po['products_options_instruct'], 'price' => $po['options_values_price'], 'prefix' => $po['price_prefix'], ); $options_values[$po['options_id']][$po['options_values_id']] = array('name' => stripslashes($ov['products_options_values_name']), 'price' => $po['options_values_price'], 'prefix' => $po['price_prefix']); } foreach ($options as $oID => $op_data) { switch ($op_data['type']) { case 1: $maxlength = ( $op_data['length'] > 0 ? ' maxlength="' . $op_data['length'] . '"' : '' ); $attribute_price = $currencies->display_price($op_data['price'], $tax_rate); $tmp_html = '<input type="text" name="id[' . $oID . '][t]"' . $maxlength . ' />'; ?> <tr> <td class="main"> <?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); echo ($attribute_price >= 0 ? '<br><span class="smallText">' . $op_data['prefix'] . ' ' . $attribute_price . '</span>' : '' ); ?> </td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case 4: $text_area_array = explode(';',$op_data['length']); $cols = $text_area_array[0]; if ( $cols == '' ) $cols = '100%'; if (isset($text_area_array[1])) { $rows = $text_area_array[1]; } else { $rows = ''; } $attribute_price = $currencies->display_price($op_data['price'], $tax_rate); $tmp_html = '<textarea name="id[' . $oID . '][t]" rows="'.$rows.'" cols="'.$cols.'" wrap="virtual" style="width:100%;"></textarea>'; ?> <tr> <td class="main"> <?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); echo ($attribute_price >= 0 ? '<br><span class="smallText">' . $op_data['prefix'] . ' ' . $attribute_price . '</span>' : '' ); ?> </td> <td class="main" align="center"><?php echo $tmp_html; ?></td> </tr> <?php break; case 2: $tmp_html = ''; foreach ( $options_values[$oID] as $vID => $ov_data ) { if ( (float)$ov_data['price'] == 0 ) { $price = ' '; } else { $price = '( ' . $ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate) . ' )'; } $tmp_html .= '<input type="radio" name="id[' . $oID . ']" value="' . $vID . '">' . $ov_data['name'] . ' ' . $price . '<br />'; } // End of the for loop on the option value ?> <tr> <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case 3: $tmp_html = ''; $i = 0; foreach ( $options_values[$oID] as $vID => $ov_data ) { if ( (float)$ov_data['price'] == 0 ) { $price = ' '; } else { $price = '( '.$ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate).' )'; } $tmp_html .= '<input type="checkbox" name="id[' . $oID . '][c][' . $i . ']" value="' . $vID . '">' . $ov_data['name'] . ' ' . $price . '<br />'; $i++; } ?> <tr> <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; case 0: $tmp_html = '<select name="id[' . $oID . ']">'; foreach ( $options_values[$oID] as $vID => $ov_data ) { if ( (float)$ov_data['price'] == 0 ) { $price = ' '; } else { $price = '( '.$ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate).' )'; } $tmp_html .= '<option value="' . $vID . '">' . $ov_data['name'] . ' ' . $price .'</option>'; } // End of the for loop on the option values $tmp_html .= '</select>'; ?> <tr> <td class="main" colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '4'); ?></td> </tr> <tr> <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><br/><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td> <td class="main"><?php echo $tmp_html; ?></td> </tr> <?php break; } //end of switch } //end of while ?> </table> </td></tr></table> <?php } // end of ($products_attributes['total'] > 0) ?> </td> </tr> </table></td> </tr> <?php if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); } $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$product_info['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] >= 0) { ?> <!--tr> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr><td> <table cellpadding="2" cellspacing="0" border="0"> <tr> <td class="main" style="padding-left:19px;"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> </table> </td></tr//--> </table> <?php } // Extra Products Fields are checked and presented $extra_fields_query = tep_db_query("SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf, ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef WHERE ptf.products_id='".(int)$product_info['products_id']."' and ptf.products_extra_fields_value <> '' and ptf.products_extra_fields_id = pef.products_extra_fields_id and (pef.languages_id='0' or pef.languages_id='".$languages_id."') ORDER BY products_extra_fields_order"); if ( tep_db_num_rows($extra_fields_query) > 0 ) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><table border="0" cellspacing="1" cellpadding="2"> <?php while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) continue; // show only enabled extra field ?> <tr> <td class="main" valign="top"><b><?php echo $extra_fields['name']; ?>: </b></td> <td class="main" valign="top"><?php echo $extra_fields['value']; ?></td> </tr> <?php } ?> </table></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url'] . '&' . $params), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <?php echo tep_pixel_trans();?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <?php echo tep_pixel_trans();?> <!--table cellpadding="2" cellspacing="0" border="0"> <tr> <td class="smallText" style="padding-left:19px;"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> </table--> <?php echo tep_draw2_bottom();?> <?php echo tep_pixel_trans();?> <div class="prod_line_x padd_gg"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div> <?php echo tep_draw2_top(); ?> <?php echo tep_pixel_trans();?> <?php } if (MAIN_TABLE_BORDER == 'yes'){ table_image_border_bottom(); } // sub product start if (STOCK_ALLOW_CHECKOUT =='false') { $allowcriteria = ""; } // get sort order $csort_order = tep_db_fetch_array(tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'CATEGORIES_SORT_ORDER'")); $select_order_by = ''; switch ($csort_order['configuration_value']) { case 'PRODUCT_LIST_MODEL': $select_order_by .= 'sp.products_model'; break; case 'PRODUCT_LIST_NAME': $select_order_by .= 'spd.products_name'; break; case 'PRODUCT_LIST_PRICE': $select_order_by .= 'sp.products_price'; break; default: $select_order_by .= 'sp.products_model'; break; } $sub_products_sql = tep_db_query("select sp.products_id, sp.products_quantity, sp.products_price, sp.products_tax_class_id, sp.products_image, spd.products_name, spd.products_description, sp.products_model from " . TABLE_PRODUCTS . " sp, " . TABLE_PRODUCTS_DESCRIPTION . " spd where sp.products_parent_id = " . (int)$product_info['products_id'] . " and spd.products_id = sp.products_id and spd.language_id = " . (int)$languages_id . " order by " . $select_order_by); if ( tep_db_num_rows($sub_products_sql) > 0 ) { if (MAIN_TABLE_BORDER == 'yes'){ $header_text= ''; table_image_border_top(false, false, $header_text); } ?> <tr> <td align="right"><table> <?php while ($sub_products = tep_db_fetch_array($sub_products_sql)) { $subname = substr( $sub_products['products_name'], strlen( $product_info['products_name'] . ' - ' )); $pf->loadProduct($sub_products['products_id'],$languages_id); $sub_products_price = $pf->getPriceStringShort(); ?> <tr align="right"> <td class="productListing-data"><?php if ($sub_products['products_image']) echo tep_image(DIR_WS_IMAGES . $sub_products['products_image'], $subname, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,'vspace="2" hspace="2"'); ?></td> <td class="productListing-data"><b><?php echo $subname; ?></b> [<?php echo $sub_products['products_model']; ?>]<br /><?php echo $sub_products['products_description'];?></td> <td class="productListing-data"><?php echo $sub_products_price; ?></td> <?php if (($sub_products['products_quantity'] == 0) && ( STOCK_ALLOW_CHECKOUT =='false')){ ?> <td class="productListing-data"><?php echo TEXT_ENTER_QUANTITY;?> : <?php echo TEXT_OUT_OF_STOCK . tep_draw_hidden_field('sub_products_qty[]', '0', 'size="5"') . tep_draw_hidden_field('sub_products_id[]', $sub_products['products_id']);?></td> <?php } else if ($sub_products['products_quantity'] > 0){ ?> <td class="productListing-data"><?php echo TEXT_ENTER_QUANTITY;?> : <?php echo tep_draw_input_field('sub_products_qty[]', '0', 'size="5"') . tep_draw_hidden_field('sub_products_id[]', $sub_products['products_id']);?></td> <?php }// end if ?> </tr> <?php } // end while ?> </table></td> </tr> <?php if (MAIN_TABLE_BORDER == 'yes'){ table_image_border_bottom(); } } // sub product_eof if ($product_check['total'] > 0) { ?> <tr> <td> <?php echo tep_draw_infoBox_top();?> <table border="0" width="100%" cellspacing="1" cellpadding="2" > <tr > <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 class="main" valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params() . $params) . '">' . tep_template_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS,'align="middle"') . '</a>'; ?></td//--> <?php if (DESIGN_BUTTON_WISHLIST == 'true') { echo '<td align="left" class="main" valign="middle"><!-- Begin Wishlist Code -->' . "\n"; echo '<script type="text/javascript"><!--' . "\n"; echo 'function addwishlist() {' . "\n"; echo 'document.cart_quantity.action=\'' . tep_href_link(FILENAME_PRODUCT_INFO, 'action=add_wishlist' . '&' . $params) . '\';' . "\n"; echo 'document.cart_quantity.submit();' . "\n"; echo '}' . "\n"; echo '--></script>' . "\n"; echo '<a href="java script:addwishlist()">' . tep_template_image_button('button_add_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST,'align="middle"') . '</a>'; echo '</td><!-- End Wishlist Code -->'; } } // if products_check ?> <td class="main" align="left" valign="absmiddle"><table border="0" cellspacing="0" cellpadding="0" align="left"> <tr> <?php if (tep_db_num_rows($sub_products_sql) ==0) { ?> <td colspan="2" align="left"><?php echo ' <b>'.TEXT_ENTER_QUANTITY . '</b>: ';?> <?php echo tep_draw_input_field('cart_quantity', '1', 'size="1" maxlength="1" class="txtsize"');?> </td> <?php } ?> <td align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_template_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART,'align="absmiddle"'); ?></td> </tr> </table></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table> <?php echo tep_draw_infoBox_bottom();?> </td> </tr> <?php if ( (USE_CACHE == 'true') && !SID) { echo tep_cache_also_purchased(3600); include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); } else { include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS_BUYNOW); include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } if (B2B_PRICE_BREAK == 'true') { include(DIR_WS_MODULES . FILENAME_PRODUCT_QUANTITY_TABLE); } } ?> </table> </form> <?php // RCI code start echo $cre_RCI->get('productinfo', 'bottom'); echo $cre_RCI->get('global', 'bottom'); // RCI code eof ?> Link to comment Share on other sites More sharing options...
♥ecartz Posted July 3, 2009 Share Posted July 3, 2009 Try changing $pf->loadProduct($product_info['products_id'],$languages_id); $products_price = $pf->getPriceStringShort(); to $pf->loadProduct($product_info['products_id'],$languages_id); $products_price = $pf->getPriceStringShort(); $products_price = '<s>' . $currencies->display_price($product_info['products_price'] + 500, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $products_price . '</span>'; As always, back up first. Always back up before making changes. Link to comment Share on other sites More sharing options...
iLLuSiOnS Posted July 3, 2009 Author Share Posted July 3, 2009 MATT!!!!!!!!!!!!! I love you? lol.....WOW you are amazing, It worked amazingly....seriously I owe you, I dont have much money, but I would love to donate a small little something to you if you would like. Once again, Thanks a billion You seem very knowledgeable, anyway you can help me out with a easypopulate problem? I could pay once again. Either way, you did me a solid, thank you very very much Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.