The "coupon code manager overview page" will not display added coupons on a fresh 3.4.2 Wo

I couldn't get the added coupons to show up (I verified and passed membership tables checks)?

So I tried it on a brand spanking new installation (3.4.2) and it still didn't display coupons I added?

I probably overlooked some option, please help me with this ASAP :wink:

  • karmikovic
    • Design Lord, Child of Thor

    Hey guys,

    I realize you are probably up to your ears in tickets, but just thought I'd let you know I am still waiting on an answer and have tried and retried getting the coupons to display.

    (using a coupon code will work, but it is not displayed in the overview screen)

    I will continue to keep this tab open and checking for responses.

    Thank you for reviewing this ticket,
    jon

  • Arun Basil Lal
    • New Recruit

    Hey Jon,

    I just tried it out and it worked well for me, See the screenshot attached.

    Please go over to Membership options ad do the Repair Membership tables. Its very strange that it doesn't work on a new install though, but still lets make sure we have got everything covered. (Don't just verify, please do repair).

    Let me know.

    Sorry for the delay in response, it gets a bit slow over the weekend, since people are away for the weekend. And bumping actually delays it because we process the oldest standing thread first when we do it. Your original post was about 24 hours go, but the bump at about 14 hours ago made the thread fresher than most of the other thread. Just a note. :slight_smile:

  • karmikovic
    • Design Lord, Child of Thor

    Hello Arun,
    I hope you've been well.

    Yes, I just tried it again on a fresh (non-multisite) install of 3.4.2 on my localhost WAMP environment and only the membership plugin activated. I created a basic membership with 2 default levels. Then I added coupons which said they were created but nothing showed on the overview page. I tested the coupons and they worked even though they weren't visible.

    I am going to try it on a couple different hosting environments and see if the issue was with my WAMP setup...

  • karmikovic
    • Design Lord, Child of Thor

    Alright, I've have now tested this plugin on a new domain and server, setup on cough, cough, Godaddy. I can confirm with a fresh 3.4.2 non-multisite setup and NO other plugins installed or activated, the Membership Premium plugin will NOT display added coupons!

    I used this plugin in the past and it always worked fine, but now I KNOW it is not a plugin conflict, unless it is conflicting with "hello dolly", lol!

    Perhaps there is a setup option I am missing? I find it strange that it would work for others and not me on a fresh current & stable 3.4.2 installation, please look into this as soon as you can!

    Thanks guys, I appreciate you looking into this problem! I will keep this tab open and check back every 15 minutes!

  • karmikovic
    • Design Lord, Child of Thor

    Okay,

    Guys, this has me stumped.

    Arun, said he tested it and it worked for him...(He really does a great job on the forums, thanks Arun)

    I am going to try it again.

    I have already tried it twice on WAMP and Godaddy hosting, I am going to try it again with a Fresh 3.4.2 installation and only the membership plugin installed...

    Here Goes...

    Nope, coupons added still don''t show! -Guys I am using a Fresh Install and Fresh download of Premium Membership. Politely I must say, I really think there is a problem with the plugin!

    Now I have looked around and found a couple recent threads.


    I found a recent thread mentioning problems with coupon display!

    And I found another recent thread...

    I have waited for a response and tried not to bump my thread hoping someone would check it out, even if just to tell me there are problems currently with the membership plugin's coupon system (it would've saved me a lot of time).

    I have a project that must be finished soon and I would like to get to use this plugin, please help!

    I just ask that you set it up on a fresh install and test it by adding coupons, then take note on whether they are displayed and let me know if it works for you.

    Also, I want to say thank you for your continued support.

    Jon

  • Timothy Bowers
    • Chief Pigeon

    Hey there.

    Arun is no longer with us. My apologies for the slow support on this one.

    Which version are you using of our Membership?

    There was an issue in a past version I believe but it was fixed.

    I'm personally signing off shortly (1am here) but perhaps I could take a look if using the latest version does not work. Would be that be ok?

    Let me know.

  • karmikovic
    • Design Lord, Child of Thor

    I am using the latest version of membership, live from the premium wpmudev membership download button link.

    I am using the latest version of WordPress.

    The membership coupons don't work. (they won't display)

    Please check it out and see what I am talking about.

    I will definitely be keeping up with this thread until this issue is solved!

    Thanks wpmudev,
    Jon

  • Timothy Bowers
    • Chief Pigeon

    Hey there, it's fixed now. :slight_smile:

    /membership/membershipincludes/classes/membershipadmin.php Line 6811:

    if(!is_network_admin()) {
    	// We are on a single site admin interface
    	$sql .= $this->db->prepare( "WHERE site_id = %d", $this->db->blogid );
    }

    You're on a single site install, so when your not a network admin it was then trying to add the WHERE is the SQL statement.

    So it can either be removed for now or changed to:

    if(is_network_admin()) {
    	// We are on a single site admin interface
    	$sql .= $this->db->prepare( "WHERE site_id = %d", $this->db->blogid );
    }

    That will work as a temporary solution until Barry makes a more permanent fix.

    If any one struggles with this or isn't confident with PHP then they can contact our staff to have this done for them. Post here or use the contact forms.

    Take care.

  • Timothy Bowers
    • Chief Pigeon

    Yup.

    The ! is php for not.

    So it's saying if is not Network Admin then run this code. It then runs the extra SQL which is saying WHERE the site id = SOMETHING.

    In a single site there is no network admin nor blogID.

    My suggestion removes that from the get_coupon method.

    Barry will be able to provide a permanent fix in the next release but this should work for you now.

    Take care.

  • opus13
    • Site Builder, Child of Zeus

    For those wondering:

    1. The "edit line 6811" reference is in the "wp-content/plugins/membership/membershipincludes/classe/membershipadmin.php" file.

    2. Note: some editors have the needed call on 6812. It's not far away, I swear. Simply remove the exclamation mark from the line. Do not touch anything else.

    3. You can either edit this file on your machine and upload, overwriting the original, or edit in-transit using (many ftp applications).

    4. Save the edit, and refresh the directory view to make sure the edited file has an updated timestamp.

    5. Go to your WP-admin area and go Membership>Coupons.

    6. You should now see all previous coupon entries that you attempted to create.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.