Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 32 of 32

Thread: Rating Box

  1. #1
    osdude is offline Senior Member
    Join Date
    Nov 2007
    Location
    earth
    Posts
    202

    Default Rating Box

    Is there a way to delete the rating box without the source code?

    ANd if you can't delete it, can you change the order of the ratings so "Terrible" isn't at top?

  2. #2
    osdude is offline Senior Member
    Join Date
    Nov 2007
    Location
    earth
    Posts
    202

    Default

    I put this is the wrong category, I meant to put it in "ML"

    sorry

  3. #3
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    How about setting appconfig 'RatingsEnabled' to false?



    TTFN

    BFG

  4. #4
    osdude is offline Senior Member
    Join Date
    Nov 2007
    Location
    earth
    Posts
    202

    Default

    that would get rid of the ratings, but it disables all ratings and not just the rating box.

    I would like to remove the area shaded in red and keep the rating and comments.
    Attached Images Attached Images  

  5. #5
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Ahh - I see what you mean.

    Thinking out loud here.... You could wrap the entire ratings 'module' in a div (just so you can select it easier) & then hide the relevant table with css.


    TTFN

    BFG

  6. #6
    osdude is offline Senior Member
    Join Date
    Nov 2007
    Location
    earth
    Posts
    202

    Default

    I tried hidding with CSS, but with no luck.

    I was using the page.recentcomments.xml.config for the hidden div, but maybe it's somewhere else? recentcomments.aspx/.cs don't seem to be the place and rateit and ratecomment don't seem to be the right place either.

    I turned cache off and cleared cahce each time, just to be sure.

  7. #7
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    In your xmlpackage, you'll have something like this :-

    C#/VB.NET Code:
    <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/> 
    If you wrap that in a new div like this :-

    C#/VB.NET Code:
    <div id="ratings-hider"><xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/></div

    You should then be able to hide the relevant table with css - it looks like the first grandchild table of ratings-hider.


    TTFN

    BFG

  8. #8
    osdude is offline Senior Member
    Join Date
    Nov 2007
    Location
    earth
    Posts
    202

    Default

    Yes the product XML was the first try and it hides the whole ratings box and not just the "upside down" rating slider box (in red above).

    I'm thinking that the source IS needed to accomplish this

  9. #9
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    OK - here goes.......

    1. Copy this file into your jscripts directory.

    2. Add the following to your template.ascx
    HTML Code:
    <script type="text/javascript" src="jscripts/jquery.js"></script>
    3. Replace this :-

    HTML Code:
    <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/>
    in your xmlpackage with this :-
    HTML Code:
    <script>
    $(document).ready(function(){
       $("#rating-hider table table table:first").remove();
    });
    </script>
    <div id="rating-hider">
    <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/>
    </div>
    4. Buy me a beer & we can chat about how great I am......



    You can see it in action here.


    TTFN

    BFG

  10. #10
    Rex is offline Banned
    Join Date
    Nov 2007
    Posts
    561

    Default

    This one will get rid of the redunant "Only registered...blah blah"

    Add this to the end of your <template match="/">:


    Code:
    <xsl:text disable-output-escaping="yes">
    <![CDATA[
    <script type="text/javascript">			
    (function(listener,evt,func){ listener.attachEvent ? listener.attachEvent('on'+evt,func) : listener.addEventListener(evt,func,false);})(window,'load',function(evt){
    var el = document.getElementsByTagName('TD');									
    for(var i=0;i < el.length;i++) if(el.item(i).innerText == '1 - Terrible') { el = el.item(i);break; }
    while(el && el.tagName != 'TABLE') el = el.parentNode;
    el = el.parentNode;
    while(el && el.tagName != 'TABLE') el = el.parentNode;
    el && el.parentNode && el.parentNode.removeChild(el.previousSibling) && el.parentNode.removeChild(el.previousSibling) && el.parentNode.removeChild(el);
    });
    </script>
    ]]>
    </xsl:text>

  11. #11
    osdude is offline Senior Member
    Join Date
    Nov 2007
    Location
    earth
    Posts
    202

    Default

    Quote Originally Posted by BFG 9000 View Post
    Buy me a beer & we can chat about how great I am......

    TTFN

    BFG

    Done!

    Since you're probably not too close to here, have PayPal? I think I can spot you a few beers

    PM me

  12. #12
    jazzylily is offline Member
    Join Date
    Nov 2007
    Posts
    36

    Default

    Quote Originally Posted by ASPDNSF Staff - Rex View Post
    This one will get rid of the redunant "Only registered...blah blah"

    Add this to the end of your <template match="/">:


    Code:
    <xsl:text disable-output-escaping="yes">
    <![CDATA[
    <script type="text/javascript">			
    (function(listener,evt,func){ listener.attachEvent ? listener.attachEvent('on'+evt,func) : listener.addEventListener(evt,func,false);})(window,'load',function(evt){
    var el = document.getElementsByTagName('TD');									
    for(var i=0;i < el.length;i++) if(el.item(i).innerText == '1 - Terrible') { el = el.item(i);break; }
    while(el && el.tagName != 'TABLE') el = el.parentNode;
    el = el.parentNode;
    while(el && el.tagName != 'TABLE') el = el.parentNode;
    el && el.parentNode && el.parentNode.removeChild(el.previousSibling) && el.parentNode.removeChild(el.previousSibling) && el.parentNode.removeChild(el);
    });
    </script>
    ]]>
    </xsl:text>

    I cant get this to work for me. Is there not a way to just change the text in this box without changing the source?

  13. #13
    smg2 is offline Member
    Join Date
    Feb 2007
    Posts
    53

    Default What XML package?

    I'm looking to remove the chart as well. What XML package am I supposed to modify? I am running ML 7.0.1.1.

    Thanks!

  14. #14
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Quote Originally Posted by smg2 View Post
    I'm looking to remove the chart as well. What XML package am I supposed to modify? I am running ML 7.0.1.1.

    Thanks!
    Whichever xmlpackage you're using to display products.


    TTFN

    BFG

  15. #15
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    RE: "Is there not a way to just change the text in this box without changing the source?"

    all text on the site is editable in string resources (in the admin site). Source not needed for that. Thx.
    AspDotNetStorefront
    Shopping Cart

  16. #16
    Diana is offline Senior Member
    Join Date
    May 2006
    Posts
    179

    Default

    Thanks for the trick, BFG 9000. It worked fine for me. Let me know how I can help you in turn...

  17. #17
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Hey Diana - No Problem,

    I'm sure I'll need some SQL help in the future (seem to remember you know your SQL pretty well?).


    TTFN

    BFG

  18. #18
    GraphicAudio is offline Member
    Join Date
    Jun 2007
    Posts
    48

    Default

    Where exactly in the xml package does this get placed? I tried multiple spots in the code and it will not remove the "(Only registered customers can rate)".

    Does it get pasted on the line right after <template match="/">?

    Quote Originally Posted by Rex View Post
    This one will get rid of the redunant "Only registered...blah blah"

    Add this to the end of your <template match="/">:


    Code:
    <xsl:text disable-output-escaping="yes">
    <![CDATA[
    <script type="text/javascript">			
    (function(listener,evt,func){ listener.attachEvent ? listener.attachEvent('on'+evt,func) : listener.addEventListener(evt,func,false);})(window,'load',function(evt){
    var el = document.getElementsByTagName('TD');									
    for(var i=0;i < el.length;i++) if(el.item(i).innerText == '1 - Terrible') { el = el.item(i);break; }
    while(el && el.tagName != 'TABLE') el = el.parentNode;
    el = el.parentNode;
    while(el && el.tagName != 'TABLE') el = el.parentNode;
    el && el.parentNode && el.parentNode.removeChild(el.previousSibling) && el.parentNode.removeChild(el.previousSibling) && el.parentNode.removeChild(el);
    });
    </script>
    ]]>
    </xsl:text>

  19. #19
    tuffy is offline Member
    Join Date
    Nov 2008
    Posts
    76

    Default

    Quote Originally Posted by BFG 9000 View Post
    OK - here goes.......

    1. Copy this file into your jscripts directory.

    Does anyone still have that file?

  20. #20
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    BFG, nice Javascript work there!

    The ASPDNSF product rating system has to be high in the list of priorities for a re-write. Let's face it, it's unchanged since at least v7 and is looking very dated now.

    All of the new clients we work with ask us to either remove it or re-write it.

    Come on Vortx, give us a nice new system based on Ajax with the business logic independent of the layout and styling and a range of configuration settings to switch features on/off. Give some integration options for social networks.

    If you are serious about an 'SEO friendly' system, then user generated content, discussions and ratings for products is a top feature.

    Off my soapbox now!
    Adam

  21. #21
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Just wanted to say that WebOpius did a great job with our new Ratings system! It fits our sites perfectly.

  22. #22
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Quote Originally Posted by tuffy View Post
    Does anyone still have that file?
    That actual file is now here.

    That being said however - you'd be better using this.


    TTFN

    BFG

  23. #23
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Quote Originally Posted by webopius View Post
    BFG, nice Javascript work there!
    Thanks Mate!

    Quote Originally Posted by webopius View Post
    The ASPDNSF product rating system has to be high in the list of priorities for a re-write. Let's face it, it's unchanged since at least v7 and is looking very dated now.

    All of the new clients we work with ask us to either remove it or re-write it.

    Come on Vortx, give us a nice new system based on Ajax with the business logic independent of the layout and styling and a range of configuration settings to switch features on/off. Give some integration options for social networks.

    If you are serious about an 'SEO friendly' system, then user generated content, discussions and ratings for products is a top feature.
    Agree completely - I no longer use the standard reviews system for exactly these reasons.


    TTFN

    BFG

  24. #24
    tuffy is offline Member
    Join Date
    Nov 2008
    Posts
    76

    Default

    Meaning the 1.5.1 version?
    Thanks a bunch! You're the best

  25. #25
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Quote Originally Posted by tuffy View Post
    Meaning the 1.5.1 version?
    Thanks a bunch! You're the best
    I'd always use the latest version if possible - but more specifically - I'd recommend using the Google hosted version rather than hosting it yourself.


    TTFN

    BFG

  26. #26
    moodswingsonthenet is offline Junior Member
    Join Date
    Jul 2009
    Posts
    7

    Default Rating drop-down

    Hi BFG9000,
    Thank you for the info on how to remove the ratings box. It works! However, I still have the blank drop down menu that I can't get rid of. I am hoping you can tell me how to hide it. I keep being told to hide it in the stylesheets but can't figure out how to do it. I do not have source code. Thank you, I appreciate your time. This thread has been really helpful. Thanks.
    Patty
    Attached Images Attached Images  

  27. #27
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Hi Patty,

    I haven't tested this - but a quick look at your code makes me think something very close to this would work :-


    HTML Code:
    <script>
    $(document).ready(function(){
       $("#rating-hider table table select").remove();
    });
    </script>
    or in your css you could add this :-

    HTML Code:
    #rating-hider table table select {display: none;}

    TTFN

    BFG
    Last edited by BFG 9000; 03-27-2011 at 10:37 AM. Reason: typo

  28. #28
    moodswingsonthenet is offline Junior Member
    Join Date
    Jul 2009
    Posts
    7

    Default Dropdown in Product Reviews

    Hi BFG,
    Thank you for your help! I tried script entry as you suggested and it got rid of the dropdown, but the table was displaying again. So I put 2 scripts in to get it to work. Do you know how to consolidate these into a single script? I wasn't successful.
    Thank you again, Patty


    HTML Code:
    <script>
    $(document).ready(function(){
       $("#rating-hider table table table:first").remove();
    });
    </script>
    <script>
    $(document).ready(function(){
       $("#rating-hider select").remove();
    });
    </script>

  29. #29
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Something like this :-

    HTML Code:
    <script>
    $(document).ready(function(){
       $("#rating-hider table table table:first").remove();
       $("#rating-hider select").remove();
    });
    </script>

    TTFN

    BFG

  30. #30
    moodswingsonthenet is offline Junior Member
    Join Date
    Jul 2009
    Posts
    7

    Default Thanks!

    Hi BFG
    Thanks, it works perfect!!!! I really appreciate it!
    Patty

  31. #31
    tuffy is offline Member
    Join Date
    Nov 2008
    Posts
    76

    Default

    It worked great!
    I'm just having a problem finding where I can get rid border, hr, and ratingsexpanded.gif. It's a little redundant with the tabbed product page. Please tell me it's not hard coded and I'm just being retarded. MS V9, in case that matters.


    Thanks a bunch!

  32. #32
    tuffy is offline Member
    Join Date
    Nov 2008
    Posts
    76

    Default

    I figured it out! In case anyone else has that problem, here's what I did.

    I replaced this:
    <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1)" disable-output-escaping="yes"/>

    With this:
    <xsl:value-of select="aspdnsf:ProductRatings(ProductID, 0, 0, 0, 1, 0)" disable-output-escaping="yes"/>

    I'm using this product page (http://www.aspdotnetstorefront.com/p...dropdowns.aspx) That probably had something to do with it.

    Thanks for all the help!