Post by BobBlanc » Fri Mar 14, 2025 6:41 pm

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

Newbie

Posts

Joined
Wed Sep 11, 2019 9:14 pm

Post by JNeuhoff » Fri Mar 14, 2025 7:34 pm

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.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Mon Mar 17, 2025 7:36 pm

BobBlanc wrote:
Fri Mar 14, 2025 6:41 pm
Any help would be appreciated
Come on Bob, help us out here with some details!

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by BobBlanc » Thu Mar 20, 2025 7:48 pm

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

Newbie

Posts

Joined
Wed Sep 11, 2019 9:14 pm

Post by paulfeakins » Thu Mar 20, 2025 8:38 pm

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.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by BobBlanc » Fri Mar 21, 2025 6:59 pm

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

Newbie

Posts

Joined
Wed Sep 11, 2019 9:14 pm

Post by ADD Creative » Sun Mar 23, 2025 8:48 pm

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.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon Mar 24, 2025 6:21 pm

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.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: ocmod.space and 5 guests