0

Commerce don't give me any customize options for the user profile of the user, I don't want the "Payment method" tab to appear in the user profile, how can I cleanly remove/disable this?

Can someone confirm me if it's work with tab tamer? I read this issue: How to add / remove tabs from user profile? But i can't use it because i have bootstrap barrio as theme and the module have a problem with barrio ...

5
  • 1
    Does this answer your question? How to add / remove tabs from user profile? Commented Aug 23, 2022 at 11:34
  • Specifically, see this answer: drupal.stackexchange.com/a/227991/5147 You'll need to add some code to a custom module to remove it if Tab Tamer doesn't work for your theme. Commented Aug 23, 2022 at 11:37
  • What about simply not granting the "Manage own payment methods" permission? That is a simple solution that doesn't require coding? Commented Aug 26, 2022 at 9:43
  • So having to write a few lines of code means Commerce isn't mature enough? So what is your suggestion? We create an admin page to disable all routes defined by Commerce? > I've been dealing with Drupal Commerce 2 since D8,D9 for 3 years now and I have to regret this decision... I have the feeling it will never really finished and it's nothing for simple users... the time I've invested... never again a shop with Drupal So all of this frustration just for a simple problem like this? As far as I know, no-one forced you to use Drupal Commerce... I'm here trying to help you and I'm getting a rant b Commented Aug 31, 2022 at 7:44
  • I'm sorry, it wasn't meant to be a personal attack, but I've accumulated a lot in these 3 years... It's not your fault, this problem is harmless but I often get frustrated. All ok .. and thank you and the full team for the work on Commerce
    – Terminator
    Commented Aug 31, 2022 at 9:16

2 Answers 2

0

this is not a solution, if i change this permission the tab is is from the user profile removed, this is correct, BUT the problem of this permission change is that all users can't select anymore a payment method if they want to buy a product... it is not only for the user page... i solved it with a custom module, but it's sad that Commerce isn't mature enough to solve something like this without extra code either, I've been dealing with Drupal Commerce 2 since D8,D9 for 3 years now and I have to regret this decision... I have the feeling it will never really finished and it's nothing for simple users... the time I've invested... never again a shop with Drupal

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Aug 30, 2022 at 11:51
0

I solved it simply in CSS. Drupal is often overcomplicated. Maybe not the "Drupal way" but outcome is the same:

.path-user .tabs--primary a[href*="payment-methods"] {
    display: none;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.