Zen Cart Logo
Forums / Customization from the Admin / Increase default maximum size of product name

Increase default maximum size of product name

Views: 3,565

Results 1 to 18 of 18
8 Apr 2014, 6:00 AM
#1
sachin1008 avatar

sachin1008

New Zenner

Join Date:
Mar 2014
Posts:
32
Plugin Contributions:
0

Increase default maximum size of product name

The products that I want to display for my shopping portal are names of articles that are at times lengthy. How do I increase the default size (that is, maximum number of text characters) for product name?

8 Apr 2014, 9:00 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Increase default maximum size of product name

Sachin1008:

The products that I want to display for my shopping portal are names of articles that are at times lengthy. How do I increase the default size (that is, maximum number of text characters) for product name?

Canbe changed in mySQLAdmin. Would be editing the field for product_name I believe in the products_description table. Remember that after increasing the size, if go to decrease the size that the field will basically get cut off at the new shorter length. Thismeans that any necessary closing characters will be lost. Suggestion in that case is to programmatically truncate the field data before shortening the field length.

8 Apr 2014, 12:47 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Increase default maximum size of product name

NOTE: if you increase the size of the products_name in the table products_description, you also need to increase it in the table orders_products ...

12 Apr 2014, 1:11 PM
#4
sachin1008 avatar

sachin1008

New Zenner

Join Date:
Mar 2014
Posts:
32
Plugin Contributions:
0

Re: Increase default maximum size of product name

:smile:

3 Jun 2014, 11:44 PM
#5
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

Ajeh:

NOTE: if you increase the size of the products_name in the table products_description, you also need to increase it in the table orders_products ...
I have tried changing the product_name in both the products_description & orders_products tables. It still does not work. I have been searching for something else that need to be done, but cannot find any information. Why is this not working?
I am using version 1.5.1, and something is wrong with the advise everyone has been giving about this problem. It says varchar100, but it still won't let me put in more than 64 characters.

4 Jun 2014, 12:15 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Increase default maximum size of product name

earthdog:

I have tried changing the product_name in both the products_description & orders_products tables. It still does not work. I have been searching for something else that need to be done, but cannot find any information. Why is this not working?
I am using version 1.5.1, and something is wrong with the advise everyone has been giving about this problem. It says varchar100, but it still won't let me put in more than 64 characters.

When you say "it won't let you put in more than 64 characters" what is the it? How is this data being entered/input? Using a/any plugin/module? Default ZC store? Is it that more than 64 characters are not going into the database or is it that more than64are going in, but the additional are not being displayed? What is the test of 65 or more characters going in? If it is by what is seen as a guest, does the problem appear when using the default template as well?

The help may be just fine, it may be that enough information has not been provided. The guidance offered so far has been the same statement/solution offered multiple times over in several different threads and it has worked for situationsthat are "standard" because thisisnt working for the store in question, there is something else that is not standard going on.

4 Jun 2014, 1:41 AM
#7
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

mc12345678:

When you say "it won't let you put in more than 64 characters" what is the it? How is this data being entered/input? Using a/any plugin/module? Default ZC store? Is it that more than 64 characters are not going into the database or is it that more than64are going in, but the additional are not being displayed? What is the test of 65 or more characters going in? If it is by what is seen as a guest, does the problem appear when using the default template as well?

The help may be just fine, it may be that enough information has not been provided. The guidance offered so far has been the same statement/solution offered multiple times over in several different threads and it has worked for situationsthat are "standard" because thisisnt working for the store in question, there is something else that is not standard going on.

I am trying to put more than 64 characters in the product name field. I am manually inserting the characters in an existing product name that has 61 characters. I am only allowed to put 3 more characters.
I am confused by half of what you say in your reply, because it makes no sense. What default ZC store? What "a/any plugin/module?"
I am just trying to increase the number of characters in the product name field. I have changed the "product_name" in both the "products_description" and "orders_products" tables from 64 to 100. It does not work! What part of it does not work, do you not understand??? Is there something I need to change in one of the php files? If so, which one, and where is it located?

