Quantcast
Channel: Phoca Forum
Viewing all articles
Browse latest Browse all 2029

Phoca Cart • Re: PHP errors and warnings. PC 5 beta51. PHP 8.3

$
0
0
Hi, see the code, there is a database query which asks the columns, e.g. column: tracking_date_shipped

Code:

$query = ' SELECT date, invoice_number_id, invoice_number, invoice_prn, invoice_date, invoice_due_date, invoice_time_of_supply, tracking_date_shipped, required_delivery_time  FROM #__phocacart_orders WHERE id = ' . (int)$id . ' ORDER BY id LIMIT 1';
and then you ask the value with:

$d['tracking_date_shipped'] = $orderData['tracking_date_shipped'];

Then it is not possible, that this value will be null, except, e.g. the database column does not exist in your database :idea:

Check the table #__phocacart_orders for tracking_date_shipped column :idea:
this column exists:
Image

btw, I just installed several beta versions over existing ones. Is it necessary? No SQL code need to be executed?
As we see, the required column exists, but I just ask for future.
Can you let me know the code of: administrator/components/com_phocacart/libraries/phocacart/order/order.php

between lines: 2964 and 2976?

Jan
Here is code (PC 5.0 beta54 installed) :

Code:

        $db->setQuery($query);        $orderData = $db->loadAssoc();        // SEE: administrator/components/com_phocacart/tables/phocacartorder.php        // some date columns cannot have null values, as null values will be transformed to 0000-00-00 00:00:00 in check function        // instead of leaving yet stored data in database (values with null standardly do not change current data in database)        // $d['date'] - defined previously        $d['tracking_date_shipped'] = $orderData['tracking_date_shipped'];        $d['invoice_date']          = $orderData['invoice_date'];        $d['invoice_due_date']      = $orderData['invoice_due_date'];        $d['invoice_time_of_supply']= $orderData['invoice_time_of_supply'];        $d['required_delivery_time']= $orderData['required_delivery_time'];

Statistics: Posted by sulpher — 13 Jun 2024, 13:20



Viewing all articles
Browse latest Browse all 2029

Trending Articles