Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Sign in to follow this  

Product Extra Fields 2.1a in admin not displaying

Recommended Posts

ok have this working and its great, but one thing i cant seem to get is if i have sub categories, then the extra fields do not show up in the admin for me to edit, although they are there for the public on the main shop


it seems it all works fine if i only have one category, but multiple categories it doesnt anyone with any ideas

If it don't fit - Get a bigger hammer

Share this post

Link to post
Share on other sites

I have the same problem, works well in the main category but not in the subcategories of the administration!


Any ideas?

If you want it to show in subcategories, either specify the cat id or use enter ALL.


When adding or updating extra fields, put the desired categories id in the Category field, followed by a COMMA. The trailing COMMA is important, you need to add it after each category id even if you only write one category! If you want to have a field that will be used for all products, write "all" and nothing else. If you have subcate- gories, you can also put parent categories id here, the field will show up in all subcategories as well.

Tony Mazz

Share this post

Link to post
Share on other sites

Tony or Whomever may read this,


I am wondering the same issue described above, anything not in the first category of the admin product listing will not show Product Extra Fields. I assume it's not reaching for the right category_id or something. I'm no expert and like everyone here we are getting better at it, but a clearer example would be nice.


Tony explains to put a comma event if you write one category or write all, well "all" is in there as:


OR category_id='all'


The rest of the code responsible for the displaying of the fields is here:


// BOF Extra Fields Contribution (chapter 1.4)
  // Sort language by ID 
  for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
  //relevant fields bof
  $extra_fields_query = tep_db_query("SELECT *
  WHERE category_id like '% " . $current_category_id .  ",%'
  OR category_id=" . $current_category_id . " 
  OR category_id='all'
  OR pef.category_id=(SELECT c.parent_id FROM " . TABLE_CATEGORIES . " as c WHERE c.categories_id = " . $current_category_id . ")
  ORDER BY products_extra_fields_order");
  //relevant fields eof
  while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
  // Display language icon or blank space
    if ($extra_fields['languages_id']==0) {
   $m=tep_draw_separator('pixel_trans.gif', '24', '15');
 } else $m= tep_image(DIR_WS_CATALOG_LANGUAGES . $languages_array[$extra_fields['languages_id']]['directory'] . '/images/' . $languages_array[$extra_fields['languages_id']]['image'], $languages_array[$extra_fields['languages_id']]['name']);
	  <tr bgcolor="#F0F1F1">
	    <td class="main"><?php echo $extra_fields['products_extra_fields_name']; ?>:</td>
	    <td class="main"><?php echo $m . ' ' . tep_draw_input_field("extra_field[".$extra_fields['products_extra_fields_id']."]", $pInfo->extra_field[$extra_fields['products_extra_fields_id']]); ?></td>
// EOF Extra Fields Contribution


Any ideas on where to pop this comma or something in? If I find it, I will let you know.



Share this post

Link to post
Share on other sites

I've been looking at code to long and not looking for the obvious.


Tony is right... and I will clarify for anyone as dumb as me.


Once I had uploaded my catalog, put in multiple categories and started shuffling my sub-categories around, it then "didn't work."


Well, it was. Tony just didn't say it was adjusted to work in the Admin Panel and I went and looked at the hard solution.


IN THE ADMIN CONTROLS for Product Extra Fields, under the Category field where you put the category the extra field will be related to, enter in ALL. I would do this first (something to add to the contribution) to ensure it works through all of the site, then tweak it to the right parameters as I did.


This is a clear case of OT (operator trouble) and not reading the signs here by Tony.


Thanks, Dude!

Edited by geomilli

Share this post

Link to post
Share on other sites

To add to this little nugget...


The sub-categories are included in the catalog on the storefront by just inserting the root category id, but it will not show in the admin. If you want to have full control you have to include the id from the root categories to the sub-categories. A little flaw in the program, but survivable.


Example: 63, 62, 61, 71, 104,


63, 62, 61, is the root of the catalog and 71, 104, are the sub-categories. All of these are now editible in the admin control. If I add more sub-categories to the catalog, I will need to add the number to the string for admin access.


Hope that explains the issue better.

Edited by geomilli

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this