Jump to content

- - - - -

creating new fields

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1   sballen

  • Members
  • 118 posts

Posted 30 June 2012 - 21:24

I can not understand the below statement at all. Or, can I understand the attributes. So, I want to create about three new fields and do away with the attributes.

Can anyone explain the below statement, and give step by step instructions for creating fields (1. upc) (2. size) (3. color) and (4. add_to_description [my description comes to me from my suppliers, but sometimes I have something I'd like to add to it. It would be must faster if I could add it in another column and that column will dump it right beneath the description when taken to the site.])

// ** products table **
// Lets say you have added a field to your "products" table called (where's the product" table?)
// "products_upc". The header name in your import file will be
// called "v_products_upc". Then below you will change the line
// that looks like this (without the comment double-slash at the beginning):
// $custom_fields[TABLE_PRODUCTS] = array(); // this line is used if you have no custom fields to import/export
// TO:
// $custom_fields[TABLE_PRODUCTS] = array( 'products_upc' => 'UPC' );
// If you have multiple fields this is what it would look like:
// $custom_fields[TABLE_PRODUCTS] = array( 'products_upc' => 'UPC', 'products_restock_quantity' => 'Restock' );
// ********************************

Samuel B. Allen

Thanks for not spamming the forum

Edited by Jan Zonjee, 01 July 2012 - 06:56.

#2 ONLINE   Jack_mcs

  • Members
  • 26,424 posts

Posted 01 July 2012 - 00:01

That code is from the easy populate contribution. It won't create a new field in the database. It just allows you to manipulate an existing field.