![]() |
Need Help Using Extra Fields in customized function
I would like to use the Extra Field feature as a global on-off flag to enable/disable a message based feature on the product's catalog page. I need some code guidance.
Just to be clear, the data entered in the Extra Field isn't shown to the customer. Instead, the field will be edited by Admin with a "Y" (yes) or "N" (no) character, which is used as a simple Boolean flag (to control a message/feature). I started off by adding this code snippet to skin/common_files/customer/main/products_details.tpl: Code:
{foreach from=$extra_fields item=v} The $v.field correctly returns the expected "Message Notify Enabled" string. But the $v.value string that is returned is the Extra Field's default database value (stored in extra_fields table) which was defined on the Extra Fields admin page. Instead, I need the associated string value that was assigned to the Extra Field (stored in extra_field_values table) on the Product Management page. Any advice is appreciated. . |
Re: Need Help Using Extra Fields in customized function
Try '$v.field_value' instead of '$v.value'
|
Re: Need Help Using Extra Fields in customized function
Brilliant! That fixed the problem. Thank you.
|
All times are GMT -8. The time now is 03:33 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.