4 Jun 2014, 2:05 AM
#8
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

Okay, I think I figure out what I was doing wrong. I was changing the tables in the wrong database. Now for whatever reason, I can't get into my admin page. It is coming up with "WARNING: An Error occurred, please refresh the page and try again."
It might be a temporary server problem, but if not, what do I do?

4 Jun 2014, 3:42 AM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Increase default maximum size of product name

earthdog:

Okay, I think I figure out what I was doing wrong. I was changing the tables in the wrong database. Now for whatever reason, I can't get into my admin page. It is coming up with "WARNING: An Error occurred, please refresh the page and try again."
It might be a temporary server problem, but if not, what do I do?

ftp to your store and look in the logs folder for a debug file that possibly has the prefix debug-adm or at least has a time frame close to when you saw the error.

Post the contents (preferably a line that has the word error in it (warnings do not stop execution) BUT if the name of your admin folder is in the information, do something so the public doesn't know what you have named your admin folder. (Ie change it to admin for the posted information.) Perhaps someone here can tell you what the problem is/how to fix it. If you figure it out on your own, perhaps you could identify what was wrong so that others that visit this thread in the future can understand.

4 Jun 2014, 3:48 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Increase default maximum size of product name

earthdog:

I am trying to put more than 64 characters in the product name field. I am manually inserting the characters in an existing product name that has 61 characters. I am only allowed to put 3 more characters.
I am confused by half of what you say in your reply, because it makes no sense. What default ZC store? What "a/any plugin/module?"
I am just trying to increase the number of characters in the product name field. I have changed the "product_name" in both the "products_description" and "orders_products" tables from 64 to 100. It does not work! What part of it does not work, do you not understand??? Is there something I need to change in one of the php files? If so, which one, and where is it located?

While it seems that part of the problem may be resolved, wanted to state I understand the frustration.

All of the statements/questions were provided/asked to get more information about the problem and the system setup. We are not able to magically know the details of another's store and can only help from what we know/possibly experienced. I might have been able to summarize my post by pointing to the posting guidelines, but I don't like to sound like a broken record.

If there is anything about my post that could still use some clarification, please feel frr to ask here. While I believe I used relatively standard terminology for the aspects of ZC, between the spacebar on my cell phone not functioning 100% and sort of jumping to the "summary" I can see that there may be some gaps in understanding. For that I apologize.

4 Jun 2014, 10:27 AM
#11
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

mc12345678:

While it seems that part of the problem may be resolved, wanted to state I understand the frustration.

All of the statements/questions were provided/asked to get more information about the problem and the system setup. We are not able to magically know the details of another's store and can only help from what we know/possibly experienced. I might have been able to summarize my post by pointing to the posting guidelines, but I don't like to sound like a broken record.

If there is anything about my post that could still use some clarification, please feel frr to ask here. While I believe I used relatively standard terminology for the aspects of ZC, between the spacebar on my cell phone not functioning 100% and sort of jumping to the "summary" I can see that there may be some gaps in understanding. For that I apologize.

Thank you in advance for your help!
There are about a dozen debug files, but all of them say the same thing:
"[03-Jun-2014 21:54:48] PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED :: select * from project_version WHERE project_version_key = 'Zen-Cart Database' in /hsphere/local/home/c364859/store.earthdogpromotions.com/includes/classes/db/mysql/query_factory.php on line 120"
Here is the error message around line 120:
"{
if ($this->error_number == 0 && $this->error_text == DB_ERROR_NOT_CONNECTED && !headers_sent() && file_exists('nddbc.html') ) include

('nddbc.html');
echo '<div class="systemError">';
if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true)
{
echo $this->error_number . ' ' . $this->error_text;
echo '<br />in:<br />[' . (strstr($this->zf_sql, 'db_cache') ? 'db_cache table' : $this->zf_sql) . ']<br />';
} else {
echo 'WARNING: An Error occurred, please refresh the page and try again.';
}
trigger_error($this->error_number . ':' . $this->error_text . ' :: ' . $this->zf_sql, E_USER_ERROR);
if (defined('IS_ADMIN_FLAG') && IS_ADMIN_FLAG==true) echo 'If you were entering information, press the BACK button in your browser and

