Forum

Thread tagged as: Problem, Runway, Forms

Perch Shop / Members - Cannot login

Hi,

I have a working shop app on runway. It's been a struggle, but I am almost there.

However, I have a couple of issues, but I will put the second in another thread.

Ultimately, I am trying to build a shop where you can purchase a 'membership'. Having used the 'Nest' demo site as an initial basis, my workflow currently sits at:

Add item to cart Create Member Profile (account) Proceeed to checkout Pay

Whilst I do not currently have a payment gateway added, the workflow works fine, albeit, I will need to somehwo move the registration part to post payment of possible, as otherwise a user could register with the site, stop the checkout process and have a working membership...but that's another story.

The issue is, everything works, fine, I can see a new member being created and added and ALL the details are stored in the DB.

However, if I logout and try to re-enter the login credentials, the login_form.html returns the error that the details do not match the records.

Not sure why ?


Perch Runway: 3.0.8, PHP: 7.0.4, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: f59eb767fe17a6679589b5c076d9fa88d3d4eac0 $, with PDO Server OS: WINNT, apache2handler Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.5.1), perch_events (1.9.5), perch_forms (1.9), perch_shop_orders (1.2.1), perch_shop_products (1.2.1), perch_shop (1.2.1), perch_members (1.6.1), perch_twitter (3.7) App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_twitter', 'perch_events', 'perch_forms', 'perch_members', 'perch_shop', ]; PERCH_LOGINPATH: /admin PERCH_PATH: C:\KDL-Projects\Open\kdl_anticoagulation\www\admin PERCH_CORE: C:\KDL-Projects\Open\kdl_anticoagulation\www\admin\core PERCH_RESFILEPATH: C:\KDL-Projects\Open\kdl_anticoagulation\www\admin\resources Image manipulation: GD PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7 Resource folder writeable: Yes HTTP_HOST: auk.kdl DOCUMENT_ROOT: C:/KDL-Projects/Open/kdl_anticoagulation/www REQUEST_URI: /admin/core/settings/diagnostics/ SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Andrew Kennedy

Andrew Kennedy 0 points

  • 4 years ago

Sorry, my apologies, it was a stupid mistake and me being very, very tired.

The email stored had a missing letter. This will teach me to test with long convoluted bits of data.

Too fast on the keyboard when registering !!!

Just goes to show, check and read and re-read the data stored et al, as it might look the same in a small fault, but often it's a typo that causes the issue. Grrr.

Happy for this thread to be removed !

Andrew. What you need to do is setup a product in shop which is the membership fee, add a tag to the product so when the membership fee is paid, a tag is set on the member. Then in all pages which have membership restrictions test for the presents of the tag before showing content. You can also restrict pages based on member tags in the page options for all pages.

Hi Robert,

Thank you for your reply.

I will take a look at trying to implement this.

I think I follow what you are saying, but I will probably be back for some more advice.

Thanks,

Andy

Hi Robert,

Thank you for your advice.

I was getting a tad lost until the penny dropped on how to implement what you were saying.

Just replacing my:

if (perch_member_logged_in())

to:

if (perch_member_has_tag('subscriber')) {
     ...
}

worked perfectly, as now they only get the 'content' when checkout is complete.

Fantastic, could not see the wood for the trees. So simple in the end. I think sometimes we desperately try and think the solution is much more difficult than it is.

Learning all the time and this is my first installation of the shop app. I have to say, it's a little tricky, but it's getting there.

As always, thanks for all your help. Very appreciated.

No problem. Always happy to help...