Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Custom product fields?


captainbohica

Recommended Posts

Posted

Hi everyone. I'm a complete newbie to oscommerce and toying with code/database all together but have been working my way around...

 

Hopefully someone can point me in the right direction or give me some guidance, but this is in regards to products in the catalog.

 

Currently when i go to add a new product, there are fields such as "Products Model", and "Products weight"...

 

If i wanted to replace those fields with something like, "Product Year" and "Card number" [the site I am trying to create is selling sports cards], It is my understanding that I would need to add those fields in the database in phpmyadmin, correct?

 

I tried to just renaming "products_model" to "Products_year" and received the 1054 error so i changed it back.

 

so how can I customize the fields for the new product page on the admin side?

 

Thank you in advance for the help!

Posted

Just to give you an idea...What I would like to ultimately do is take this page on my site..

 

http://chargercards.com/index.php?manufacturers_id=10

 

and reflect the following columns

 

Year

Product Name

Player Name

Card Number

Qty

Price

Buy it Now

 

all so the user could sort by each column and I would like to eventually add additional boxes on the left hand column similar to the "manufacturers" drop down menu ...

Posted

This can be done, by modifying the database as well as the coding. Think of it as just "adding on" to the existing. There may be a contribution for more fields, try searching there.

Posted
This can be done, by modifying the database as well as the coding. Think of it as just "adding on" to the existing. There may be a contribution for more fields, try searching there.

 

Yikes.

 

Ok thanks for heads up. I'll try the contributions

Posted

PEF worked fine for me.

 

But try them both

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
Hi everyone. I'm a complete newbie to oscommerce and toying with code/database all together but have been working my way around...

 

Hopefully someone can point me in the right direction or give me some guidance, but this is in regards to products in the catalog.

 

Currently when i go to add a new product, there are fields such as "Products Model", and "Products weight"...

 

If i wanted to replace those fields with something like, "Product Year" and "Card number" [the site I am trying to create is selling sports cards], It is my understanding that I would need to add those fields in the database in phpmyadmin, correct?

 

I tried to just renaming "products_model" to "Products_year" and received the 1054 error so i changed it back.

 

so how can I customize the fields for the new product page on the admin side?

 

Thank you in advance for the help!

 

 

I am a newbie as well. Can you tell me how you add a product??? I am so lost. Thanks so much.

Posted

ok. i took a look at the instructions for the contributions.......and well.......im now cross eyed. lol.

 

 

i'd like to try to figure another workaround before trying to contribution....

 

can anyone else give me a little direction on editing the names of the product fields?

Posted

Changing the names can be accomplished via-database. But to add/remove is when it becomes difficult.

Posted
Changing the names can be accomplished via-database. But to add/remove is when it becomes difficult.

 

 

i tried that.. changing the database...

 

i edited PRODUCT_MODEL to PRODUCT_YEAR, and changed the other things (VARCHAR) and string length, but received the unknown column error... but probably because I didn't change the coding....

 

which brings me to my next question... what specific files do I need to go and change the coding from PRODUCT_MODEL to PRODUCT_YEAR?

 

and once im in those files, is it as simple as replacing all instances of PRODUCT_MODEL to PRODUCT_YEAR????

Posted

Product model is a key field, so it is hardly surprising you start to get errors.

 

It would be a nightmare to change the name of one field because you would then have to change it through out the code on the site.

 

If you don't know about key fields you are on a hiding to nothing trying to do this.

 

I really, really, really, ......... recommend that you don't just change a name. It wont work without a lot of editing.

 

People will support you installing and using contributions doing something st**id will put them off.

 

So install a contribution and adapt that.

 

Good luck

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

Please note, that the field "products_model" has to be unique and the field "weight" is used to calculate the shipping costs.

 

I am using a lot of extra fields in my shop (www.discorder.de). I have used "product extra field" and it works well for me.

However, adding some fields means to add them in database tables and in php codeof several files. It will take a lot of time if you don't know how to write php code, but it is a "mission possible".

 

When I started, I had no idea concernig php and sql, but it is very satisfying to win the battle at the end :D:-)

 

Good luck

Thomas

Posted

Hi everyone.. i decided to try to add the PEF contribution and i've added all the files.. now im at this step..

 

Run the following SQL file on the database (usually through PHPMyAdmin):

product_extra_fields.sql

 

 

how do i RUN the file? I'm in my phpmyadmin for the database.. so what do I do now?

 

click on the SQL tab and now I see where I can run a SQL query...

 

what do I do now?

 

Thanks again for the continued help

Posted

hmm wait..

 

do i put the following (from the SQL file included in the PEF contribution) into the SQL field from phpmyadmin?

 

DROP TABLE IF EXISTS products_extra_fields;
CREATE TABLE products_extra_fields (
 products_extra_fields_id int NOT NULL auto_increment,
 products_extra_fields_name varchar(64) NOT NULL default '',
 products_extra_fields_order int(3) NOT NULL default '0',
 products_extra_fields_status tinyint(1) NOT NULL default '1',
 languages_id INT( 11 ) DEFAULT '0' NOT NULL,
 PRIMARY KEY (products_extra_fields_id)
);

DROP TABLE IF EXISTS products_to_products_extra_fields;
CREATE TABLE products_to_products_extra_fields (
 products_id int NOT NULL,
 products_extra_fields_id int NOT NULL,
 products_extra_fields_value varchar(64),
 PRIMARY KEY (products_id,products_extra_fields_id)
);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...