Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Extra Fields


KiLLaH

Recommended Posts

why don't you use links for each extra field value that lead to a page of results, instead of creating menus that will contain hundreds of items... and not even redirect the customer to anything (just a drop down menu?)

 

Actor: Robert de Niro

Genre: Thriller

Director: Martin Scorcese

 

For this, the extra field mod is not the easiest to work with. It would be better to create "real" fixed fields in your products table, and not in a related table, because you will be using - and also extending - the advanced search results link structure that searches in your products table extra fields.

 

I like that. I actually wouldn't have as many options as it might seem as I actually only put in the popular names that people might actually come looking for, but is your method of creating those links easier? If that linked back to the product listing.php page and then showed just Actor=Robert de Niro that would work.

 

I've begun to consider the idea of adding extra fields to the product table. I might go that route but would still want to be able to group on those rows. The other thing doing so would accomplish is make my site more compatible with Easy Populate which I could see be very handy.

 

Btw, the drop down menu would redirect to the product_listing.php page and give a list of products that have the same exact value in the same exact extra field. Actort=Rober de Niro would give me a product_listing.php with all the products in my system that de Niro was an actor in and that I have availabe.

 

I'm still not sure you're following what I'm talking about. It would basically be a bunch of MFG type lookups that link to product_listing, just as if you select a MFG and were shown all their products. Does that make sense?

Link to comment
Share on other sites

  • Replies 225
  • Created
  • Last Reply

Top Posters In This Topic

I like that. I actually wouldn't have as many options as it might seem as I actually only put in the popular names that people might actually come looking for, but is your method of creating those links easier? If that linked back to the product listing.php page and then showed just Actor=Robert de Niro that would work.

 

I've begun to consider the idea of adding extra fields to the product table. I might go that route but would still want to be able to group on those rows. The other thing doing so would accomplish is make my site more compatible with Easy Populate which I could see be very handy.

 

Btw, the drop down menu would redirect to the product_listing.php page and give a list of products that have the same exact value in the same exact extra field. Actort=Rober de Niro would give me a product_listing.php with all the products in my system that de Niro was an actor in and that I have availabe.

 

I'm still not sure you're following what I'm talking about. It would basically be a bunch of MFG type lookups that link to product_listing, just as if you select a MFG and were shown all their products. Does that make sense?

 

These links are really easy to create, here is the secret ;-)

 

 

Go to the advanced sarch page of your store, and enter a word to search, launch the search and look how the url that you get is built:

 

I search for Robert de Niro for example, the URL that is built with this search is:

 

http://www.yourdomain.com/advanced_search_result.php?keywords=robert+de+niro&x=46&y=18&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=&pto=&dfrom=&dto=

 

we can trim it to:

 

http://www.yourdomain.com/advanced_search_result.php?keywords=robert+de+niro

 

and relaunch the search, it still works:

 

So building a link that will search for your extra fields is not very difficult:

 

echo 'Actor: <a href="http://www.yourdomain.com/advanced_search_result.php?keywords='  . escape($extra_field_value) . '">'. $extra_field_value . '</a>;

 

 

to achieve the search in your extra fields, you will have to alter your advanced_search_results.php page where the database is queried against the keyword:

 

look at mine as an example:

 

 default:
	  $keyword = tep_db_prepare_input($search_keywords[$i]);
	  $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or pd.products_description like '%" . tep_db_input($keyword) . "%' or pd.products_keywords like '%" . tep_db_input($keyword) . "%'";
	  if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'";
	  $where_str .= ')';
	  break;

 

versus the Oscomemrce original one:

 

		default:
	  $keyword = tep_db_prepare_input($search_keywords[$i]);
	  $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'";
	  if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'";
	  $where_str .= ')';
	  break;

 

 

You will notice that

 

1) I added the field "products_keywords", (this field is my dynamically generated keyword metatag: sometimes, I enter terms in that field that I don't want to be seen in my description - for example misspelled words, or competitor brands - but still want some results to be returned, hehe).

 

2) I also forced the search to always search in description

 

These two additions will be required if you implement this technique: forcing the search and adding the fields where you want to extend search

 

 

