Options

Removing Buy button from all galleries

richpepprichpepp Registered Users Posts: 360 Major grins
edited September 20, 2013 in SmugMug Customization
If anyone wants the css for this it is simply

.sm-gallery-buymenu {display:none}

I'm just adding this here in case anyone else is searching for it. We have a lot of galleries and I spotted that not all of them had been set with printing off. As I don't seem able to do that in bulk it seemed faster just to do it with css.

Loving the new smugmug. Got rid of most of my old code with just a few little bits like this left now

Comments

  • Options
    WinkXR6TWinkXR6T Registered Users Posts: 61 Big grins
    edited August 6, 2013
    I tried this hoping that the Owner Buy button would go away, but it's still there. Anyone know the CSS to hide that button?
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 6, 2013
    WinkXR6T wrote: »
    I tried this hoping that the Owner Buy button would go away, but it's still there. Anyone know the CSS to hide that button?

    You only see owner buy when you are logged in so do you really need to remove it? In any case the same code still appears to work (I just tried it on my galleries). Are you sure that you have applied the css to the whole site and not to a particular gallery? What I did was go to customise entire site and add a css section at the top. I then plugged the css code in there
  • Options
    WinkXR6TWinkXR6T Registered Users Posts: 61 Big grins
    edited August 6, 2013
    I do really want to get rid of it. I'm never going to use it so I don't need it there.

    I added the code to the entire site theme CSS. Sounds like I need to add it as you've mentioned above. Thanks :)
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 6, 2013
    WinkXR6T wrote: »
    I added the code to the entire site theme CSS. Sounds like I need to add it as you've mentioned above. Thanks :)

    I tried placing it there on my site as well and it works perfectly. However the note beside the CSS link says that it only applies to every page that the theme applies to so maybe you have an issue with the theme used on different pages. I think that the way I did it bypasses that problem
  • Options
    basfltbasflt Registered Users Posts: 1,882 Major grins
    edited August 6, 2013
    try this , maybe it helps ?
    .sm-gallery-buymenu {
    display: none;
    }
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 7, 2013
    I think if you type it in the format I originally used '.sm-gallery-buymenu {display:none}' it gets changed into the nicely reformatted version you show (or at least it did when I tried it). It's a nice feature really
  • Options
    WinkXR6TWinkXR6T Registered Users Posts: 61 Big grins
    edited August 7, 2013
    Nope. Doesn't work for me. It is applied to site wide CSS and all the galleries are using that theme.

    Edit: Figured it out (sort of)... It doesn't hide the button while using the Journal gallery style.
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 7, 2013
    WinkXR6T wrote: »
    Edit: Figured it out (sort of)... It doesn't hide the button while using the Journal gallery style.

    Interesting - I've never used that style. I'll need to see what the difference is
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 7, 2013
    WinkXR6T wrote: »
    Edit: Figured it out (sort of)... It doesn't hide the button while using the Journal gallery style.

    Yep, you're correct - it is a bit different in that style of gallery. You need to add this code as well

    .sm-gallery-buy-icon {
    display: none;
    }
  • Options
    WinkXR6TWinkXR6T Registered Users Posts: 61 Big grins
    edited August 7, 2013
    I added both codes to the site wide CSS and it's still there for me... Odd :(
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 7, 2013
    now that's mad. I just switched one gallery to journal to check it, BUT - I didn't see the icon beside each image as OwnerBuy, I saw it as AddToCart. I wonder if there is yet another difference. I'll take another look (as I need to make sure it works on my site as someone else usually updates the content)

    Edit: Just checked and the same code works for OwnerBuy using the Journal style on one of my galleries. Can you point us at which gallery you are looking at or is it private? Even without being logged in we may be able to see a bit better what the differences are
  • Options
    WinkXR6TWinkXR6T Registered Users Posts: 61 Big grins
    edited August 7, 2013
    I checked all of mine.

    Site is www.photosbyadamlee.com
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 7, 2013
    I just checked and I can't see what the differences between your version of journal and mine is - sorry. Depending on which browser you are using you may be able to see what the class of the button is. I normally use Google Chrome and on that what you would do is

    1. Go to a gallery where you see this problem
    2. In Chrome press Ctrl-Shift-I to bring up developer tools. You should get a new half to your browser window appearing at the bottom
    3. In the new developer window click on the 'Elements' tab on the left
    4. Press Ctrl-F to start a find and then type 'Owner Buy' (without the quotation marks) to find the first owner buy button. The bottom left window should scroll to the line of code containing the owner buy button

    And now you have to take care. The first class you see is something like 'sm-button-label' but that is far too general to hide. You need to look for the appropriate container class. In this case the next one up is 'sm-gallery-buy-icon' and it's clear what that does. On the right hand side of the bottom window you should see a window called 'Matched CSS rules' and if you have done everything correctly you should see .sm-gallery-buy-icon {display: none;}

    You can also post up here the code you see around the Owner buy button and we can see which to use. e.g on a non journal gallery I see




    Owner Buy



    Good luck

    Rich
  • Options
    WinkXR6TWinkXR6T Registered Users Posts: 61 Big grins
    edited August 7, 2013
    Got it to work!

    The CSS commands had to be in a CSS box. Not the site wide theme CSS.

    I already had a CSS box at the footer to hide the 'powered by Smugmug' line so I just added the lines there. Works great! Thanks for the help! :)
  • Options
    richpepprichpepp Registered Users Posts: 360 Major grins
    edited August 7, 2013
    WinkXR6T wrote: »
    Got it to work!

    The CSS commands had to be in a CSS box. Not the site wide theme CSS.

    I already had a CSS box at the footer to hide the 'powered by Smugmug' line so I just added the lines there. Works great! Thanks for the help! :)

    Awesome - well done. I misread your earlier messages and assumed that 'site-wide CSS' referred to the CSS box and not the theme
  • Options
    juanherediajuanheredia Registered Users Posts: 345 Major grins
    edited September 20, 2013
    WinkXR6T wrote: »
    Got it to work!

    The CSS commands had to be in a CSS box. Not the site wide theme CSS.

    I already had a CSS box at the footer to hide the 'powered by Smugmug' line so I just added the lines there. Works great! Thanks for the help! :)

    Yes, I got it worked too. Just to say that the CSS box must be at "All Galleries" Section. This is far enough

    .sm-gallery-buymenu {
    display: none;
    }
Sign In or Register to comment.