Post by harap » Thu Oct 05, 2023 7:43 am

Hello,

I'm using OC v4.0.2.3 and running PHP 8.1. with a testing site.
It seems the Product Reviews feature is not working. I fill out the Write a review content, but no response when clicking on Continue button.
Is this a bug? Please advise how to fix it or wait for next update.

Thanks in advance!
Last edited by harap on Thu Oct 05, 2023 2:05 pm, edited 1 time in total.

Active Member

Posts

Joined
Wed Sep 16, 2015 12:34 am
Location - United States

Post by softmonke » Thu Oct 05, 2023 11:34 am

There is a bug in the OpenCart v4.0.2.3 release. You don't have to wait for a new release for the fix as the fix to this issue is rather simple. You can refer to this pull request on GitHub for the fix: https://github.com/opencart/opencart/pu ... 6cd30b8292

Go to "catalog/controller/product/review.php", and go to the write() function, change the following:

Code: Select all

$this->model->load('product/product');
to:

Code: Select all

$this->model->load('catalog/product');
and also:

Code: Select all

$this->model_product_product->getProduct($product_id);
to:

Code: Select all

$this->model_catalog_product->getProduct($product_id);

Reach out to us at hello@softmonke.com for your OpenCart web development needs.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by harap » Thu Oct 05, 2023 2:04 pm

Yes, Great Forums. Thank you very much!

Active Member

Posts

Joined
Wed Sep 16, 2015 12:34 am
Location - United States

Post by dogfoot » Fri Feb 09, 2024 4:05 am

its not working with me, after make does changes when i submit the reviewe it gives me the this error:
Warning: Review token invalid!

Can you give me any direction for this problem?
thanks

Newbie

Posts

Joined
Fri May 13, 2022 10:55 pm

Post by ravikumar22 » Fri Feb 09, 2024 4:50 pm

as I check product review section is working fine.
see this screenshot.
https://prnt.sc/KNxQPHGSmxMz
I checked on opencart 4023.
Please check your console log error.
it could be following reason
1. Your product page Javascript is being conflict. since as I check form is being submitted via ajax
2. you could have php function return error.

let me know if you still facing any error.
thanks

Image
:) :D :( :o OpenCart Support | Please email at: devinlabsolutions@gmail.com :drunk: :laugh: :)


User avatar
New member

Posts

Joined
Sun Apr 12, 2015 6:33 am

Post by vagabont » Thu May 23, 2024 12:27 am

it is working, thanks! in latest version code is slightly different

$this->load->model('product/product');
$product_info = $this->model_product_product->getProduct($product_id);

Newbie

Posts

Joined
Fri Sep 20, 2013 5:10 am
Who is online

Users browsing this forum: No registered users and 0 guests