re-check the information you had entered to be sure you left no blank fields.<br />';
echo '</div>';
}"
All I did was to change the length of characters in the product name field from 64 to 100. I also changed created a password to the phpAdmin. Now I can't even log into it. That's probably my problem, but I don't know.
Please help.

4 Jun 2014, 11:00 AM
#12
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

that smiley face should be ":" followed by "D" without the quotation marks. I thought I had disabled the emoticons.

4 Jun 2014, 11:07 AM
#13
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Increase default maximum size of product name

earthdog:

Thank you in advance for your help!
There are about a dozen debug files, but all of them say the same thing:
"[03-Jun-2014 21:54:48] PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED :: select * from project_version WHERE project_version_key = 'Zen-Cart Database' in /hsphere/local/home/c364859/store.earthdogpromotions.com/includes/classes/db/mysql/query_factory.php on line 120"
Here is the error message around line 120:
"{
if ($this->error_number == 0 && $this->error_text == DB_ERROR_NOT_CONNECTED && !headers_sent() && file_exists('nddbc.html') ) include

('nddbc.html');
echo '<div class="systemError">';
if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true)
{
echo $this->error_number . ' ' . $this->error_text;
echo '<br />in:<br />[' . (strstr($this->zf_sql, 'db_cache') ? 'db_cache table' : $this->zf_sql) . ']<br />';
} else {
echo 'WARNING: An Error occurred, please refresh the page and try again.';
}
trigger_error($this->error_number . ':' . $this->error_text . ' :: ' . $this->zf_sql, E_USER_ERROR);
if (defined('IS_ADMIN_FLAG') && IS_ADMIN_FLAG==true) echo 'If you were entering information, press the BACK button in your browser and

re-check the information you had entered to be sure you left no blank fields.<br />';
echo '</div>';
}"
All I did was to change the length of characters in the product name field from 64 to 100. I also changed created a password to the phpAdmin. Now I can't even log into it. That's probably my problem, but I don't know.
Please help.

earthdog:

that smiley face should be ":" followed by "D" without the quotation marks. I thought I had disabled the emoticons.

Code and other related information should be posted using one of the tags. That would prevent changing such things on screen.

Check your store front. If it is working, then review the. Database info in your includes/configure.php with the "same" info in your admin/includes/configure.php

After that if the login credentials need updating for the admin panel, try using the recover password options at login, otherwise there is a FAQ about resetting lost/forgotten admin passwords.

4 Jun 2014, 8:13 PM
#14
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

mc12345678:

Code and other related information should be posted using one of the tags. That would prevent changing such things on screen.

Check your store front. If it is working, then review the. Database info in your includes/configure.php with the "same" info in your admin/includes/configure.php

After that if the login credentials need updating for the admin panel, try using the recover password options at login, otherwise there is a FAQ about resetting lost/forgotten admin passwords.

The storefront is not working. I checked both configure.php's and the database info ("DB_*) is the same in both. The ZenCart admin page is not working. I can't get into the "phpMyAdmin" because the password that I thought I had set up does not work. I tried the password in the configure.php files, but that doesn't work either.
I am on hold awaiting a techie from my hosting company, in hopes that they can at least reset that password. (It does not have a recover password option.) Even if I could get into it, I'm not sure what to change, except the length of the product name field back to 64. That was the only thing (other than the password) that I changed.
Is my ZenCart fried????

4 Jun 2014, 8:53 PM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Increase default maximum size of product name

earthdog:

