Forums / Templates, Stylesheets, Page Layout / Increasing Size of Product Name Field

Increasing Size of Product Name Field

Locked

Views: 3,718

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
11 Oct 2009, 6:38 PM
#1
jay_gee avatar

jay_gee

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Increasing Size of Product Name Field

Greetings All!

Still using v 1.3.8a here.

I am interested in increasing the length of the field for the Product Name in the Product Info admin page so that I can enter the complete name of a book in the format MAIN BOOK TITLE: Subtitle That Goes on for a Long Time and Should Not Be Truncated

With the default field size, the title is truncated in the middle of Should.

Is there a way I can do this?

Thanks in advance.

12 Oct 2009, 3:02 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Increasing Size of Product Name Field

In phpMyAdmin, you can alter the length of the field products_name in the tables:
products_description
orders_products

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Oct 2009, 6:30 PM
#3
jay_gee avatar

jay_gee

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Increasing Size of Product Name Field

Ajeh:

In phpMyAdmin, you can alter the length of the field products_name in the tables:
products_description
orders_products

Linda,

I am looking for phpMyAdmin and do not find it...
a search of the file structure/tree comes up blank,
could you point me in the right direction please?

Thank you!

12 Oct 2009, 6:51 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Increasing Size of Product Name Field

Select your database ...

You should see the two tables to be changed in the list:
products_description
orders_products

NOTE: if you use prefixes on your table names you will need to find those two tables with the prefixes on them ...

Click on the first table: products_description

You will see the field: products_name

Click on that and edit the size of the field ...

Click on the second table: orders_products

You will see the field: products_name

Click on that and edit the size of the field ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Oct 2009, 10:29 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Increasing Size of Product Name Field

phpMyAdmin will be in your hosting account's control panel.

16 Oct 2009, 6:40 PM
#6
jay_gee avatar

jay_gee

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Increasing Size of Product Name Field

stevesh:

phpMyAdmin will be in your hosting account's control panel.

I looked for it there and it was not available so I downloaded a copy of the zip and am going to discuss installing it on the server with my web hosting service.

Guess that's the next step, huh?

Thanks for your help everybody!

6 Nov 2009, 5:49 PM
#7
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Increasing Size of Product Name Field

My supplier has a subtitle column which contains a lot of information which is also in the description, generally.

I am about to try to add a subtitle to the database, by adding the subtitle field to products.product_subtitle. I searched the developers toolbox in Admin for files related to product_name, and found two that apply (although 38 instances of product_name came up, I identified that the subtitle was not relevant to 32 of those instances, for my purposes):

C:/wamp/www/Zencart/includes/languages/english.php

Line #593 : define('TABLE_HEADING_PRODUCT_NAME','Item Name');

and

C:/wamp/www/Zencart/includes/languages/zencart_zen/english.php

Line #597 : define('TABLE_HEADING_PRODUCT_NAME','Item Name');

There were other references not needed for the subtitle.

I believe the search function might need to be connected to the subtitle, found here:

C:/wamp/www/Zencart/includes/classes/products.php

Line #63 : $zp_product_name_query = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . "

Line #66 : $zp_product_name = $db->Execute($zp_product_name_query);

Line #67 : $zp_product_name = $zp_product_name->fields['products_name'];

Line #68 : return $zp_product_name;

My question is would it be important to type lines for the subtitle similar to the lines 63-68 above, substituting "subtitle" for "name", to improve searching of the products? (Again, I believe most of the information is already in the description.)

I am interested in comments related to the individual visitor's site search as well as search engine optimization.

(I am taking this approach for subtitles since Easy Populate limits me to using the Product General product type and the book module will therefore not work for me.)

6 Nov 2009, 5:58 PM
#8
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Increasing Size of Product Name Field

My supplier has a subtitle column which contains a lot of information which is also in the description, generally.

I am about to try to add a subtitle to the database, by adding the subtitle field to products.product_subtitle. I searched the developers toolbox in Admin for files related to product_name, and found two that apply (although 38 instances of product_name came up, I identified that the subtitle was not relevant to 32 of those instances, for my purposes):

C:/wamp/www/Zencart/includes/languages/english.php

Line #593 : define('TABLE_HEADING_PRODUCT_NAME','Item Name');

and

C:/wamp/www/Zencart/includes/languages/zencart_zen/english.php

Line #597 : define('TABLE_HEADING_PRODUCT_NAME','Item Name');

Of the 38 references I determined 32 are not needed for the subtitle.

But the below 4 references appear related to the search function and might need to be connected to the subtitle,:

C:/wamp/www/Zencart/includes/classes/products.php

Line #63 : $zp_product_name_query = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . "

Line #66 : $zp_product_name = $db->Execute($zp_product_name_query);

Line #67 : $zp_product_name = $zp_product_name->fields['products_name'];

Line #68 : return $zp_product_name;

My question is would it be important to type lines for the subtitle similar to the lines 63-68 above, substituting "subtitle" for "name", to improve searching of the products? (Again, I believe most of the information is already in the description.)

I am interested in comments related to the individual visitor's site search as well as search engine optimization.

(I am taking this approach for subtitles since Easy Populate limits me to using the Product General product type and the book module will therefore not work for me.)

Lastly, Ajeh stated above the products_name appears in the tables products_description and orders_products. I am wondering why the orders_products table did not appear in my Developer's Toolbox search. Perhaps it is there and I am just not seeing it.

Thanks.

6 Nov 2009, 7:05 PM
#9
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Increasing Size of Product Name Field

I added a field, product_subtitle through PHPMyAdmin to my WAMP products_description table, under product_name.

I added the line:

define ('TABLE_HEADING_PRODUCT_SUBTITLE','subtitle');

to both includes/languages/english.php and includes/languages/MY_TEMPLATE/english.php.

As I saw no change in the Admin/Categories/Subcategories/products/product editing menu, I refreshed the screen; then rebooted my computer.

I was hoping to see a "subtitle" box just below the product_name box on the editing screen, but there has been no change.

What step am I missing?

7 Nov 2009, 6:07 AM
#10
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Increasing Size of Product Name Field

On trying to add a subtitle field to Easy Populate, it gets a little uncertain trying to squeeze it between products_name and products_description in similar patterns, since Smart Tags are involved in some of those places in Easy Populate.

I think the products_name field might need to stay small for some of its uses, so I hesitate to try to increase the size of the field and join the subtitle with the name field in Excel.

If someone knows how to (1) make a subtitle appear in the products Admin editing screen near the product name (mine does not, though it is in my database), or (2) place it at exact positions in Easy Populate near product name (example placements needed), I might pick up the effort again.

I guess pioneering this is a low priority compared to getting my products on the website. I need to turn my attention elsewhere for now.

14 Nov 2009, 6:39 PM
#11
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Increasing Size of Product Name Field

In continuing to try to add a subtitle field, I wondered how I would address where it would appear on the page. I ran across this discussion by Hareslade #366 in the Product Type Book (by Moku) thread.

http://www.zen-cart.com/forum/showthread.php?p=485427&highlight=subtitle#post485427

Hareslade thought of just adding the subtitle to the title, as discussed above. I am therefore going to join the title and subtitle columns. I am a little concerned about adding the <br> and </br> commands in the title, and hope they will not appear on the page.

This should solve the immediate problem of getting the subtitle information into the product display, although it does involve the extra step of joining title and subtitle columns in CSVed (modify 2, join columns in CSVed) or other spreadsheet.

Thanks to the contributors above and to Hareslade who has given some really informative, great support since creating the updated book module.