Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

products_description table - added more columns


AA

Recommended Posts

Posted

I added some description fields to the products_description table.

 

products_format

HBDJ, SB, PB

 

products_publish

2002, 1986,

 

There are over 6,000 items to load and I needed to get as close to the QuickBooks database as I could for data transfers.

 

Is it necessary to edit any of the existing catalog/xxx.php files?

How do I get the new field options to show in the ADMIN settings?

 

Give me 6 months to dig into the myriad of osC files and study on PHP and I'll be up to speed on modifications. Meanwhile I need the site up yesterday.

 

Thanking you in advance for sharing your knowledge.

 

Ashford

Posted

There are several files in both the admin and catalog files that will need to be updated to accomodate the new fields.

 

First catalog:

catalog/product_info.php

Add additional fields to the select statement.

$product_info = tep_db_query("select p.products_id, pd.products_format...etc.

Then you will also need to display that information somehow. Look for how the name is displayed and copy and change to your new field info.

<?php echo $product_info_values['products_name']; ?>

like..

<?php echo $product_info_values['products_format']; ?>

It may seem a bit daunting, but with some trial and error, you can probably get it to look how you like. The above will only show the info on the product_info.php page, not anywhere else, eg. search results, shopping cart, etc.

 

For admin:

The main file that needs to be changed to show the fields when adding new products is:

admin/categories.php

There are several spots in the file where you will need to add your new fields info. Search for instances of products_name and use that format as a rule of thumb when putting in your new fields, just copy and change the info to match your fields. After looking at the code you should eventually be able to understand what some of it means and will begin to make sense what you're doing.

admin/includes/functions/general.php

You will also need to add your new fields here, use products_name as a guide like before and include your new info.

 

You may also need to update the corresponding language files, for field identifiers and such.

 

I don't know if that helped at all or just confused you more. It will take time and trial and error to get everything right. I hope I didn't leave anything out. Be sure to back up your original files and your database before starting.

 

Good Luck!

Archived

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

×
×
  • Create New...