This technique works assuming your extra fields are not overlapping (meaning a value in a field is not found in any other field. (example with Clint Esatwood: he can be actor but also a director: a click on a link reading "actor: Clint Eastwood" will find all the occurences , no matter what if he is an actor or a director in the movies retreived. If you can live with that, fine. Otherwise, you will have to compartiment the searches. A simple technique would be to duplicate the advanced_search_results page as many times as extra fields you have, and adpat every page to the extra field that you want to search in (you may also remove others fileds if not needed not of course, like model, product name, etc...). then your product page links will look like:

 

 

<div>
<?php
echo 'Actor: <a href="http://www.yourdomain.com/advanced_search_result1.php?keywords='  . escape($extra_field_value) . '">'. $extra_field_value . '</a><br>;
echo 'Director: <a href="http://www.yourdomain.com/advanced_search_result2.php?keywords='  . escape($extra_field_value) . '">'. $extra_field_value . '</a><br>;
echo 'Genre: <a href="http://www.yourdomain.com/advanced_search_result3.php?keywords='  . escape($extra_field_value) . '">'. $extra_field_value . '</a>;
?>
</div>

 

I hope (and I think!) this will help. Keep us posted!

Link to comment
Share on other sites

These links are really easy to create, here is the secret ;-)

 

That does work just fine, thanks for the idea. In working on this though it has come to my attention that sometimes my products are loosing the values that I've assigned to their extra fields. I just edited one that had all the extra fields and then went back later and found that they were all gone. I've suspected this to be happening on other products but only just prooved it to myself with a product I knew was filled in. Do you know of why this might happen? I can't seem to recreate the problem simply by opening and closing them. There must be a mechinism underwhich they are unlinked or removed.

 

I'm not sure the extra field contrib is working for me. (Especially if they disappear.) In fact for my needs I realize what I really need isn't just a field but a complete set of tables per some of the fields. Like the manufacturer tables. Especially for actor, director, and so forth, not only so I can sort related products but so I can hold additional information about each.

 

Do you know of a mod that adds addition MFG like tables? Or would I just need to recreate the mfg system over and over, adding possibly and extra field to products for an id, and then then an actor_to_products table to track the relationships?

 

It's getting complicated I think, maybe I should seek a professional. My teeny bit of php experience doesn't give me the skills for this. Thought I'd check though!

Link to comment
Share on other sites

ixnay on that! I think I over-easy_poppulated! No, somehow using full inserts on my last backup, when I restored it has create new copies of a subcategory into the main root of categories? After removing them from the export file, and manually deleting the categories created in the admin, it seems the products now have their proper extra fields. errr.. easy populate... going to check the compatibility a bit I guess?

Edited by con4mity
Link to comment
Share on other sites

<div>

<?php

echo 'Actor: <a href="http://www.yourdomain.com/advanced_search_result1.php?keywords=' . escape($extra_field_value) . '">'. $extra_field_value . '</a><br>;

echo 'Director: <a href="http://www.yourdomain.com/advanced_search_result2.php?keywords=' . escape($extra_field_value) . '">'. $extra_field_value . '</a><br>;

echo 'Genre: <a href="http://www.yourdomain.com/advanced_search_result3.php?keywords=' . escape($extra_field_value) . '">'. $extra_field_value . '</a>;

?>

</div>

 

That static nature of this bothers me. I want to build the Field Names from the products_extra fields table. I'm using this:

 $extra_fields_query = tep_db_query("
	 SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
	 FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
	 LEFT JOIN  ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
	 ON ptf.products_extra_fields_id=pef.products_extra_fields_id
	 WHERE ptf.products_id=". (int) $products_id ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."')
	 ORDER BY products_extra_fields_order");

 while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
	if (! $extra_fields['status'])  // show only enabled extra field
	   continue;
	echo '<tr>
  <td width=30></td><td>
  <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
	echo '<font size="1" color="#666666"><a href="http://www.yourdomain.com/advanced_search_result.php?keywords="' .$extra_fields['value'].'">'.' .$extra_fields['value'].'</a><BR></font> </tr>
  </table>
  </td>
  </tr>'; 
 }

 

That's close I'm going to give it a try shortly.

Link to comment
Share on other sites

Actually there are some typos in that. This produces the desire looking link, but doesn produce the results. It's close I think there's a capsulation issue here. It's closer, can you see my problem, I don't quite understand the

 

. escape($extra_field_value) .

 

that you used, or how to apply it in my code. How would you do it here:

 

// Added 021107
	 while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
	 	   if (! $extra_fields['status'])  // show only enabled extra field
	   	   continue;
		   echo '<tr>
			 		<td width=30></td><td>
				  <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
				  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
		   echo '<font size="1" color="#666666"><a href="advanced_search_result.php?keywords="'. $extra_fields['value'].' ">';
		   echo $extra_fields['value'];
		   echo'</a><BR></font> </tr></table></td></tr>'; 
			  }

 

 

