speed2 Posted April 12, 2004 Posted April 12, 2004 Hi Every one, I would like to display the price as follow Listed Price: $15.00 Our Price: $10.00 Rather than the standard price listing like Original price cross out and next to that the sale price. I think I found the code that display the the sales price. Some one please help me to display the way I want???? Please <?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, 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)$HTTP_GET_VARS['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)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); 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']; } ?>
speed2 Posted April 12, 2004 Author Posted April 12, 2004 HI fl70, I already tried the "EZ New Fields" module. This module do not work with the existing "special" Module. This module create a whole new pricing system, Which I don't want. All I want is take the existing price system and display the regular price and the discount price! Thanks
nrlatsha Posted April 13, 2004 Posted April 13, 2004 Funny you mention the "special price" not working with EZ. I just started working on coding that contrib last night. Completely re-writing it (again) to work with "specials" and "customer discount" contrib. Trying to rewrite customer discount contrib to take the extra discount off the special price. Should be ready in about 3 days from now. If I didn't have this other darned job (12 hour shifts...), I could work on it all the time... :D It doesn't create a whole new pricing system, just displays prices and savings and creates a new mysql entry for you to store this new number. Are you looking to pull them from somewhere else? Is there ne thing else ne one wants to see go into it? Noel 9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard) Replace that and you're fine...
speed2 Posted April 13, 2004 Author Posted April 13, 2004 Hey Noel, Well, I am just curious, why are you trying to create a whole new table when the information already present to you??? All I want to do is just seprate the listed price and speical price thatz all I am not trying to do anything fancy!!! thanks
jmoore04 Posted April 13, 2004 Posted April 13, 2004 Try this and see if it's what you are wanting, this is almost the same exact way that I have my prices listed. Find: 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'])); } Replace with: if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = 'Listed Price: ' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '<br><span class="productSpecialPrice">Our Price: ' . $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'])); }
nrlatsha Posted April 13, 2004 Posted April 13, 2004 IC, you are talking about using the specials area. EZ is for a whole new field, you can then input what the going rate is, then your price. Completely separate from the specials price, that isn't even taken into account. I don't want to have everything in the store on special and have the list price be my normal price. For the above to work, you need to have the product on special. Is that what you were asking in the first place, I misunderstood due to lack on information. 9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard) Replace that and you're fine...
speed2 Posted April 14, 2004 Author Posted April 14, 2004 HELLO jmoore04, Wow! its worked perfect!!! thanks a MILLION....................
420 Posted May 14, 2004 Posted May 14, 2004 So did we ever get a fix so that EZier fields works with specials? I just used the built-in 'Specials' feature for the first time and I see on my main page, it shows the Special prices and my former price as $000.00 lol
nrlatsha Posted May 15, 2004 Posted May 15, 2004 So did we ever get a fix so that EZier fields works with specials? I just used the built-in 'Specials' feature for the first time and I see on my main page, it shows the Special prices and my former price as $000.00 lol Latest version of EZier works with specials. http://www.oscommerce.com/community/contributions,1310 9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard) Replace that and you're fine...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.