The storefront is not working. I checked both configure.php's and the database info ("DB_*) is the same in both. The ZenCart admin page is not working. I can't get into the "phpMyAdmin" because the password that I thought I had set up does not work. I tried the password in the configure.php files, but that doesn't work either.
I am on hold awaiting a techie from my hosting company, in hopes that they can at least reset that password. (It does not have a recover password option.) Even if I could get into it, I'm not sure what to change, except the length of the product name field back to 64. That was the only thing (other than the password) that I changed.
Is my ZenCart fried????

So one thing was made clear, what password was changed when a password change was made?

Hopefully the techie can correct the issue with being ble to access the mysqladmin/database. Regarding the configure.php files, that the passwords are the same is in part good thing but unfortunately not the pssword to access the particular database as it appears. Because the password/username/database do not match up, accessing the admin panel is not possible vecause there is no data accessible to manage. So that would need to be addressed and again the techie hopefully can resolve that issue. Otherwise if you have a backup of your database you can restore your store with that backup

Otherwise without some form of a database, there is no store to present. The code is still good (to an extent) but if the database needs to be recreated any sql statements for addin/plugins/modified ode would need to be pushed to the new database. Performing that would depend on what is/will be installed. The particulars of the applicable installation(s) and associated instructions would guide how to do that.

Hopefully though the techie has your back.

4 Jun 2014, 10:21 PM
#16
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

mc12345678:

So one thing was made clear, what password was changed when a password change was made?

Hopefully the techie can correct the issue with being ble to access the mysqladmin/database. Regarding the configure.php files, that the passwords are the same is in part good thing but unfortunately not the pssword to access the particular database as it appears. Because the password/username/database do not match up, accessing the admin panel is not possible vecause there is no data accessible to manage. So that would need to be addressed and again the techie hopefully can resolve that issue. Otherwise if you have a backup of your database you can restore your store with that backup

Otherwise without some form of a database, there is no store to present. The code is still good (to an extent) but if the database needs to be recreated any sql statements for addin/plugins/modified ode would need to be pushed to the new database. Performing that would depend on what is/will be installed. The particulars of the applicable installation(s) and associated instructions would guide how to do that.

Hopefully though the techie has your back.

I do have a backup (not the most recent, as of a couple days ago), but what files/folders should I try to restore? I would like to keep all the products, but no problem as I can re-upload them via the csv file.
The hosting company is working on getting mySqlAdmin access restored. Is there anything in it that I should possibly change? And how many characters am I allowed to put in the products name field? I put 100. Is that too many. Maybe that's why the shopping went down????

4 Jun 2014, 10:25 PM
#17
earthdog avatar

earthdog

New Zenner

Join Date:
Jun 2014
Location:
Oakland Park, Florida
Posts:
8
Plugin Contributions:
0

Re: Increase default maximum size of product name

The problem with the shopping cart got resolved when they reset my password (or whatever they did) to my SQL Admin database. Thank you for your help anyway.

5 Jun 2014, 12:26 AM
#18
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Increase default maximum size of product name

earthdog:

The problem with the shopping cart got resolved when they reset my password (or whatever they did) to my SQL Admin database. Thank you for your help anyway.

Welcome, figured it would when they resolved the password issue. For anyone else that reads this thread, the php files were not lost/the issue, the other half of the store (the database/sql) was "locked" or inaccessible. So the restoration by csv file would only be part of the solution, other things such as the template settings, image sizes, shipping settings, payment settings, etc... They might be in a csv file, but I assume that the csv file in question is one that is used for something like easy populate or apsona, etc...

Regarding the maximum field length,I'm guessing it ismore dependent on the server software, but typically is some multiple of 2 or (2^n)-1 too many? Well, from a technical aspect no, from a store/shopping perspective maybe. Depends on what is really captured there.

With regards to what caused the "shopping cart" to go down, I would say it was the mysterious password change that was done. It seems that both setup files had matched each other, and access to everything was lost at about the same time that some password somewhere was changed.

Now if you have a concern that this information was changed/modified outside of your control, then I would suggest following the "I'm concerned that my site has been hacked" thread direction.