Product Page Not Working

ThemeBurn SupportForumsOpenCart ThemesBurnEngineProduct Page Not Working

This topic has been marked as not resolved.

Hi,

I installed burntheme after installing theme product page got error.

http://shmoir.com/index.php?route=product/product&product_id=45
Fatal error: Can’t use method return value in write context in /home/shmoir/public_html/system/storage/modification/catalog/controller/product/product.php on line 312

I checked 2-3 times just after installing theme it got error before that opencart working fine. Please check & help to resolve this issue asap. Below is the details you need.

Thanks

November 17, 2018 at 9:42 am #66102

Hi,

When would I got reply?

Thanks

November 21, 2018 at 3:44 pm #66145

Fatal error: Can’t use method return value in write context in /home/shmoir/public_html/system/storage/modification/catalog/controller/product/product.php on line 312

This is what line 312 reads:

————————————————————————————————————–
$product_option_image_width = !empty($this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_width’)) ? $this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_width’) : 50;
$product_option_image_height = !empty($this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_height’)) ? $this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_height’) : 50;
————————————————————————————————————–

I temporarily changed it to read:

————————————————————————————————————–
$product_option_image_width = “50″;
$product_option_image_height = “50″;
————————————————————————————————————–

Any now the product pages work but hoping for a better solution.
Is that OK or any other solution???

November 22, 2018 at 12:22 pm #66182

Hi,

The problem comes from the syntax in the following construction:

$product_option_image_width = !empty($this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_width’)) ? $this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_width’) : 50;
$product_option_image_height = !empty($this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_height’)) ? $this->config->get(‘theme_’ . $this->config->get(‘config_theme’) . ‘_image_option_height’) : 50;

PHP versions lower than 5.5 throw an error. You will have to either upgrade PHP or change the code to:

$product_option_image_width  = $this->config->get('theme_' . $this->config->get('config_theme') . '_image_option_width');
$product_option_image_height = $this->config->get('theme_' . $this->config->get('config_theme') . '_image_option_height');
$product_option_image_width  = !empty($product_option_image_width)  ? $product_option_image_width  : 50;
$product_option_image_height = !empty($product_option_image_height) ? $product_option_image_height : 50;

We will set this fix in the upcoming version as well.

BR,
ThemeBurn team

November 23, 2018 at 11:56 am #66225
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.