stock-status-chracter-length-in-opencart

Change Stock Status Character length in OpenCart 3.x

Step-1

Locate:
/admin/controller/localisation/stock_status.php
Find this line: if ((utf8_strlen($value[‘name’]) < 3) || (utf8_strlen($value[‘name’]) > 32)) {
Change that 32 to your desired character length. like: 35 or 50 character.
Save your file and upload (overwrite).

Step- 2

*Before start – Make sure you taken backup of your database.
Login to your phpmyadmin.
Find out oc_stock_status (oc_ your database prefix maybe different in your installed Opencart, check in your config.php)
click on “oc_stock_status
then go to tab “Structure
On 3rd “Name” row click on “change

From here you can change Length/Values from 32 to 35 or 50 or whatever.
click on save.
Now check changes.

To Change GEO Zone Character Length:
Edit: admin/controller/localisation/geo_zone.php
Line No.: 349
Change Value in Code: if ((utf8_strlen($this->request->post[‘name’]) < 3) || (utf8_strlen($this->request->post[‘name’]) > 50)) {
On Database: oc_geo_zone > name > Length/Values> 50