PDA

View Full Version : Easily using Extra Product Fields - howto please!



johnr3
07-19-2012, 09:29 AM
Hello,

I'm trying to use the Extra Product Fields code.

Is there a simple way to ... getExtraFields($productid) or, say, doesHave($productid,$field,$value) type function?

Thank you
John

johnr3
07-20-2012, 08:10 AM
Fixed this myself I think.

I copied the function tep_get_product_extra_value from admin/includes/functions/general.php to includes/functions/general.php

Then, from my code (in this case the shopping cart page), I can call tep_get_product_extra_value($epf_id, $product_id, $language_id) and it returns the value.

$epf_id is the id of the Extra Product Field I want the value of, $product_id is the product in question, and $language_id is simply the global $languages_id variable.

That gives me the information I need.

Thanks
John