Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Inserting text


Silverado05

Recommended Posts

Hello, I have a quick question about adding some text next to the price on the product info page. I am wanting to insert the text "Your Price" before the price on the product info page. Now I what code to insert it to, just not sure how to insert it and was wondering if anyone could offer some help? Here is the code that displays the price on the product info page:

 

	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']));
}

 

 

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

You could go really easy and just open product_info.php and insert the text before where it calls for the price. Normally what I do, it's eays. : )

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Hello, I have a quick question about adding some text next to the price on the product info page.

 

That's what I am asking, I already know where to put it just don't know how. The code above is from the product_info.php where it calls for the price. I am just not sure how or where to insert the text. I have tried but it won't line it up properly so any help?

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Hello, I have a quick question about adding some text next to the price on the product info page. I am wanting to insert the text "Your Price" before the price on the product info page. Now I what code to insert it to, just not sure how to insert it and was wondering if anyone could offer some help? Here is the code that displays the price on the product info page:

 

	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']));
}

-Thanks

 

 

Open catalog/product_info.php

 

find:

 

<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>

 

 

and replace it with:

 

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="39%" valign="top" class="pageHeading"><?php echo $products_name; ?></td>

<td width="57%" align="right" valign="top" class="main">Your

Price:   </td>

<td width="4%" align="right" valign="top" class="pageHeading"><?php echo $products_price; ?></td>

</tr>

</table>

 

 

 

that should do what you want.

 

F5

Link to comment
Share on other sites

Thank you very much, that was exactly what I was looking for and worked great. I was in the right area if I had only scrolled down a little farther I would have seen that table. I guess when you have been staring at code all day it all seems to run together....LoL

 

-Thanks Again.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...