Guest Posted March 12, 2009 Share Posted March 12, 2009 Hi there, In oscommerce when you put a discount on a product is shows it like this: EUR 5.15 EUR 4.50 I would like it to be like this : Before € 5.15 Now € 4.50 Where can i change this, and how. We are using STS template. http://www.tvoiata-kniga.com Thanks. Quote Link to comment Share on other sites More sharing options...
bkellum Posted March 12, 2009 Share Posted March 12, 2009 Hi there, In oscommerce when you put a discount on a product is shows it like this: EUR 5.15 EUR 4.50 I would like it to be like this : Before € 5.15 Now € 4.50 Where can i change this, and how. We are using STS template. http://www.tvoiata-kniga.com Thanks. Your Stylesheet and the language files. If you are using a Product Info Content template, then you could add in the "Before $regularpricestrike" and "Now $specialprice" directly into the template. Please ask all STS related questions in the STSv4 Support Forum so that all STS Users can benefit. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Guest Posted March 15, 2009 Share Posted March 15, 2009 (edited) Your Stylesheet and the language files. If you are using a Product Info Content template, then you could add in the "Before $regularpricestrike" and "Now $specialprice" directly into the template. Please ask all STS related questions in the STSv4 Support Forum so that all STS Users can benefit. I can not find it, and it is very frustrating, Here is the Product_info.php in the STS folder. <?php /* $Id: product_info.php,v 4.3SP1 2006/11/15 23:55:58 rigadin Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2006 osCommerce Released under the GNU General Public License Based on: Simple Template System (STS) - Copyright (c) 2004 Brian Gallagher - [email protected] STS v4.3SP1 by Rigadin ([email protected]) */ $products_id=intval($_GET['products_id']); // Create variables for product ID, added in v4.0.6 //$template_pinfo['productid'] = $products_id; // Deprecated in STS4.3SP1 $template_pinfo['productsid'] = $products_id; // Just for consistende with osC names // Start the "Add to Cart" form $template_pinfo['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); // Add the hidden form variable for the Product_ID $template_pinfo['startform'] .= tep_draw_hidden_field('products_id', $products_id); $template_pinfo['endform'] = "</form>"; // Get product information from products_id parameter $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, 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 = '" . $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); $template_pinfo['regularprice'] = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $template_pinfo['regularpricestrike'] = "<s>" . $template_pinfo['regularprice'] . "</s>"; $template_pinfo['specialprice'] = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])); } else { $template_pinfo['specialprice'] = ''; $template_pinfo['regularpricestrike'] = $template_pinfo['regularprice']; } $template_pinfo['productname'] = $product_info['products_name']; $template_pinfo['productmodel'] = $product_info['products_model']; if (tep_not_null($product_info['products_image'])) { $template_pinfo['imagesmall'] = tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); $template_pinfo['imagelarge'] = tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), '','',''); $template_pinfo['product_popup']= '<script language="javascript"><!--'."\n". 'document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . (int)$products_id) . '\\\')">' . $template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>\');'."\n". '//--></script>'."\n". '<noscript>'."\n". '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n". '</noscript>'."\n"; } else { $template_pinfo['imagesmall'] =''; $template_pinfo['imagelarge'] =''; $template_pinfo['product_popup']=''; } $template_pinfo['productdesc'] = stripslashes($product_info['products_description']); // Get the number of product attributes (the select list options) $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 . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); // If there are attributes (options), then... if ($products_attributes['total'] > 0) { // Print the options header $template_pinfo['optionheader'] = TEXT_PRODUCT_OPTIONS; // Select the list of attribute (option) names $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_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 . "'"); // For each option name, get the individual attribute (option) choices 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 the attribute (option) has a price modifier, include it 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 we should select a default attribute (option), do it here if (isset($cart->contents[$_GET['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; } $template_pinfo['optionnames'] .= $products_options_name['products_options_name'] . ':<br>'; $template_pinfo['optionchoices'] .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . "<br>"; } } else { // No options, blank out the template variables for them $template_pinfo['optionheader'] = ''; $template_pinfo['optionnames'] = ''; $template_pinfo['optionchoices'] = ''; } // See if there are any reviews $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$_GET['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { $template_pinfo['reviews'] = TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; } else { $template_pinfo['reviews'] = ''; } // See if there is a product URL if (tep_not_null($product_info['products_url'])) { $template_pinfo['moreinfolabel'] = TEXT_MORE_INFORMATION; $template_pinfo['moreinfourl'] = tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false); } else { $template_pinfo['moreinfolabel'] = ''; $template_pinfo['moreinfourl'] = ''; } $template_pinfo['moreinfolabel'] = str_replace('%s', $template_pinfo['moreinfourl'], $template_pinfo['moreinfolabel']); // See if product is not yet available if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { $template_pinfo['productdatelabel'] = sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); // Modified in v4.5 $template_pinfo['productdate'] = tep_date_long($product_info['products_date_available']); } else { $template_pinfo['productdatelabel'] = sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added']) ); // Modified in v4.5 $template_pinfo['productdate'] = tep_date_long($product_info['products_date_added']); } // Strip out %s values //$template_pinfo['productdatelabel'] = str_replace('%s.', '', $template['productdatelabel']); // Removed in v4.5 // See if any product reviews $template_pinfo['reviewsurl'] = tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()); $template_pinfo['reviewsbutton'] = tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS); $template_pinfo['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); // See if any "Also Purchased" items. Feature added in v4.0.6 $sts->start_capture(); if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } $sts->stop_capture ('alsopurchased'); // Get the result to the main array $template_pinfo['alsopurchased']= $sts->template['alsopurchased']; // Put it in the product info ?> And also the stylesheet file, Please help me /* $Id: stylesheet.css 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 */ .boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .errorBox { font-family : Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; } .stockWarning { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; } .productsNotifications { background: #f2fff7; } .orderEdit { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #70d250; text-decoration: underline; } BODY { color: #000000; margin: 0px; background: #FFF48D; background-image: url(image/body_bg.jpg); background-repeat: repeat-x; background-attachment: fixed; height:100%; } #copyright{ padding: 20px; color: #ffffff; font-family: Verdana, Arial, sans-serif; font-size: 10px; text-align: center; } .header_top{ color: #ffffff; font-family: Verdana, Arial, sans-serif; font-size: 10px; } A { color: #000000; text-decoration: none; } A:hover { color: #000000; } FORM { display: inline; } TR.header { background: #ffffff; } TR.headerNavigation { background: #B8989F; } .headerNavigation { font-family: Verdana, Arial, sans-serif; font-size: 12px; background-repeat: repeat-x; color: #000000; font-weight : bold; } A.headerNavigation { color: #e6ffe6; } A.headerNavigation:hover { color: #be4228; } .headerNavigation2 { font-family: Verdana, Arial, sans-serif; font-size: 13px; background-repeat: repeat-x; color: #000000; font-weight : bold; } A.headerNavigation2 { color: #e6ffe6; } A.headerNavigation2:hover { color: #be4228; } TR.headerNavigation3 { background: #B8989F; } .headerNavigation3 { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #B8989F; background-image: url(image/yellow_background.jpg); background-repeat: repeat-x; color: #e6ffe6; font-weight : bold; } A.headerNavigation3 { color: #e6ffe6; } A.headerNavigation:hover { color: #e6ffe6; } .headerNavigation4 { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #B8989F; background-image: url(image/yellow_background.jpg); background-repeat: repeat-x; color: #e6ffe6; font-weight : bold; } A.headerNavigation4 { color: #e6ffe6; } A.headerNavigation4:hover { color: #e6ffe6; } .headerNavigation5 { font-family: Verdana, Arial, sans-serif; font-size: 13px; background-repeat: repeat-x; color: #000000; font-weight : bold; } A.headerNavigation5 { color: #e6ffe6; } A.headerNavigation5:hover { color: #be4228; } TR.headerError { background: #ff0000; } TD.headerError { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; background: #ff0000; color: #ffffff; font-weight : bold; text-align : center; } TR.headerInfo { background: #00ff00; } TD.headerInfo { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; background: #00ff00; color: #ffffff; font-weight: bold; text-align: center; } TR.footer { background: #A10000; } TD.footer { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #A10000; color: #ffffff; font-weight: bold; } .infoBox { } .infoBoxContents { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .infoBoxNotice { background: #FF8E90; } TD.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 11px; font-weight: bold; color: #e6ffe6; } TD.infoBox, SPAN.infoBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; } TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd { background: #FAF6E5; } TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even { background: #EEE8D2; } TABLE.productListing { border: 1px; border-style: solid; border-color: #9B9264; font-weight: bold; } .productListing-heading { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-image: url(image/yellow_background.jpg); background-repeat: repeat-x; color: #e6ffe6; height: 20px; font-weight: bold; } TD.productListing-data { font-family: Verdana, Arial, sans-serif; font-size: 10px; } A.pageResults { color: #0000FF; } A.pageResults:hover { color: #0000FF; background: #FFFF33; } A.product_catalog:link, A.product_catalog:visited { color: #3A6A06; font-family: Arial, sans-serif; font-size: 12px; font-weight: bold; } A.product_catalog:hover { color: #3A6A06; } TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 18px; color: #3A6A06; } TR.subBar { background: #f4f7fd; } TD.subBar { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; } TD.main, P.main { font-family: Verdana, Arial, sans-serif; font-size: 11px; line-height: 1.5; } .annotation { font-family: Verdana, Arial, sans-serif; font-size: 11px; font-weight: bold; line-height: 1.5; } TD.smallText, SPAN.smallText, P.smallText { font-family: Verdana, Arial, sans-serif; font-size: 10px; } TD.accountCategory { font-family: Verdana, Arial, sans-serif; font-size: 13px; color: #aabbdd; } TD.fieldKey { font-family: Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } TD.fieldValue { font-family: Verdana, Arial, sans-serif; font-size: 12px; } TD.tableHeading { font-family: Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } SPAN.newItemInCart { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; } CHECKBOX, INPUT, RADIO, SELECT { font-family: Verdana, Arial, sans-serif; font-size: 11px; } TEXTAREA { width: 100%; font-family: Verdana, Arial, sans-serif; font-size: 11px; } SPAN.greetUser { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #f0a480; font-weight: bold; } TABLE.formArea { background: #f1f9fe; border-color: #7b9ebd; border-style: solid; border-width: 1px; } TD.formAreaTitle { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } SPAN.markProductOutOfStock { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; color: #c76170; font-weight: bold; } SPAN.productSpecialPrice { font-family: Verdana, Arial, sans-serif; color: #ff0000; } SPAN.errorText { font-family: Verdana, Arial, sans-serif; color: #ff0000; } .moduleRow { } .moduleRowOver { background-color: #D7E9F7; cursor: pointer; cursor: pointer; } .moduleRowSelected { background-color: #E9F4FC; } .checkoutBarFrom, .checkoutBarTo { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #8c8c8c; } .checkoutBarCurrent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; } /* message box */ .messageBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .messageStackError, .messageStackWarning { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #ffb3b5; } .messageStackSuccess { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #99ff00; } /* input requirement */ .inputRequirement { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #ff0000; } .cssbutton { border: solid 2px #5f3318; background-color: #ddd7c1; color : #5f3318; vertical-align: top; font-weight: bold; font-family: Verdana, Arial, Tahoma; font-size: 12px; cursor: pointer; text-align: center; width: 150px; } .cssbutton:active, cssbuttonsubmit:active { border-style: inset; } .cssbuttonsubmit{ border: solid 0px #5f3318; background-color: #ddd7c1; vertical-align: top; color: #5f3318; font-family: Verdana, Arial, Tahoma; font-weight: bold; font-size: 12px; cursor: pointer; text-align: center; width: 150px; } /* XC Menu Styles */ #catxcdiv ul { list-style: none; margin: 0; padding: 0 0 0 1.5em; font-size: 12px; } /* menu item spacing */ #catxcdiv li{ margin-bottom: .2em; } /*padding between submenu items*/ #catxc ul li { padding: 0 0 .2em 0; } /*xc menu item*/ #catxcdiv li.xc { list-style: none; } /*submenu*/ #catxcdiv li.xc ul { margin: .2em 0 0 -.8em; } /* +/- control */ div.xcx, div.xcc { position: relative; display: inline; } li.xc>div.xcx, li.xc>div.xcc { position: static; margin-left: -1.7em; float: left; width: 1.5em; } div.xcx a, div.xcc a { position: absolute; left: -2em; } div.xcx>a, div.xcc>a { position: static; } .plusminus { text-decoration: none; font-family: "Courier New", Courier, monospace; font-size: 90%; } /* menu Image -noborderBox - Show Sub-categories Star */ a.menucateg:link, a.menucateg:visited, a.menucateg:active { display: block; border: solid 1px #ffffff; vertical-align: middle; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; text-align: left; color: #000000; text-decoration: none; } a.menucateg:hover { border: solid 1px #E6D0B5; background-color: #FFE9CE; text-decoration: none; font-weight: bold; } a.menusubcateg:link, a.menusubcateg:visited, a.menusubcateg:active { display: block; border: solid 1px #ffffff; vertical-align: middle; font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left; text-decoration: none; color: #000000; } a.menusubcateg:hover { border: solid 1px #E6D0B5; background-color: #FFE9CE; text-decoration: none; } a.menusubcategsec:link, a.menusubcategsec:visited, a.menusubcategsec:active { display: block; border: solid 1px #ffffff; vertical-align: middle; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left; text-decoration: none; color: #000000; } a.menusubcategsec:hover { border: solid 1px #E6D0B5; background-color: #FFE9CE; text-decoration: none; } /* menu Image -noborderBox - Show Sub-categories End */ #welcome_box{ border: 1px solid #C7B2D3; background-color: #FCEDEF; padding: 5px; margin-bottom: 10px; } #main_bg{ background: #FFE9CE url(image/box_bg.gif); } #footer{ color: #000000; font-family: Verdana, Arial, sans-serif; font-size: 10px; } .header_text{ text-align: center; padding: 7px; color: #6D694E; font-family: Arial, sans-serif; font-size: 12px; font-weight: bold; } .cart{ background-image: url(image/shopping-cart.jpg); background-repeat: no-repeat; } .login_name{ font-size: 11px; font-weight: bold; text-decoration: none; color: #E55C19; } .login_box{ font-size: 11px; font-weight: bold; text-decoration: none; color: #000000; } TD.main, P.main, SPAN.pricesavings, SPAN.pricesavingstext, SPAN.priceinsteadfeatured, SPAN.pricenormalfeatured { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 11px; line-height: 1.5; } Edited March 15, 2009 by palmatecnico Quote Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2009 Share Posted March 18, 2009 Nobody that knows the answer to my problem ?? Quote Link to comment Share on other sites More sharing options...
bkellum Posted March 18, 2009 Share Posted March 18, 2009 Nobody that knows the answer to my problem ?? Sure: Please ask all STS related questions in the STSv4 Support Forum so that all STS Users can benefit. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.