close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Change Currency symbol on certain PowerStore 3 pages

Thread began 6/08/2010 3:12 am by mousework50137 | Last modified 6/08/2010 6:47 am by mousework50137 | 3480 views | 1 replies

Jason ByrnesWebAssist

on the index page, the code to display the fetured product is:

php:
<?php if ($totalRows_FeaturedRS 0) { // Show if recordset not empty ?>
 <?php echo(' <div class="productWrapper">
    <div class="image"><a href="Products_Detail.php?ProductID='
$row_FeaturedRS['ProductID'].'"><img  src="imagesupload/'.  $row_FeaturedRS['ProductThumb'] .'" alt="" width="120" /></a></div>
    <div class="price">
      <a href="Products_Detail.php?ProductID='
.  $row_FeaturedRS['ProductID'] .'"><h3>'.  $row_FeaturedRS['ProductName'] .'</h3></a>
      <h4>$'
. (number_format($row_FeaturedRS['ProductPrice'],2)) .'</h4>
      <p><a href="Products_Detail.php?ProductID='
.  $row_FeaturedRS['ProductID'] .'"><img  src="Images/btn_learnmore.png" width="111" height="22" alt="Learn More" /></a></p>
      </div>
  </div>'
);
  
?>
  <?php // Show if recordset not empty ?>
  
  
  <?php if ($totalRows_FeaturedRS == 0) { // Show if recordset empty ?>
  <div class="productWrapper">
    <div class="image"><img  src="Images/pod1_img.png"  width="131"  /></div>
    <div class="price">
      <h3>Sample Product</h3>
      <h4>$24.99</h4>
      <p>Set the featured product from the Admin product details..</p>
      <p><a href="#"><img  src="Images/btn_learnmore.png" width="111" height="22" alt="Learn More" /></a></p>
      </div>
  </div>
  <?php // Show if recordset empty ?>




look for the 2 <h4> tags:

php:
<h4>$'. (number_format($row_FeaturedRS['ProductPrice'],2)) .'</h4>



and:

php:
<h4>$24.99</h4>



to change the currency symbol.


the code for showing the most popular product is:

php:
<?php if ($totalRows_MostPopularRS 0) { // Show if recordset not empty ?>
      <?php
echo('  <div class="productWrapper">
    <div class="image" style="width: 148px;"><a href="Products_Detail.php?ProductID='
$row_MostPopularRS['ProductID'] .'"><img  src="imagesupload/'.  $row_MostPopularRS['ProductThumb'] .'" alt="" width="120" /></a></div>
    <div class="price">
      <a href="Products_Detail.php?ProductID='
.  $row_MostPopularRS['ProductID'] .'"><h3>'$row_MostPopularRS['ProductName'] .'</h3></a>
      <h4>$'
number_format($row_MostPopularRS['ProductPrice'],2) .'</h4>
      <p><a href="Products_Detail.php?ProductID='
.  $row_MostPopularRS['ProductID'] .'"><img  src="Images/btn_learnmore.png" width="111" height="22" alt="Learn More" /></a></p>
      </div>
  </div>'
);
?>
  <?php // Show if recordset not empty ?>
  <?php if ($totalRows_MostPopularRS == 0) { // Show if recordset empty ?>
  <div class="productWrapper">
    <div class="image" style="width: 148px;"><img  src="Images/pod3_img.png"  width="131" height="136" /></div>
    <div class="price">
      <h3>Sample Product</h3>
      <h4>$249.99</h4>
      <p>Displays your most popular product based on sales.</p>
      <p><a href="#"><img  src="Images/btn_learnmore.png" width="111" height="22" alt="Learn More" /></a></p>
      </div>
  </div>
  <?php // Show if recordset empty ?>




again, look for the two <h4> tags:

php:
<h4>$'. number_format($row_MostPopularRS['ProductPrice'],2) .'</h4>



and

php:
<h4>$249.99</h4>



to change the currency symbol.



on the admin\product_results.php page, the code for showing the price is:

php:
<td><?php 
                                
if($row_MaxMinPrice["MinPrice"] > 0) {
                                  echo 
"$".number_format($row_MaxMinPrice["MinPrice"],2);
                                } else {
                                    echo 
"$".number_format($row_WADAProducts["ProductPrice"],2);
                                }
                                
?>
                      <?php echo(($row_MaxMinPrice["MaxPrice"] != $row_MaxMinPrice["MinPrice"])?" - $" number_format($row_MaxMinPrice["MaxPrice"],2):""); ?></td>



change that code to:

php:
<td><?php 
                                
if($row_MaxMinPrice["MinPrice"] > 0) {
                                  echo 
"&pound;".number_format($row_MaxMinPrice["MinPrice"],2);
                                } else {
                                    echo 
"&pound;".number_format($row_WADAProducts["ProductPrice"],2);
                                }
                                
?>
                      <?php echo(($row_MaxMinPrice["MaxPrice"] != $row_MaxMinPrice["MinPrice"])?" - &pound;" number_format($row_MaxMinPrice["MaxPrice"],2):""); ?></td>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...