Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add More Fields


Recommended Posts

You have to add the field to the database call. Find in the product_info file the line that starts with $product_info_query = tep_db_query("select p.products_id and add your field to the list.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • Replies 190
  • Created
  • Last Reply

Top Posters In This Topic

You have to add the field to the database call. Find in the product_info file the line that starts with $product_info_query = tep_db_query("select p.products_id and add your field to the list.

 

Thanks Jack. I had did that already but it wasn't working. So I guess the cache wasnt cleared in Chrome. I gave up on it for a while and we had a power outage and decided to try again. Now everything seems ok.

Link to comment
Share on other sites

  • 2 months later...

Hello jack!

 

I have a problem with the fields that have a drop down list. All fields works fine but when I chose a value of the drop down and then save the product if I edit the same product again the field with the drop down is not saves the last chose!

Anything for this

Lazaros

regards

Lazaros

Link to comment
Share on other sites

It is probably due to a mistake in the edits for the admin/categories.php file. Try using the included one to see if it works. If it does, you will need to compare the two to find the problem or re-do the edits.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Try the one from the package first just to verify the problem is in yours. If it works, then the problem is in your file and needs to be compared.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

If it fails with the categories file from the addon, then it may be how the field is being created. The dropdown type has to be set to the products description table so you may want to check that.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

will > http://addons.oscommerce.com/info/8073 work with > osCommerce Online Merchant v2.3.3.3 ?

 

I found the place holder: http://addons.oscommerce.com/info/8197

 

Add More Fields

for osCommerce Online Merchant v2.3

 

Not able to locate lines of code as directed in structions.

 

7) In admin/categories.php.php,

FIND (around line 470):

 

   } elseif (tep_not_null($HTTP_POST_VARS)) {
     $pInfo->objectInfo($HTTP_POST_VARS);
     $products_name = $HTTP_POST_VARS['products_name'];
     $products_description = $HTTP_POST_VARS['products_description'];
     $products_url = $HTTP_POST_VARS['products_url'];

 

FIND (around line 756):

 

} elseif ($action == 'new_product_preview') {
   if (tep_not_null($HTTP_POST_VARS)) {
  $pInfo = new objectInfo($HTTP_POST_VARS);
  $products_name = $HTTP_POST_VARS['products_name'];
  $products_description = $HTTP_POST_VARS['products_description'];
  $products_url = $HTTP_POST_VARS['products_url'];
   } else {
  $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

 

FIND (around line 823):

 

$pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);

 

FIND (around line 925)

 

echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));

 

8) In product_info.php,

 

Instruction 8) does not specify which directory to look in for: product_info.php,

 

All feedback welcomed. This appears to be a helpful OSC Addon I wish to utilize.

Link to comment
Share on other sites

The first problem is a mistake in the instructions, mentioned previously in this thread. It has been fixed in the next version. I'll try to get that uploaded soon. I'll have to look at the second two. No one has had any problems installing into a 2.3 shop, including myself, but not everyone uses the text so that may be wrong. The product_info file is in the root directory. If it, any file, is located elsewhere, the path is given.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 6 months later...

Hi Jack,

Thanks for the add on.

I've installed it on my 2.3.3 site and it seems everything is fine except for when I go to my admin then catalog and click on add fields all I see is a tiny little square. It seems like the admin/add_fields php file was the culprit. So I used the "less then 2.3 version" from the package and now it works, BUT the admin categories look all screwed up. Do you know where I went wrong.

 

1. installed greater than 2.3 version

2. only shows tiny square

3. used less then 2.3 version admin/add_fields.php file,

4. now works but admin categories looked messed up

 

Thanks in advance Jack!!

Link to comment
Share on other sites

