We're using opencart 2.0.3.1. So we have a problem with an options extension, it's called Option Combinations. The problem is the product pages can't be displayed and the options created by the extension disappear when we switch the site over to php7.
We get an error 500 on the product pages and to get the products to display again you have to go to line 63 of product.php under /system/modification/catalog/model/catalog and change the line from
"$otp_option_data[] = array("
to
"$otp_option_data = array("
After this edit the products display fine, but the options created by the extension aren't being displayed. If I enable display errors it displays the same error over and over where the options should be,
"PHP Warning: Illegal string offset 'type' in /usr/www/users/xucozurjmj/system/modification/catalog/view/theme/journal2/template/product/product.tpl on line 351"
And I don't know what to do to fix it. The option combinations extension is a vqmod xml file. Is the problem with the extension using code not supported in php7, or is it a problem with the journal theme or opencart itself? The latest version of the extension doesn't support our opencart version and our support for it has run out.
The only thing being suggested by my colleague is to update the whole opencart installation to a version that the newer version of the extension supports, but coming from experience having done this before, it sucks. Updating opencart is going to cause way more unnecessary problems with a bunch of other things, and seems overly complicated to maybe fix a problem with one extension as the extension has been taken over by new developers, so I'm not even sure if the options set up in our version of the extension would carry over to the new version of the extension.
So what I'm asking is, is this an easy fix or can someone point me in the direction of someone that would please be able to help.
In general you have several problems:
1. OpenCart with 2.0.3.1
2. old php version
3. not with php 7.x compatible extension
I would suggest following (depends also on the used template and installed extra extensions):
A. update shop to 2.3.0.2
B. switch to php 7.3.x (at least 7.2.x)
C. make extension compatible with php 7.x
What wonders me how a developer can publish (and sell) an extension which is runs only on php 5.x - must be from the other side of this planet ..
In any way, you should switch sooner than later to php 7 (several reasons why).
If you want to keep the current shop version, this extension should be adopted.
And beside this, another file of the core need to be updated/replaced.
If you want you can contact me to check that extension and adopt it for php 7 (no cost for you).
If more should be done, this will be a paid job finally.
And about that line, you have to initialize it before you want to use is:
after that you can use it like:
btw: updating to a new version of OC is not that miracle - if the person knows his job.
1. OpenCart with 2.0.3.1
2. old php version
3. not with php 7.x compatible extension
I would suggest following (depends also on the used template and installed extra extensions):
A. update shop to 2.3.0.2
B. switch to php 7.3.x (at least 7.2.x)
C. make extension compatible with php 7.x
What wonders me how a developer can publish (and sell) an extension which is runs only on php 5.x - must be from the other side of this planet ..
In any way, you should switch sooner than later to php 7 (several reasons why).
If you want to keep the current shop version, this extension should be adopted.
And beside this, another file of the core need to be updated/replaced.
If you want you can contact me to check that extension and adopt it for php 7 (no cost for you).
If more should be done, this will be a paid job finally.
And about that line, you have to initialize it before you want to use is:
Code: Select all
$otp_option_data = array();
Code: Select all
$otp_option_data[] = array( .. and so on .. );
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Who is online
Users browsing this forum: No registered users and 8 guests