something like:

 

// Added 021107
	 while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
	 	   if (! $extra_fields['status'])  // show only enabled extra field
	   	   continue;
		   echo '<tr>
			 		<td width=30></td><td>
				  <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
				  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
		   echo '<font size="1" color="#666666"><a href="advanced_search_result.php?keywords='. $extra_fields['value'].'">';
		   echo $extra_fields['value'];
		   echo'</a><BR></font> </tr></table></td></tr>'; 
			  }

 

Which Seems to work real nice! Gonna run with that for a bit!

Edited by con4mity
Link to comment
Share on other sites

I don't quite understand the

 

. escape($extra_field_value) .

 

that you used, or how to apply it in my code.

 

it turn "robert de Niro" into "Robert+de+Niro" when it builds the url. That's it.

Link to comment
Share on other sites

my advanced search is similiar to yours

 

		  $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or pd.products_description like '%" . tep_db_input($keyword) . "%' or p2pef.products_extra_fields_value like '%" . tep_db_input($keyword) . "%'";

 

and yes there is a problem with it pulling from all, I think i need to figure out how to just query my p2pef.products_extra_fields_value table as the results would be 90% by skipping the other fields for this search.

 

Any ideas on that?

Edited by con4mity
Link to comment
Share on other sites

Okay, this works pretty well. I now generate my extra fields, and the values are links back to advanced_search_results.php poplulated with related products. But as was mentioned because of the extensive seach pattern, any appearance of the keywords shows up.

 

To deal with this I figured that since I was calling the advancedd_search_results.php directly and bypassing the advanced_search.ph and not hitting the "Search" but I should be able to test for that action. Does anyone know what action to test for? (action=submit) the button is:

<?php echo tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH); ?>

It seems like I could work this in as

 

if $action != 'Submit' {
where=full where statement
}else{
where=extra fields only
}

 

But, since that doesn't work, and I'm not yet sure if there is an action variable, or maybe i need to define and set it up in the check_form function, but again since I'm not sure what it is, I cheated at the moment by adding an extra variable in my link, extrafield=yes, now I can do the same thing, I just hate adding this extra variable considering that what I need is likely already there. But maybe if someone can point it out I can get swap it out at that time.

 

The escape did work, I had an extra .' in there messing things up. My links now work. Here's a sample. sample page

 

To me, this should be an option in the admin, to either make the field linkable or leave it unlinked. Maybe just an extra table, products_extra_field_linked, when it's set to true it generates the link like I have, if false, just output the regular line. To me I can't see how people aren't wanting this. Make it a add-on to an add-on or something.

 

Do you think it's worth adding this feature and upload it to the contributions page? Or ... yes I think you should it's very nice, even nicer if you can figure out how to test it the actual search button was pushed or not, or maybe by testing for referrer, and if it's not advanced_search.php, use the modified where claus.

 

Heck, I bet if you're good with joins you could even get it to just search in that exact extra field and not all of them.

 

What do you think?

Link to comment
Share on other sites

escape($extra_field_value) .

it turn "robert de Niro" into "Robert+de+Niro" when it builds the url. That's it.

 

Well, I'm not using it and my searches are seeming to work right, but I'm curious what I'm doing wrong that escape() seems to break my link instead of fixing them. See how I have them below. When I do this nothing is echoed to the screen.

 

// Added 021107
  while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
	   if (! $extra_fields['status'])  // show only enabled extra field
		continue;
		 echo '<tr>
				  <td width=30></td><td>
				 <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
				  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
		   echo '<font size="1" color="#666666"><a href="advanced_search_result.php?keywords='. $extra_fields['value'].'">';
		   echo escape($extra_fields['value']);
		   echo'</a><BR></font> </tr></table></td></tr>'; 
			  }

 

This just produces the first extra field name, not the value and none of the extra field names after the first. Obviously excape($extra_field['value']) is the problem, since taking escape out makes it work again, but it doesn't produce Robert+de+niro, just Robert de Niro. Is the sytnax wrong... or... what?

Edited by con4mity
Link to comment
Share on other sites

escape($extra_field_value) .

Well, I'm not using it and my searches are seeming to work right, but I'm curious what I'm doing wrong that escape() seems to break my link instead of fixing them. See how I have them below. When I do this nothing is echoed to the screen.

 