The pre-2.3 version will work but the display will be messed up, as you've found. The only differences between the two files is the code to make it work for one version of oscommerce or the other. If one will work the other should. All I can suggest is that the 2.3 version you uploaded was corrupted somehow. Maybe try uploading it again?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the quick response. Tried re-upload. Same story. It's no big deal though. I'll just use the old version file and live with the way the column looks. Great contribution. I'm gonna test it out right now. Thanks for trying anyways!

 

You the man Jack. And remember....

All work and no play makes a dull Jack.. :thumbsup:

Link to comment
Share on other sites

  • 4 months later...

Hi, when I click on Catalog-> Add More Fields, I get the error message

error.gif Easy Populate is not installed.

 

Can you tell me how I could get round this?  This is the first addon that I have tried on this store.  I have been through the process twice with the same result.  I couldnt find a solution in this topic.

 

Can any one help me?

Thanks

Link to comment
Share on other sites

It isn't an error - just a notice. It is letting you know that the easy populate addon is not installed. You can install it if you want or just ignore the message.  Easy Populate is one of the most popular and best addons to have in a shop so you may want to consider installing it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Ok, I will look into that, thanks.  Apart from the notice at the top, there is nothing else available when I click on Catalog-> Add More Fields - am I missing something really obvious?  

Thanks for your help

Link to comment
Share on other sites

You should be seeing something. See if there is a file named error_log in the admin directory and if there is, see if there are any errors relating to this.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

You should be seeing something. See if there is a file named error_log in the admin directory and if there is, see if there are any errors relating to this.

Sadly no, I cant find any error log files.  I'll try the procedure again, but I've tried it twice on a fresh install each time, not sure where I am going wrong.  Thanks for your help.

Link to comment
Share on other sites

You may want to ask your host to see if they are seeing any errors. Or in the add_more_fields.php file in admin after

  require('includes/application_top.php');

add this

 
  error_reporting(E_ALL);  
  ini_set('display_errors','1'); 

Then try refreshing the page to see what errors show.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

You may want to ask your host to see if they are seeing any errors. Or in the add_more_fields.php file in admin after

  require('includes/application_top.php');

add this

 
  error_reporting(E_ALL);  
  ini_set('display_errors','1'); 

Then try refreshing the page to see what errors show.

 

 

Thanks for this.  This is the start of the error messages that I get:

Notice: Constant HEADING_TITLE already defined in /catalog/admin/includes/languages/english/add_more_fields.php on line 14 
Notice: Constant HEADING_TITLE_AUTHOR already defined in /catalog/admin/includes/languages/english/add_more_fields.php on line 15 
Notice: Constant HEADING_TITLE_SUPPORT_THREAD already defined in /catalog/admin/includes/languages/english/add_more_fields.php on line 16 
Notice: Constant TEXT_EASYPOPULATE_HEADING already defined in /catalog/admin/includes/languages/english/add_more_fields.php on line 18 
Notice: Constant TEXT_EASYPOPULATE_SUBHEADING already defined in /catalog/admin/includes/languages/english/add_more_fields.php on line 23 
Notice: Constant TEXT_MISSING_VERSION_CHECKER already defined in /catalog/admin/includes/languages/english/add_more_fields.php on line 25 
Notice: Constant TEXT_SUBHEADING already defined in /catalog/admin/includes/languages/english/add_more_fields.php on line 31 
 
I understand what the notice is saying, but I have no idea how to fix it.  (I'm new to all this).  I'll do a bit of google research to see if I can shed any light on it!
Thanks again
Link to comment
Share on other sites

It's not the first ones that explain the problem. It's the last one, usually. All of the ones you listed would not cause the problem you are having.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It's not the first ones that explain the problem. It's the last one, usually. All of the ones you listed would not cause the problem you are having.

 

Hi

Thanks for your reply.  The last line of the error message is this:

 

Fatal error: Cannot redeclare tep_sort_admin_boxes() (previously declared in /admin/includes/column_left.php:40) in /admin/includes/column_left.php on line 40

 

I dont have any understanding of this, can you guide me?

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...