Difference between revisions of "Change star rating images"

From AbleCommerce Wiki
Jump to: navigation, search
(New page: You can find these images in the following directory '''Website\images\ratings'''. Replacing these images with new ones will change the rating images across the store. But if you want to ...)
 
 
(One intermediate revision by one other user not shown)
Line 14: Line 14:
 
</pre>
 
</pre>
 
</code>
 
</code>
 +
Now just change .gif with your new extension for example for this case we will change it as bellow
 +
 +
<code>
 +
<pre>
 +
string ratingImage = page.ResolveUrl("~/images/ratings/rate_" + tempRating.ToString() + ".png");
 +
</pre>
 +
</code>
 +
 +
[[Category:AbleCommerce 7]]

Latest revision as of 11:03, 15 August 2013

You can find these images in the following directory Website\images\ratings. Replacing these images with new ones will change the rating images across the store.

But if you want to use some different format for the images for example if you want to use the png format for the new version of the images. For this first you have to create and put these newly created images into Website\images\ratings folder and then edit the App_Code/NavigationHelper.cs file's

public static string GetRatingImage(LSDecimal rating)

method and change the extension in following code

string ratingImage = page.ResolveUrl("~/images/ratings/rate_" + tempRating.ToString() + ".gif");

Now just change .gif with your new extension for example for this case we will change it as bellow

string ratingImage = page.ResolveUrl("~/images/ratings/rate_" + tempRating.ToString() + ".png");