Zen Cart Logo
Forums / General Questions / Making 2 New Product Fields

Making 2 New Product Fields

Views: 465

Results 1 to 3 of 3
8 Jan 2012, 12:55 PM
#1
dustinwloring1988 avatar

dustinwloring1988

New Zenner

Join Date:
Feb 2011
Posts:
15
Plugin Contributions:
0

Making 2 New Product Fields

I’m making 2 new product fields, 3 extra images and a new table in the database to hold the following info.
The 2 fields are going to be “Condition” “Condition Description”. For the Condition field I want a drop down box with the following 5 options “New”, ”Refurbished”, ”Used”, ”Salvaged”, ”Other”. And for the Condition Description field just a text area but with predefined text strings that come up but editable based option selected from the Condition field. Like if they selected New – “Item new in box”, Refurbished – “Item was refurbished by the manufacturer”, Used – “Item works but might show signs of use”, Salvaged – “Item does not work as intended and is sold as is”, Other – Left blank. These would be displayed under the price on the product page.
The 3 extra images I want displayed like how eBay puts them under the main.
I don’t want to modify someone else mod I want to do this to learn more about php and MySQL.
Thanks
Dustin

8 Jan 2012, 1:00 PM
#2
dustinwloring1988 avatar

dustinwloring1988

New Zenner

Join Date:
Feb 2011
Posts:
15
Plugin Contributions:
0

Re: Making 2 New Product Fields

From the numinix mod here is what the table would look like

DROP TABLE IF EXISTS product_extra_fields;
CREATE TABLE product_extra_fields (
products_id int(11) NOT NULL default '0',
Condition text default '',
Condition_Describition text default '',
ImageX_1 varchar(50) default NULL,
ImageX_2 varchar(50) default NULL,
ImageX_3 varchar(50) default NULL,

PRIMARY KEY (products_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO product_extra_fields (products_id)
SELECT products_id FROM products where products_type = 1;

8 Jan 2012, 2:37 PM
#3
dustinwloring1988 avatar

dustinwloring1988

New Zenner

Join Date:
Feb 2011
Posts:
15
Plugin Contributions:
0

Re: Making 2 New Product Fields

Here it is if i modify numinix.com code i can not test it because all i have is a live site if someone could test it and let me know i would appreciate it also it is not done yet just a start still needed to change it to a drop down box and modify it so that the strings automatically come up.

And because i copied and modified it might have code that i don't need.

Any Ideas

Thanks
Dustin