// Added 021107
  while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
	   if (! $extra_fields['status'])  // show only enabled extra field
		continue;
		 echo '<tr>
				  <td width=30></td><td>
				 <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
				  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
		   echo '<font size="1" color="#666666"><a href="advanced_search_result.php?keywords='. $extra_fields['value'].'">';
		   echo escape($extra_fields['value']);
		   echo'</a><BR></font> </tr></table></td></tr>'; 
			  }

 

This just produces the first extra field name, not the value and none of the extra field names after the first. Obviously excape($extra_field['value']) is the problem, since taking escape out makes it work again, but it doesn't produce Robert+de+niro, just Robert de Niro. Is the sytnax wrong... or... what?

 

you need to escape the link, not the anchor text, hey! :

 

<a href="advanced_search_result.php?keywords='. escape($extra_fields['value']) . '">';
		   echo $extra_fields['value'];
		   echo'</a><BR></font> </tr></table></td></tr>';

Link to comment
Share on other sites

) is the problem, since taking escape out makes it work again, but it doesn't produce Robert+de+niro, just Robert de Niro. Is the sytnax wrong... or... what?

 

this works though str_replace(" ", "+", $keywords);

 

 

Oddly enough, some part of this broke the search in that now I can't search using Quotes. When I search for say Alan Moore, I get all the products with Alan Moore in them. But if I search for "Alan Moore" I don't get anything.

Edited by con4mity
Link to comment
Share on other sites

you need to escape the link, not the anchor text, hey! :

 

<a href="advanced_search_result.php?keywords='. escape($extra_fields['value']) . '">';
		   echo $extra_fields['value'];
		   echo'</a><BR></font> </tr></table></td></tr>';

 

 

Actually, when I edited that last post I put the value backwards. What I was trying was:

 

<a class="ml" href="advanced_search_result.php?keywords='. escape($extra_fields['value']) .'">' . $extra_fields['value'] . '</a>

 

But it doesn't work. The field ends up being empty and it ends execution of the while statement so it doesn't output the remaining extra_fields. As a fix to this I did it the long way for now.

 

// Added 021107
while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
	 	   if (! $extra_fields['status'])  // show only enabled extra field
	   	   continue;
		   echo '<tr>
				 <td width=30></td><td>
				 <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
		  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
							//Added 021207 Check for Output Style 1=Linked 0=Normal
	if($extra_fields['linked'] == 1) {
	$extra_fields_value=str_replace(" ", "+", $extra_fields['value']);
		   	echo '<font size="1" color="#666666"><a class="ml" href="advanced_search_result.php?keywords='. $extra_fields_value .'">' . $extra_fields['value'] . '</a><BR></font> </tr></table></td></tr>';
	} else {
	echo '<font size="1" color="#666666">' . $extra_fields['value'] . '<BR></font> </tr></table></td></tr>';
	}

 

You'll notice a few new pieces here besides the str_relpace. First I've added an extra tabel to the products_extra_fields table called products_extra_fields_linked. This is just yes/no and I can turn it on in the admin, just like status column. If it's on the system creates the links, if false then it outputs normal lines. I think eveyone should add this simple functionality because it makes finding related products easy and it can be left off when not needed.

 

But I haven't found a good trigger to define when to limit my search clause, so it's a bit incomplete.

Link to comment
Share on other sites

I haven't found an adequate answer to my question. Maybe someone can help?

 

I want the Extra Fields to show up like this:

 

ITEM NAME - ITEM PRICE

 

EXTRA FIELD ITEM

EXTRA FIELD PICTURE

EXTRA FIELD

 

ITEM DESCRIPTION

 

I've read through this thread and I can't figure out how to do it. I have everything installed and my fields show up, but they show up on top of everything and skew the layout in a weird way.

Link to comment
Share on other sites

  • 2 weeks later...

I have been looking everywhere for a solution for this (which is probably really simple), so I am posting here. I have the Extra Fields 2.0j addon installed, and it works great. I use two custom fields, one of them being 'brief description'. What I want to do is print out this custom field (not the second field) under each product in the product/category list. Anyone knows how to do this?

Link to comment
Share on other sites

  • 2 weeks later...

Hi Everybody,

 

I'm in the process of building my store and I thought it is better to start with adding extra features now then later. I added this contribution but I can not get it to work. It must be something simple I have overlooked because I don't see anywhere the option to add extra fields on my configuration page. I checked every single file the sql and I think everything was applied correctly. I don't see the error. Since I'm new to this product, I'm not exactly sure which file controls the admin function. I suspect my problem is there.

 

Thanks,

 

Laszlo_M

Link to comment
Share on other sites

Hi,

 

I'm trying to replace the Price column in modules/product_listing.php with an extra field.

