Page 1 of 2

Error Guest checkout

Posted: 29 Nov 2024, 17:29
by Webguy
Error after ordering as a guest

Incorrect integer value: 'undefined' for column 'fleevnL_joomla24:kr36u_phocacart_order_users.region' at row 1

Region is disabled in the form fields



Also wondering, when using guest checkout the admin email has a lot of empty paramaters;
What is the right approach for this?
Voornaam: {b_name_first}
Tussenvoegsel: {b_name_middle}
Achternaam: {b_name_last}
Adres: {b_address_1}
Stad: {b_city}
Postcode: {b_zip}
Email: {b_email}
Telefoonnummer: {b_phone_1}

Re: Error Guest checkout

Posted: 02 Dec 2024, 02:28
by Jan
Hi, the region column is default column in table phocacart_order_users. Did you or someone else remove it from database? Such column needs to be a part of this table.

What do you mean with empty parameters?

Jan

Re: Error Guest checkout

Posted: 02 Dec 2024, 11:05
by Webguy
Hi Jan,

Region
Region is in the table.
# Naam Type Nul Standaardwaarde
20 region int(11) Nee 0

Region is disabled in the form for this webshop because we don't want it present in the user details. Address, postal code & City is enough. I don't know if that can have something to do with it?


Empty mail
The empty paramaters as above seen that is how the mail was received. Guest details were not put into the parameters. For example {b_name_first} should've been replaced by the guest first name.

Re: Error Guest checkout

Posted: 08 Dec 2024, 02:20
by Jan
Hi, it does not matter if the field is active or not, the database includes this column, so the script works with it. Then it should have the right format. :idea:

Empty mail, did you try to use other variables like bs or sb to be sure the name is selected from shipping/billing address when it does not exist in billing/shipping address, see: https://www.phoca.cz/documentation/115- ... or-vendors

BTW which version do you use now, so I can test it. Did you only disable the region in administration or did you make some other changes?

Jan

Re: Error Guest checkout

Posted: 10 Dec 2024, 14:38
by Webguy
Hi Jan,

I just checked the guest order and see that there is no billing nor shipping information in the order. While on the frontend there are required fields everything is blank in the order.

Versions:
Phoca cart: 5.0.0Beta87
Phoca cart modules: 5.0.0Beta61
PCuikit: 2.0.9 Beta
Joomla: 5.2.1

I'll send you the details in PM so you can see the live environment. Since the shop is live I hope this is an easy/quick fix so the store can function correctly.

Re: Error Guest checkout

Posted: 12 Dec 2024, 13:12
by Webguy
Hi Jan,

I'm a little nervous since the shop is live now.
Checking to see if my message has been sent, it's still in outbox(1) so i'm not sure.
Please let me know so that in case you have not received the login details I can provide them.

Right now the primary problem is that the
- guest checkout is giving an error; Incorrect integer value: 'undefined' for column `fleevnl_joomla24`.`kr36u_phocacart_order_users`.`region` at row 1
- the person ordering does not receive any email.

Cheers,

Peter

Re: Error Guest checkout

Posted: 17 Dec 2024, 18:48
by Jan
Hi, I have tested on different servers and still cannot get the same results.

- testing with guest checkout
- region unpublished

Still, the order is normally saved.

On your site, I cannot go through the htaccess login. :idea:

Re: Error Guest checkout

Posted: 18 Dec 2024, 10:08
by Webguy
Jan wrote: 17 Dec 2024, 18:48 ...
On your site, I cannot go through the htaccess login. :idea:
Did you receive my PM with the details?

Re: Error Guest checkout

Posted: 19 Dec 2024, 01:53
by Jan
Hi, really hard to say what can be wrong, testing on your site, no such error, I don't know PCUikit, so hard to say. I think, the site needs to be debugged and on the place where the error occurs to find which parts asks the database.

Some part of the code tries to add "undefined" value to region column which is integer and needs integer ... I am testing it on my test servers, but everywhere I get integers :idea:

Jan

Re: Error Guest checkout

Posted: 19 Dec 2024, 02:02
by Jan
For test, try to open this file:
administrator/components/com_phocacart/libraries/phocacart/order/order.php

and on line cca 1364 (it can be different on your server) try to find the function:

public function saveOrderUsers($d, $orderId) {

There is following row:
unset($d['id']);// we do new autoincrement

Try to add before the row following code:

Code: Select all

if (!isset($d['country'])) {
            $d['country'] = 0;
        }
        if (!isset($d['region'])) {
            $d['region'] = 0;
        }
I don't think, it will help as it is followed by Joomla function $row->bind which loads such columns (the only idea I have is that the database structure is somehow wrong on your server)

If this does not help, I think, the external tool needs to be check too, to see if there is no such query which can cause such errror (of corse the best way is to have some debug extension like n3t debug and try to find from which part this SQL query is loaded)

Jan