Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Support] Category Fields


Guest

Recommended Posts

Great contribution.

 

This might turn out to be one extremely helpful contribution if I can get it to do what I want.

 

I need to add a new field for the color.

 

Is there anyway, that I will be able to include this new field in a search, in other words, when I set all my colors for each item. will I be able to select the color from a pull down menu - like on the advanced_search page?

 

If there is anyway to figure this out, i would greatly appreciate it. customers searching time would be cut in half.

 

Thanks

 

Mark

Link to comment
Share on other sites

  • Replies 93
  • Created
  • Last Reply

Top Posters In This Topic

Sorry if this question is already in here. I am REALLY REALLY tired. I downloaded the Product Extra Fields. However, when I try to "Add Field", the screen flashed like it's updating and adding the field. But it's not. Can someone let me know what i did wrong. I am trying to add 2 new fields: Size, Music.

 

Thanks,

 

Irish

Link to comment
Share on other sites

  • 2 weeks later...

Got a little problem...Installed the contribution alright.

It works...but it DOESN't workon SUB-categorie's.

 

I want the whole category has the same inputs but instead it doesn't show anything. Only when i put the inputs ON the SUB-Category.

 

Someone can help me out. Greate contribution DUDE !! Thanx very much !!

Link to comment
Share on other sites

  • 1 month later...
Got a little problem...Installed the contribution alright.

It works...but it DOESN't workon SUB-categorie's.

 

I want the whole category has the same inputs but instead it doesn't show anything. Only when i put the inputs ON the SUB-Category.

 

Someone can help me out. Greate contribution DUDE !! Thanx very much !!

 

I need to add extra fieds in all categories ! On in each one couse there are a lot.... Please tell me how

 

Thanks !

Link to comment
Share on other sites

  • 2 weeks later...

Has anybody used this contribution with easypopulate? Is it even possible? I am going to be working on this all day, but if anybody has already done this I would like to hear what you did.

 

Also, is there a way to display the extra fields for the slave products, when the "Master Products" contribution is installed?

Edited by tr33b1rd
Link to comment
Share on other sites

  • 2 weeks later...
I need to add extra fieds in all categories ! On in each one couse there are a lot.... Please tell me how

 

Thanks !

 

that is a little bit hard and tricky. If you add any extra field to any specific category, then all products under that category will have extra field(s). However what if you move any product to under of another category which doesn't have such extra field. Beyond of that question, what if you remove whole sub category to under of another main category which doesn't have such extra fields? If future of this add-on could not able to manage such things your database may become untity.

Link to comment
Share on other sites

Hi All...Thanks for the contribution it is excellent! :)

 

I have a quick question though. I need both category specific fields as well as global fields so I wanted to use both "Product Extra Fields" and "Category Fields". However I noticed that the two contributions might not necessarily work together. Are my findings correct or is there a way to make them work in conjunction?

 

Any help will be appreciated. TIA!

 

Ronen

Link to comment
Share on other sites

  • 2 weeks later...

Hi!

 

Thanx for the great contribution. Quite many people have asked how to inherit fields in different categories. I did a tiny modification to admin/categories.php and it seems to be working. My rationale is to simply go through all the top level categories and if an extra field is found it will be included on the add/update product page. All the categories are included in cPath.

 

So find:

 

$extra_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name, products_extra_fields_category, products_extra_fields_type, products_extra_fields_order, products_extra_fields_status from " . TABLE_PRODUCTS_EXTRA_FIELDS . " where products_extra_fields_category = " . (int)$current_category_id . " ORDER BY products_extra_fields_order");

 

 

and replace it with:

 

 

$catIDs= str_replace("_",",",$HTTP_GET_VARS['cPath']);
$extra_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name, products_extra_fields_category, products_extra_fields_type, products_extra_fields_order, products_extra_fields_status from " . TABLE_PRODUCTS_EXTRA_FIELDS . " where products_extra_fields_category IN (".$catIDs.") ORDER BY products_extra_fields_order");

 

Very simple solution. I've just tried it and it seems to be working. Please test it and post your comments here.

 

Cheers,

 

Jani

Link to comment
Share on other sites

Hi Matty and congrats for this great contribution.

Finally, will you add support for multilanguage?

 

Thanks Juan Carlos

 

 

Thanks!

 

Yes - this is currently number one on my list and is in development as I write - it will be a part of the next release :D

 

Matti