(short story: customer would prefer to display unit price rather than the actual bulk price so I have created an extra field for Unit Price)

 

So I have (with limited php knowledge) edited product_listing.php around line 112:

 

$lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

 

and changed it to: (I am using STS and have applied the STS code for Product Extra Fields

 

$lc_text = ' ' . $product_extra_fields_box . ' ';

 

I get a blank column.

 

I guess I'm also assuming that the variable $product_extra_fields_box is available to product_listing.php

 

Could someone point me in the right direction for changing normal price display to an extra field?

 

Cheers,

 

Al

Link to comment
Share on other sites

Hi,

 

I think this is a great add-on for this contribution, and would like to do the same myself. Thanks for the great work.

 

Do you have any idea how it will accomodate more than 1 variable in a field, i.e. in the field "Authors" to have listed "Alan Moore, Frank Miller"? Would it just add all together and give you both, or could it be made to link the authors separately to the search results?

 

Any plans to add this oadd-on to the Extra Fields contribution page?

 

Thanks.

 

Actually, when I edited that last post I put the value backwards. What I was trying was:

 

<a class="ml" href="advanced_search_result.php?keywords='. escape($extra_fields['value']) .'">' . $extra_fields['value'] . '</a>

 

But it doesn't work. The field ends up being empty and it ends execution of the while statement so it doesn't output the remaining extra_fields. As a fix to this I did it the long way for now.

 

// Added 021107
while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
	 	   if (! $extra_fields['status'])  // show only enabled extra field
	   	   continue;
		   echo '<tr>
				 <td width=30></td><td>
				 <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
		  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
							//Added 021207 Check for Output Style 1=Linked 0=Normal
	if($extra_fields['linked'] == 1) {
	$extra_fields_value=str_replace(" ", "+", $extra_fields['value']);
		   	echo '<font size="1" color="#666666"><a class="ml" href="advanced_search_result.php?keywords='. $extra_fields_value .'">' . $extra_fields['value'] . '</a><BR></font> </tr></table></td></tr>';
	} else {
	echo '<font size="1" color="#666666">' . $extra_fields['value'] . '<BR></font> </tr></table></td></tr>';
	}

 

You'll notice a few new pieces here besides the str_relpace. First I've added an extra tabel to the products_extra_fields table called products_extra_fields_linked. This is just yes/no and I can turn it on in the admin, just like status column. If it's on the system creates the links, if false then it outputs normal lines. I think eveyone should add this simple functionality because it makes finding related products easy and it can be left off when not needed.

 

But I haven't found a good trigger to define when to limit my search clause, so it's a bit incomplete.

Link to comment
Share on other sites

Hi I have a big problem I istall the script Product Extra Fiel in the post http://www.oscommerce.com/community/contributions,2202 the version that I install it's extra_fields_v2_0i I can install it without any problem but When I'm trying to view the details of one product this message of Eror appears

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/enamora/public_html/libreria/includes/header.php:194) in /home/enamora/public_html/libreria/includes/boxes/categories.php on line 13

 

 

Before I install the script I can vie the details of the products but after install it no.

 

 

I view the file header.php and in the line 194 I can view this

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

if(!$tree[$counter]['level']){

 

 

$categories_string .= $categories_string ? '<tr><td><img src=images/m26.gif width=167 height=1><br><br class=px2></td></tr>' : '';

 

$categories_string .= '<tr><td><img src=images/m25.gif width=5 height=5 align=absmiddle> & <a class=ml1 href=';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>';

 

 

 

 

and in the file categories.php in the 13 line

 

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "&&";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

 

Somebody please help me , or tell me I somebody install other version that work's fine thanks

Link to comment
Share on other sites

Hi

 

I installed this contrib and all went OK, no errors etc and I can copy the product into another category with no probs but the extra fields are not being displayed when you pick on categories in left column but they do display when you pick on the link in the product name column.

 

What I want to be able to do is to have the extra fields showing in the product listing part of index.php. I think its part of the SQL query but can't get it to work.

 

Thanks

 

ian

 

I would really like this functionality as well...anyone pull it off?

Link to comment
Share on other sites

I installed 'Products Extra Fields Contribution' works great but not compatible with EasyPopulate.

 

Does anyone know of a fix?

 

Thanks

 

Frank

 

Yes: don't use it!

But create "real fields" in your "products"

http://www.oscommerce.com/community/contributions,2779

 

and add the filds in your easypopulate file

 

a little bit more rigid (file hard coding) but works!

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