I am using opencart v1.4.8b
Can anyone tell me how to increase the character limit on reviews? The current cap is at 1000.
I tried to change the code in food\admin\controller\catalog\review.php
I edited the lines
Line 480: if ((strlen(utf8_decode($this->request->post['text'])) < 25) || (strlen(utf8_decode($this->request->post['text'])) > 1000)) {
Line 484: if ((strlen(utf8_decode($this->request->post['text'])) < 25) || (strlen(utf8_decode($this->request->post['text'])) > 1000)) {
By increasing the "1000" entry, but that didnt work.
I am guessing that I need to change something in the mysql database? Can anyone help me with this step?
Will it break anything if I want to increase it to say... 6 or 7k?
Thanks for any help
Can anyone tell me how to increase the character limit on reviews? The current cap is at 1000.
I tried to change the code in food\admin\controller\catalog\review.php
I edited the lines
Line 480: if ((strlen(utf8_decode($this->request->post['text'])) < 25) || (strlen(utf8_decode($this->request->post['text'])) > 1000)) {
Line 484: if ((strlen(utf8_decode($this->request->post['text'])) < 25) || (strlen(utf8_decode($this->request->post['text'])) > 1000)) {
By increasing the "1000" entry, but that didnt work.
I am guessing that I need to change something in the mysql database? Can anyone help me with this step?
Will it break anything if I want to increase it to say... 6 or 7k?
Thanks for any help
From what I can tell the reviews don't have a limit to them (in the front end anyway)
As for the back end you will need to remove the second one of those as it's a duplicate line that shouldnt be there. It should be
On it's own. You will then need to change the 1000 to whatever you want. I think the max a text field will hold is aroud 65535 characters which is well above your limit you want (the field is a TEXT field type and as such doesn't have a length attribute to set constraints on it)
As for the back end you will need to remove the second one of those as it's a duplicate line that shouldnt be there. It should be
Code: Select all
if ((strlen(utf8_decode($this->request->post['text'])) < 25) || (strlen(utf8_decode($this->request->post['text'])) > 1000)) {
$this->error['text'] = $this->language->get('error_text');
}
Thanks for your help. I followed your instructions and removed the duplicate entry, and changed the "1000" to "17000" but I still receive the error
Error: Review Text must be between 25 and 1000 characters!
I am definitely under "17000" characters.
There has to be a setting or a bit of code somewhere that I am missing. Have any other ideas?
Error: Review Text must be between 25 and 1000 characters!
I am definitely under "17000" characters.
There has to be a setting or a bit of code somewhere that I am missing. Have any other ideas?
a bit ridiculous to force the admin to have any type of min or max. I'll change to:
in the next version
Code: Select all
if (strlen(utf8_decode($this->request->post['text'])) < 1) {
$this->error['text'] = $this->language->get('error_text');
}
That worked Qphoria. For anyone else that may be looking to do the same thing, I had to change the fields in
\admin\controller\catalog\review.php
AND
\catalog\controller\product\product.php
and replace to the code that Qphoria provided.
Qphoria you are my coding God, and I worship you... a little.
\admin\controller\catalog\review.php
AND
\catalog\controller\product\product.php
and replace to the code that Qphoria provided.
Qphoria you are my coding God, and I worship you... a little.
Could all of the limits not be set in the admin side, maybe as part of localisation?
Here's how to do it and it works this way 100%.
-------------------------------------------------------
Find this file:
\admin\controller\catalog\review.php
AND
\catalog\controller\product\product.php
-------------------------------------------------------
In this file once you have it open> review.php
Search for: error_text
Replace the entire line of code in that file with (and save):
if (strlen(utf8_decode($this->request->post['text'])) < 1) {
$this->error['text'] = $this->language->get('error_text');
}
NEXT
In this file once you have it open> product.php
Search again for: error_text
Once you find the 'error-text' part of the code
Change '1000' to '5000' and save
That's it.
-------------------------------------------------------
Find this file:
\admin\controller\catalog\review.php
AND
\catalog\controller\product\product.php
-------------------------------------------------------
In this file once you have it open> review.php
Search for: error_text
Replace the entire line of code in that file with (and save):
if (strlen(utf8_decode($this->request->post['text'])) < 1) {
$this->error['text'] = $this->language->get('error_text');
}
NEXT
In this file once you have it open> product.php
Search again for: error_text
Once you find the 'error-text' part of the code
Change '1000' to '5000' and save
That's it.
In future you may want to check the date of the previous post before reply to it.... This question was asked in 2012...OCMaster597 wrote: ↑Thu Nov 30, 2017 2:58 amHere's how to do it and it works this way 100%.
-------------------------------------------------------
Find this file:
\admin\controller\catalog\review.php
AND
\catalog\controller\product\product.php
-------------------------------------------------------
In this file once you have it open> review.php
Search for: error_text
Replace the entire line of code in that file with (and save):
if (strlen(utf8_decode($this->request->post['text'])) < 1) {
$this->error['text'] = $this->language->get('error_text');
}
NEXT
In this file once you have it open> product.php
Search again for: error_text
Once you find the 'error-text' part of the code
Change '1000' to '5000' and save
That's it.
Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...
Burt65 wrote: ↑Thu Nov 30, 2017 11:53 amIn future you may want to check the date of the previous post before reply to it.... This question was asked in 2012...OCMaster597 wrote: ↑Thu Nov 30, 2017 2:58 amHere's how to do it and it works this way 100%.
-------------------------------------------------------
Find this file:
\admin\controller\catalog\review.php
AND
\catalog\controller\product\product.php
-------------------------------------------------------
In this file once you have it open> review.php
Search for: error_text
Replace the entire line of code in that file with (and save):
if (strlen(utf8_decode($this->request->post['text'])) < 1) {
$this->error['text'] = $this->language->get('error_text');
}
NEXT
In this file once you have it open> product.php
Search again for: error_text
Once you find the 'error-text' part of the code
Change '1000' to '5000' and save
That's it.
The question was unsolved, there are still people looking for this to work and no one stepped up to give a solid answer, so i did. But thanks for your post anyways.
Who is online
Users browsing this forum: stefansmith129 and 203 guests