Page 1 of 1

Issues with Product ID creating after payment errors

Posted: Fri Mar 14, 2025 6:41 pm
by BobBlanc
I keep getting the following errors in the log
Opencart\Catalog\Model\Catalog\Product::getProduct(): Argument #1 ($product_id) must be of type int, null given in /home/mystore/public_html/catalog/model/catalog/product.php on line 32
Opencart\Catalog\Model\Catalog\Product::getLayoutId(): Argument #1 ($product_id) must be of type int, string given in /home/mystore/public_html/catalog/model/catalog/product.php on line 347

I believe they are causing two issues, firstly certain items will go to the cart but wont allow customer to proceed to the checkout - and in certain cases when they do allow purchase they show an error after payment is taken that is trying to access array offset value of type null in the mail/order.php

Any help would be appreciated

Re: Issues with Product ID creating after payment errors

Posted: Fri Mar 14, 2025 7:34 pm
by JNeuhoff
If you are serious about getting any help here then you have to provide some more details, such as OC version. payment method used, PHP version, other extensions, etc, see forum rules.

Re: Issues with Product ID creating after payment errors

Posted: Mon Mar 17, 2025 7:36 pm
by paulfeakins
BobBlanc wrote:
Fri Mar 14, 2025 6:41 pm
Any help would be appreciated
Come on Bob, help us out here with some details!

Re: Issues with Product ID creating after payment errors

Posted: Thu Mar 20, 2025 7:48 pm
by BobBlanc
My apologies chaps - first time posting
1. Your Exact OpenCart Version (4.0.2.3)
2. Used Template/Theme - Journal 3.2.0-rc.101
3. (Additional) Installed Extension(s)Basic Stripe Payment Gateway
4. (Additional) Installed Translation(s)
5. Used php Version 8.1.31
6. Used Browser and Version (chrome Version 134.0.6998.89)
7. Do you use cloudflare > Yes

Re: Issues with Product ID creating after payment errors

Posted: Thu Mar 20, 2025 8:38 pm
by paulfeakins
BobBlanc wrote:
Thu Mar 20, 2025 7:48 pm
My apologies chaps - first time posting
Welcome!


BobBlanc wrote:
Thu Mar 20, 2025 7:48 pm
1. Your Exact OpenCart Version (4.0.2.3)
At this point none of the top OC developers recommend using OpenCart 4 for a production site. You should use 3.0.4.0.


BobBlanc wrote:
Thu Mar 20, 2025 7:48 pm
2. Used Template/Theme - Journal 3.2.0-rc.101
None of the top developers recommend Journal either; read more here: viewtopic.php?t=157098


BobBlanc wrote:
Thu Mar 20, 2025 7:48 pm
7. Do you use cloudflare > Yes
I like Cloudflare but you have to make sure it's not used on parts of the checkout and callback URLs or it can cause issues.

Re: Issues with Product ID creating after payment errors

Posted: Fri Mar 21, 2025 6:59 pm
by BobBlanc
Hi Paul

Many thanks for your patience and response. Is the process of downgrading an arduous task? I have upgraded in the past and it proved tricky. I can only imagine going backwards is a similar job. Luckily I have yet to find Journal as much a problem at it seems to the larger community. Fingers crossed

But going back to the original issue, is the error findable and fixable do you think?

Thanks
Bob

Re: Issues with Product ID creating after payment errors

Posted: Sun Mar 23, 2025 8:48 pm
by ADD Creative
The error is most likely caused by your theme or one of your extensions. Try cross referencing the time of the error to your web access log. That may narrow down where to look.

Re: Issues with Product ID creating after payment errors

Posted: Mon Mar 24, 2025 6:21 pm
by paulfeakins
BobBlanc wrote:
Fri Mar 21, 2025 6:59 pm
Is the process of downgrading an arduous task? I have upgraded in the past and it proved tricky. I can only imagine going backwards is a similar job.
Yes, you'd need to start fresh really.


BobBlanc wrote:
Fri Mar 21, 2025 6:59 pm
Luckily I have yet to find Journal as much a problem at it seems to the larger community. Fingers crossed
But this may well be a Journal problem. Other than that, Journal makes it hard to find and fix bugs, hard for developers to work with, often causes unexplained slowness, and is unsupported on this forum.