Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Wordpress Savoy e-commerse theme enable/disable button

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 392
    Answer it

    Hello,

    I'm working on a E-commerce project with the Savoy theme in WP. I add a custom button in the simple.php file. This button has to be enable only if the user is logged in. Due the fact I'm not an expert of such thing can someone explain me what is the procedure for make something like this? For be clear I will attach the file where I put this button and where I need to have to make this thing. So to resume the button has to be disable if the user is not loggedin and if he or she hover the button should show a message like: please log in to use this button. If you know where I can find examples this too will be nice.

    Thank you a lot. Jakub

 1 Answer(s)

  • Please add the button html or creation code inside the following code to enable button only if the user is logged in.
    is_user_logged_in (){ //create button here }

    In your case , it should be like following snippet :

    single_add_to_cart_text(); ?>


    And for message display on hover, you can use tool tip..Just put the title to the buttton. and it will display on page as a tool tip when user hover on the button..

    single_add_to_cart_text(); ?>

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: