Forum

Thread tagged as: Question, Problem, Shop

Perch Shop customer registration

HI,

I'm trying to register a customer to a new shop installation using the following:


if (!perch_member_logged_in()) { // Returning customer login form perch_shop_login_form(); // New customer sign up form perch_shop_registration_form(); }

After filling in the form and clicking register it says 'Thanks' but when checking in the back end there is nothing under the members app including pending, and when I try to login with those details it says 'Those details don't match our records'.

Not sure if I've missed something here that's stopping this from functioning. Here's my diagnostic:


Perch: 2.8.29 Production mode: Production (100) Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_blog (5.0), perch_events (1.7), perch_mailchimp (2.0.1), perch_shop_orders (1.0), perch_shop_products (1.0), perch_shop (1.0.1), perch_members (1.5) DB driver: PDO DB tables: perch2_blog_authors (2), perch2_blog_categories (2), perch2_blog_comments (25), perch2_blog_index (5047), perch2_blog_posts (174), perch2_blog_posts_to_categories (25), perch2_blog_posts_to_tags (61), perch2_blog_sections (1), perch2_blog_tags (55), perch2_blogs (1), perch2_categories (14), perch2_category_counts (5), perch2_category_sets (2), perch2_content_index (840), perch2_content_items (763), perch2_content_regions (43), perch2_events (117), perch2_events_categories (1), perch2_events_to_categories (37), perch2_mailchimp_campaigns (3), perch2_mailchimp_history (2), perch2_mailchimp_log (7), perch2_mailchimp_stats (1), perch2_mailchimp_subscribers (0), perch2_members (1), perch2_members_forms (0), perch2_members_member_tags (0), perch2_members_sessions (0), perch2_members_tags (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (25), perch2_resource_log (1937), perch2_resource_tags (1), perch2_resources (1298), perch2_resources_to_tags (2), perch2_settings (48), perch2_shop_addresses (0), perch2_shop_admin_index (22), perch2_shop_brands (1), perch2_shop_cart (24), perch2_shop_cart_data (13), perch2_shop_cart_items (10), perch2_shop_countries (248), perch2_shop_currencies (152), perch2_shop_customers (0), perch2_shop_emails (1), perch2_shop_index (791), perch2_shop_option_values (0), perch2_shop_options (0), perch2_shop_order_items (0), perch2_shop_order_promotions (0), perch2_shop_order_statuses (9), perch2_shop_orders (0), perch2_shop_orders_meta (1), perch2_shop_product_files (0), perch2_shop_product_option_values (0), perch2_shop_product_options (0), perch2_shop_product_tags (0), perch2_shop_products (21), perch2_shop_promotions (0), perch2_shop_search (21), perch2_shop_shipping_zone_countries (1), perch2_shop_shipping_zones (1), perch2_shop_shippings (1), perch2_shop_tax_exhibits (0), perch2_shop_tax_group_rates (0), perch2_shop_tax_groups (1), perch2_shop_tax_locations (1), perch2_shop_tax_rates (1), perch2_shop_variants (0), perch2_user_passwords (0), perch2_user_privileges (56), perch2_user_role_privileges (34), perch2_user_roles (2), perch2_users (2) Users: 2 App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_events', 'perch_blog', 'perch_mailchimp', 'perch_members', 'perch_shop', ); ?> Scheduled tasks for perch_blog: delete_spam_comments (1440 mins) Scheduled tasks for perch_mailchimp: update_list_stats (60 mins) Editor plug-ins: markitup, ckeditor H1: 97fc7384fa9c8b9107ad92774a904cb9 L1: 52f6834471e2216ad3f61906c462321c F1: 2edba60ed1f613d6dd804feb202456a2 headerColour: #ffffff content_singlePageEdit: 1 helpURL: hideBranding: 1 content_collapseList: 1 lang: en-gb update_2.1.3: done latest_version: 2.8.15 perch_plantcats_post_url: /plantcats/post.php?s={postSlug} perch_plantcats_plant_url: /plantcats/plant.php?s={plantSlug} headerScheme: light perch_plantcats_slug_format: %Y-%m-%d-{plantTitle} perch_plantcats_akismet_key: dashboard: 0 content_hideNonEditableRegions: 0 perch_plantcats_comment_notify: 0 logoPath: /admin/resources/logo.jpg perch_shop_product_url: /shop/product.php?s={productSlug} perch_shop_display_oos: 1 perch_shop_paypal_email: cookslaneherbs@googlemail.com perch_events_detail_url: event.php?event={eventSlug} perch_blog_slug_format: %Y-%m-%d-{postTitle} perch_blog_akismet_key: perch_blog_comment_notify: 0 on_sale_version: 2.8.29 update_2.3.4: done update_2.8.25: done hide_pwd_reset: 0 content_frontend_edit: 0 perch_mailchimp_secret: 45f9e6204253a2b81e04a6351324b80d perch_mailchimp_update: 2.0 perch_mailchimp_api_key: 7c68e7cfb144c9d41c414caf372126ed-us3 perch_mailchimp_list_id: e983bbcfef perch_mailchimp_campaign_url: /mailchimp/campaign.php?s={campaignSlug} siteURL: https://cookslaneshopsite:8888 perch_blog_update: 5.0.1 perch_blog_site_name: perch_blog_max_spam_days: 0 perch_blog_post_url: https://cookslaneshopsite:8888/blog/post.php?s={postSlug} update_2.8.29: done perch_members_login_page: /members/login.php?r={returnURL} perch_shop_price_tax_mode: exc perch_shop_site_url: https:// perch_shop_default_currency: 47 perch_shop_reporting_currency: 47 perch_shop_invoice_number_format: Invoice%d perch_members_update: 1.4 PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: web172-cook_18ln PERCH_DB_SERVER: localhost PERCH_DB_DATABASE: web172-cook_18ln PERCH_DB_PREFIX: perch2_ PERCH_TZ: UTC PERCH_EMAIL_FROM: alex@designjungle.co.uk PERCH_EMAIL_FROM_NAME: Alex Bennett PERCH_LOGINPATH: /admin PERCH_PATH: /home/sites/cookslaneherbs.co.uk/public_html/admin PERCH_CORE: /home/sites/cookslaneherbs.co.uk/public_html/admin/core PERCH_RESFILEPATH: /home/sites/cookslaneherbs.co.uk/public_html/admin/resources PERCH_RESPATH: /admin/resources PERCH_HTML5: 1 PERCH_RUNWAY: PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_RUNWAY_ROUTED: PERCH_STRONG_PASSWORDS: PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /home/sites/cookslaneherbs.co.uk/public_html/admin/templates PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_RWD: PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_PARANOID: PERCH_FORCE_SECURE_COOKIES: PERCH_PASSWORD_MIN_LENGTH: 6 PERCH_MAX_FAILED_LOGINS: 10 PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR PERCH_VERIFY_UPLOADS: PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: PERCH_SESSION_TIMEOUT_MINS: 20 PERCH_APPS_EDITOR_PLUGIN: markitup PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile HOSTING SETTINGS PHP: 5.5.35 Zend: 2.5.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $ MySQL server: 5.5.47 Free disk space: 51.00 GB Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, bcmath, curl, dom, enchant, fileinfo, gd, imap, intl, json, ldap, exif, mcrypt, mssql, mysqlnd, mysql, mysqli, odbc, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, recode, soap, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader, Zend Guard Loader GD: Yes ImageMagick: No PHP max upload size: 64M PHP max form post size: 64M PHP memory limit: 128M Total max uploadable file size: 64M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes PATH: /usr/local/bin:/usr/bin:/bin UNIQUE_ID: Vz8YE38AAAEAAEct@kQAAAAp SCRIPT_URL: /admin/core/settings/diagnostics/ SCRIPT_URI: https://cookslaneherbs.co.uk/admin/core/settings/diagnostics/ HTTP_HOST: cookslaneherbs.co.uk HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_COOKIE: cmsa=1; cookiesDirective=1; PHPSESSID=ma51oh5gbo1p68a6iph6pgant4 HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/537.86.5 HTTP_ACCEPT_LANGUAGE: en-us HTTP_REFERER: https://cookslaneherbs.co.uk/admin/core/settings/diagnostics/ HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_CONNECTION: close SERVER_SIGNATURE: <address>Apache/2.4.18 (Unix) Server at cookslaneherbs.co.uk Port 80</address> SERVER_SOFTWARE: Apache/2.4.18 (Unix) SERVER_NAME: cookslaneherbs.co.uk SERVER_ADDR: 10.0.1.172 SERVER_PORT: 80 REMOTE_ADDR: 82.14.204.167 DOCUMENT_ROOT: /home/sites/cookslaneherbs.co.uk/public_html REQUEST_SCHEME: http CONTEXT_DOCUMENT_ROOT: /home/sites/cookslaneherbs.co.uk/public_html SERVER_ADMIN: root@localhost SCRIPT_FILENAME: /home/sites/cookslaneherbs.co.uk/public_html/admin/core/settings/diagnostics/index.php REMOTE_PORT: 59181 GATEWAY_INTERFACE: CGI/1.1 SERVER_PROTOCOL: HTTP/1.1 REQUEST_METHOD: GET QUERY_STRING: extended REQUEST_URI: /admin/core/settings/diagnostics/?extended SCRIPT_NAME: /admin/core/settings/diagnostics/index.php PHP_SELF: /admin/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1463752723.7049 REQUEST_TIME: 1463752723

Thanks

Alex Bennett

Alex Bennett 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you changed the templates at all, or are you using the defaults?

Just the defaults - I presume it's customer_create.html?

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug, what does it output when you post the form?

Okay - this might be making more sense - does this mean the members tables haven't been created?


Debug Message [1] SELECT * FROM perch2_pages WHERE pagePath='/shop/checkout.php' LIMIT 1 [1] SELECT * FROM perch2_shop_cart WHERE cartID=8 [1] SELECT * FROM perch2_shop_cart WHERE cartID=8 [46] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 SELECT COUNT(*) FROM perch2_members WHERE memberPassword IS NOT NULL AND memberEmail='alexbennett1977@gmail.com' [] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cookslaneshopsite.perch2_members' doesn't exist SELECT COUNT(*) FROM perch2_members WHERE memberPassword IS NOT NULL AND memberEmail='alexbennett1977@gmail.com' [] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cookslaneshopsite.perch2_members' doesn't exist SELECT * FROM perch2_members_forms WHERE formKey='register' LIMIT 1 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cookslaneshopsite.perch2_members_forms' doesn't exist INSERT INTO perch2_members_forms(formKey,formTitle,formSettings) VALUES('register','Registration form','') Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cookslaneshopsite.perch2_members_forms' doesn't exist [10] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/shop/checkout.php' OR regionPage='*' ORDER BY regionPage DESC Using template: /addons/apps/perch_shop/templates/shop/checkout/customer_login.html [248] SELECT country, countryID FROM perch2_shop_countries ORDER BY country ASC Using template: /addons/apps/perch_shop/templates/shop/checkout/customer_create.html

I added the members app at the same time as the shop app - is there something I should have done to generate the database tables?

Thanks, Alex

I've just revisited the members app and the tables have appeared - it's weird because I'm sure I visited that area before.

I've now tried the form and it works! Thanks for pointing me in the right direction.

Can I ask another question? I'm still having trouble getting re-directed to PayPal when calling checkout. We're using PayPal Express. Do I need to open a new thread for this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes please!