Forum

Thread tagged as: Shop

shop app, checkout to paypal (not paypal express). for users that don't want to...

Hi,

my client want the ability for shoppers to checkout without registering an account. etc.

is this possiable? with the Shop App.

thanks in advance

tony

Tony Monckton

Tony Monckton 0 points

  • 5 years ago

Hi Tony,

Here is some documentation about what you are after:

https://docs.grabaperch.com/addons/shop/examples/no-account

cool thanks

but I have one question!

account.php has:

if (!perch_member_logged_in())
{
     perch_shop_login_form();
}

the form action goes to "/account.php"

what code/function do I need to add to login the customer in?

eg: perch_shop_login( $_POST['form1_email'], $_POST['form1_password'])

thanks in advance

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

What is the function of your account.php page?

hi,

account.php has customer login form.

I just can't see how it check the username & password is correct. etc. what function do I call to log customer in

same with registering new customer, how does it store name and address etc. how to store the form data?

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

Isn't the whole point that you don't want any of that functionality?

hi,

I want to use Perch to login and register customers.

using...

perch_shop_login_form(); and perch_shop_registration_form(['template' => 'checkout/customer_create.html']);

do I need to use member app API?

I noticed on customer_logi.html has:

Forgotten your password? <a href="/members/reset.php">Reset it now</a>

but there is no members/reset.php

I just don't know how it works! :/

tony

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You have the ability to do that using the software as supplied. Unfortunately we aren't going to be able to build your shop for you. So you will need to make some progress and use support for specific questions and help.

If this is over and above what you are comfortable doing then you would need to get someone to help. There is a Jobs Channel in Slack and also we have Registered Developers who are experienced with Perch and some already have built Shops.

https://grabaperch.com/developers

I not asking for you to build a shop for me. I'm asking a simple question.

perch_shop_registration_form(); creates a form

Am I expected to write php code to pickup the form data sent (when clicking the submit button) via $_POST and store it in a mySQL database?

I just want the above question answered please

thanks

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, each of the forms has a dedicated handler to process the response. You don't need to write those yourself.

Hi Drew,

I found the problem: perch members has no SQL tables

how can I get perch_members to create the tables?

tony

SELECT * FROM perch2_pages WHERE pagePath='/register.php' LIMIT 1
[1] SELECT * FROM perch2_shop_cart WHERE cartID=169
[1] SELECT * FROM perch2_shop_cart WHERE cartID=169
[31] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
SELECT COUNT(*) FROM perch2_members WHERE memberPassword IS NOT NULL AND memberEmail='micky@disneyland.com'
[] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db78335_littleme.perch2_members' doesn't exist
SELECT COUNT(*) FROM perch2_members WHERE memberPassword IS NOT NULL AND memberEmail='micky@disneyland.com'
[] Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db78335_littleme.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 'db78335_littleme.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 'db78335_littleme.perch2_members_forms' doesn't exist
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_blog',
        'perch_members',
        'perch_shop',
    );
?>

Diagnostics report HEALTH CHECK

Perch is up to date PHP 5.5.35 is up to date MySQL 5.1.63-rel13.4 is up to date Image processing available SUMMARY INFORMATION

Perch: 2.8.31, PHP: 5.5.35, MySQL: 5.5.49, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_shop_orders (PERCH_SHOP_VERSION), perch_shop_products (1.0.6), perch_shop (1.0.6), perch_members (1.5) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_members', 'perch_shop', ); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch PERCH_CORE: /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/core PERCH_RESFILEPATH: /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/resources Image manipulation: GD PHP limits: Max upload 20M, Max POST 20M, Memory: 2048M, Total max file upload: 20M F1: 2edba60ed1f613d6dd804feb202456a2 Resource folder writeable: Yes HTTP_HOST: shop.stylishlittleme.com DOCUMENT_ROOT: /home/78335/domains/shop.stylishlittleme.com/html REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you visited the Members app in the control panel?

Update:

in perch admin, I clicked Apps/Members it gave same errors. I then clicked on assets, then went back to apps/members

I got this message

Attempting app installation: perch_members [1] SHOW TABLES LIKE "perch2_members" [0] SELECT COUNT(*) FROM perch2_members WHERE memberStatus='pending' Queries: 11 Memory: 3.6731 Array ( [type] => 8 [message] => Use of undefined constant PERCH_SHOP_VERSION - assumed 'PERCH_SHOP_VERSION' [file] => /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/addons/apps/perch_shop_orders/admin.php [line] => 3 )

perch is saving the customer data..

seems to be working now, and I'm logging in!

tony