Link to comment
Share on other sites

Anyone has this installed och can show a picture how it looks like?

Looking for a contr. that adds an extra category description, so that you will get 2 lines on information when your showing the sub categorys. Does this contr. do that? or? Does this work like "Category Descriptions MS2 1.9"

Link to comment
Share on other sites

Ik get the foloing fault?

 

1146 - Table 'eenleukgeschenk.TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS' doesn't exist

 

SELECT * FROM TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS WHERE products_id=56

 

[TEP STOP]

 

 

Do i have to make that table ?

Link to comment
Share on other sites

  • 1 month later...

Thanks for this great contribution! And thanks to Jani for the inheritance hack. Here's a modified version of Jani's code to allow inheritance from the top:

 

$catIDs= str_replace("_",",",$HTTP_GET_VARS['cPath']);
$extra_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name, products_extra_fields_category, products_extra_fields_type, products_extra_fields_order, products_extra_fields_status from " . TABLE_PRODUCTS_EXTRA_FIELDS . " where products_extra_fields_category IN (". "0,".$catIDs.") ORDER BY products_extra_fields_order");

Link to comment
Share on other sites

Thanks for this great contribution! And thanks to Jani for the inheritance hack. Here's a modified version of Jani's code to allow inheritance from the top:

 

$catIDs= str_replace("_",",",$HTTP_GET_VARS['cPath']);
$extra_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name, products_extra_fields_category, products_extra_fields_type, products_extra_fields_order, products_extra_fields_status from " . TABLE_PRODUCTS_EXTRA_FIELDS . " where products_extra_fields_category IN (". "0,".$catIDs.") ORDER BY products_extra_fields_order");

 

I just noticed that if you use the pull down menu to navigate between the categories, the hack does not work because it only shows the last the sub-category. E.g. I have 2 levels so cPath=24_54 becomes cPath=54 if I use the pull down. I guess it would be better to check the parent category in the sql-statement.

Link to comment
Share on other sites

  • 2 weeks later...

Any ideas on this one:

when I enter a product and hit the preview button I get the following error:

 

Warning: Invalid argument supplied for foreach() in /home2/webworkt/public_html/catalog/admin/categories.php on line 744

 

The product looks fine when I view it through the website.

Here is the line 744 code where the error is occurring:

 

foreach ($extra_fields_array as $key=>$val) {

 

Here is the error with a few additional lines of coder for reference:

<!-- Category Fields //-->
	<td class="main">
	 <?php 
	  echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"');
	  $extra_fields_names_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_EXTRA_FIELDS);
	  while ($extra_fields_names = tep_db_fetch_array($extra_fields_names_query)) {
		$extra_field_name[$extra_fields_names['products_extra_fields_id']] = $extra_fields_names['products_extra_fields_name'];
	  }

	  if ($HTTP_GET_VARS['read'] == 'only') {
		$products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id=" . (int)$HTTP_GET_VARS['pID']);
		while ($products_extra_fields = tep_db_fetch_array($products_extra_fields_query)) {

		  $extra_fields_array[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value'];
		}
	  }
	  else {
		$extra_fields_array = $HTTP_POST_VARS['extra_field'];
	  }

		foreach ($extra_fields_array as $key=>$val) {
		?>
		  <b><? echo $extra_field_name[$key];?>:</b> <? echo $val;?><br />
		<?
		}

	  echo "<br />" . $pInfo->products_description;
	 ?>
   </td>
<!-- Category Fields EOF //-->

Link to comment
Share on other sites

It seems that we are not able to post in the anouncement thread as requested at the opening of this thread so I'll do it here.

 

Has any one considered trying to incorperate a dropdown box with selections rather than just "Input" or "text"?

 

The reason I ask is because I am setting up a category for diamonds. Each diamond will have the same fields that are limited as to what can be entered into that field see below:

shape: round, Princess, heart, ovat,etc

Color: D,E,F,G,H,I,J,K,L

Clarity: FL, IF, VVS1, VVS2, VS1, VS2, etc.

... and so on ....

 

Having the ability to simply select what goes into a field would be a great solution for me.

Link to comment
Share on other sites

  • 3 weeks later...
I am trying to make an custom search page that will search only on e category and include the extra caregory fields. how would I go about doing that? What table do I find that info in, how do I get it, etc.

 

 

I will *try* and find time to do an update so that the extra fields will be searched.

 

Matti

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

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...