Page 1 of 1

Custom product fields

Posted: Sat Jun 11, 2011 7:09 am
by tjonnyc
I would like to add 20 custom fields to the Product > Data section.

The problem is, different products will have different attributes, so I would like to be able to assign field names as well as the field data, for each product on an individual basis, from the Admin panel.

(By "individual basis", I mean that not all products will have all attributes - some will have ABCDEFGH, some will have ABCKLM, some will have DEFLMN, and so on.)

For example:

Attribute 01 Name: [---------]
Attribute 01 Value: [----]
...
Attribute 20 Name: [---------]
Attribute 20 Value: [----]

Now, since not all products will have all 20 attributes, and I don't want blank lines to display on the product form, I'd like to format it in a "foreach loop" way.

Any PHP programmers here who can assist with this?

Re: Custom product fields

Posted: Wed Jun 15, 2011 8:35 am
by c2c
Take a look at "Product Extra Fields" contrib. I use it and works perfectly. Only the fields show up that have a value. May save you a lot of work. I also use the Layered Navigation contrib that works hand in hand with the extra fields.

Re: Custom product fields

Posted: Wed Jun 15, 2011 8:37 am
by Xsecrets
In addition if you are using 1.5 then have a look at product attributes. It's basically what you are describing, and it's built into the system.

Re: Custom product fields

Posted: Wed Jun 15, 2011 6:25 pm
by dijitul
The Product Attributes don't appear to be showing in opencart 1.5.0.4 or 1.5.0.5:

ie:
http://89.255.132.235/contour_plus/contour_plus_camera

You view compare and >SOME< of the attribs display, but not all.

Quite Annoying, although not as annoying as the prod image not showing! Fingers crossed that'll fix when moving from an IP to a domain :laugh:

Re: Custom product fields

Posted: Wed Jun 15, 2011 11:24 pm
by Xsecrets
must be your theme. In the default theme they show up under a tab called specifications.

Re: Custom product fields

Posted: Thu Jun 16, 2011 6:25 pm
by dijitul
Xsecrets wrote:must be your theme. In the default theme they show up under a tab called specifications.
If you didn't notice - that is the default theme ;)

Re: Custom product fields

Posted: Thu Jun 16, 2011 6:29 pm
by dijitul
It Appears the Attributes are not saving in 1.5.0.5, unless a DB Upgrade is required.

EDIT: Backed up, Fully Updated and Restored Back up and they work - if anyone else has the same issue!