Forums / Setting Up Categories, Products, Attributes / How To Add New Product Fields?

How To Add New Product Fields?

Views: 83,922

Results 41 to 60 of 159
14 Sep 2009, 1:23 PM
#41
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

How To Add New Product Fields?

ALiepinieks:

it won't break it, it simply ignores any fields that are not defined in the easypopulate.php file located under admin/includes.
to define these additional/custom fields, you could simply do a search for a similar type field in the aforementioned file, and then add the extra code (where relevant) after you've added your database fields of course. you need to ue a bit of common sense, but it worked for me making all the changes required (to easypopulate) in under 10min.

andrejs

Thanks. Good to know that it is possible to do that. Working on a different project right now, however, have to put this on the side for now. Will post results here, thanks again

Thank you,
autoace

15 Sep 2009, 2:39 AM
#42
lndlyb4 avatar

lndlyb4

New Zenner

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

Re: How To Add New Product Fields?

Can someone answer these questions for me?

After creating the new database, is it necessary to populate it with all of the product ids. It seems to me that the code will not work if the ids are not in the new table.

What is the easiest way to insert all of the ids into the new table. I have about 1200 products already in my database.

thanks

17 Sep 2009, 11:03 PM
#43
webego avatar

webego

New Zenner

Join Date:
Oct 2008
Posts:
36
Plugin Contributions:
0

Re: How To Add New Product Fields?

Hi lndlyb4,

Good question. You are correct that if you are not working on a fresh install and so already have products created then you will need to create a record in your new table for each product and also insert whatever default value you wish to use for your additional field. Otherwise when you try to edit a product, your changes to the new field will not be saved as the record does not exist to edit!

This is very easy to do assuming you have some basic knowledge of and access to phpmyadmin.

  1. Firstly open phpmyadmin and select your zen database.

  2. Then select the SQL tab from the top of the screen to display a box to enter the following sql (note the database and field names are based on my original example):

INSERT products_extra_stuff (products_id, products_colour)
SELECT products_id, 'YOUR_DEFAULT_VALUE_HERE' FROM products

  1. Note also that you can just leave the default value as '' rather than enter something if you prefer.

Let me know if that works for you.

G

23 Sep 2009, 6:08 AM
#44
buitrago avatar

buitrago

New Zenner

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

Re: How To Add New Product Fields?

I change all, included deleted,
in my case, the products has a "real code"* ( as I know, the code of the producto is not defined in a regular fields......is it correct ?).*

Anyway, my products has code, the name of the field is product_code...

I need to show this code in all the process

When the user see in a list, and when click in one of them.

Please, check the images..

what can I do...?
where can I find all the files and vars to know more about it.... ?

Please, check the images

Please, help me.....please.

Regards and forget my "bad english"

Thanks

24 Sep 2009, 8:23 AM
#45
webego avatar

webego

New Zenner

Join Date:
Oct 2008
Posts:
36
Plugin Contributions:
0

Re: How To Add New Product Fields?

Hola buitrago,

Yo puedo hablar un poco de español si ayuda.

Ya hay un 'field' (campo?) para "products model" en la parte inferior de la página para agregar / editar los productos. ¿Puedes usar esto?

26 Sep 2009, 3:13 PM
#46
buitrago avatar

buitrago

New Zenner

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

Re: How To Add New Product Fields?

No, webeo, thaks for u'r spanish.
Model es MODELO, caracteristica qeu provee el fabricante.
Codigo es el ID por el cual las tiendas clasifican su producto.

Ya logre incluirlo, ahora necesito visualizarlo. En la Admin, sale, lo edito, pero no lo logro visualizar.
Tal vez si alguien me especifica donde encontrar los archivos donde se visualiza.

No
"model field" is a self field of product, provided by the "marc". For example
PC : HP.
Model: XP-001

In this case, the "CODE" is a ID using only in a store.

Regards and gracias por tu español.

26 Sep 2009, 3:18 PM
#47
buitrago avatar

buitrago

New Zenner

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

Re: How To Add New Product Fields?

for lndlyb4
I work with a 12 mil productos, all with an extrafield..

Of course, one day of work, step by step.
product
product descriptions
product extrafield

big work, if u need some hep, please, contact me.

Regards

26 Sep 2009, 3:41 PM
#48
webego avatar

webego

New Zenner

Join Date:
Oct 2008
Posts:
36
Plugin Contributions:
0

Re: How To Add New Product Fields?

¿es posible que hayas el mismo problema que lndlyb4?

¿Has seguido las instrucciones que he dado a lndlyb4 en puesto 43 aquí para agregar un valor predeterminado para el nuevo 'field' a todos sus productos existentes?


Is it possible that you have the same problem as lndlyb4?

Have you followed the instructions I have given lndlyb4 in post 43 here to add a default value for the new field to all your existing products?

28 Oct 2009, 10:54 AM
#49
zahid_hussain avatar

zahid_hussain

New Zenner

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

Re: How To Add New Product Fields?

Hi All!!!!!
I upload my these updated files. So when I uploading main_template_vars.php, so it give me error, as my main image is not showing , please look the linkhttp://www.bestlaminate.net/index.php?main_page=product_info&cPath=106_108_134&products_id=359
Please urgent anybody help me .

Thanks
:oops:

28 Oct 2009, 4:22 PM
#50
zahid_hussain avatar

zahid_hussain

New Zenner

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

Re: How To Add New Product Fields?

As according to my above post !!!!!!

i think all the problem is to main_template_vars.php
and my there edited code is there . so please let me what i am missing there.

$sql = "select p.products_id, pd.products_name,
pd.products_description, p.products_model,
p.products_quantity, p.products_image,
pd.products_url, p.products_price,
p.products_tax_class_id, p.products_date_added,
p.products_date_available, p.manufacturers_id, p.products_quantity,
p.products_weight, p.products_priced_by_attribute, p.product_is_free,
p.products_qty_box_status,
p.products_quantity_order_max,
pdex.products_box_size,
p.products_discount_type, p.products_discount_type_from, p.products_sort_order, p.products_price_sorter
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_EXTRA_STUFF . " pdex

       where  p.products_status = '1'
       and    p.products_id = '" . (int)$_GET['products_id'] . "'
       and    pd.products_id = p.products_id
	   and    pdex.products_id = p.products_id
       and    pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";

Thanks
In Advance:clap:

28 Oct 2009, 6:25 PM
#51
webego avatar

webego

New Zenner

Join Date:
Oct 2008
Posts:
36
Plugin Contributions:
0

Re: How To Add New Product Fields?

Not sure what the problem that you are experiencing is. Your link looks okay to me. Maybe you have resolved this since your post?

28 Oct 2009, 6:57 PM
#53
zahid_hussain avatar

zahid_hussain

New Zenner

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

Re: How To Add New Product Fields?

i need another idea as well , if its possible that i will not add a new table and add a field in product table,

then if that will be work fine, as i face above problem
plz give me an idea.

Thanks:frusty:

28 Oct 2009, 7:26 PM
#54
webego avatar

webego

New Zenner

Join Date:
Oct 2008
Posts:
36
Plugin Contributions:
0

Re: How To Add New Product Fields?

Have you completed the steps from this post?

http://www.zen-cart.com/forum/showpost.php?p=781608&postcount=42

Is this only a problem for existing products before you made the mods or is this a problem if you create a new product too?

Also have you checked every step from the start?

28 Oct 2009, 7:30 PM
#55
zahid_hussain avatar

zahid_hussain

New Zenner

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

Re: How To Add New Product Fields?

yes i follow your instruction step by step,

i checking ur new point now.
and what you say about this idea,

i need another idea as well , if its possible that i will not add a new table and add a field in product table,

then if that will be work fine, as i face above problem
plz give me an idea.

Thanks

28 Oct 2009, 7:37 PM
#56
zahid_hussain avatar

zahid_hussain

New Zenner

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

Re: How To Add New Product Fields?

i want to restore my site back as this is a live site.

but the probelm is still there

28 Oct 2009, 9:34 PM
#57
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: How To Add New Product Fields?

New field is not populating when I want to edit a product. What can I check?

Heres what I have done: I have added the new field. I then added a products and added the data for the new field. Checked db - yup its in there! So then i want to edit. When I click on edit for that field the new field is not autopopulated. I dont want to have to fill in the new field each time I have so make a change to this product.

I must have missed something.

Thanks

1.3.8a

22 stores and counting! Ive been zenned.

28 Oct 2009, 10:09 PM
#58
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: How To Add New Product Fields?

Found it. It was an error in my collect_info.php line 312 for me. $pInfo->myNewField should have been $pInfo->MyNewField.

ta da... it works

22 stores and counting! Ive been zenned.

29 Oct 2009, 4:33 PM
#59
zahid_hussain avatar

zahid_hussain

New Zenner

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

Re: How To Add New Product Fields?

Hi !

i just follow your instruction as its you are,
but when want to add or edit a new product it give me error like
1054 Unknown column 'pdex.products_colour' in 'field list'
in:

Thanks
:laugh:
.8a

29 Oct 2009, 4:57 PM
#60
webego avatar

webego

New Zenner

Join Date:
Oct 2008
Posts:
36
Plugin Contributions:
0

Re: How To Add New Product Fields?

Looks like you have missed one of the substitutions for your own field name. Check through everything again ensuring you change every instance of products_colour to products_box_size (I think this is the name of your new field right?)