View Single Post
  #9  
Old 01-13-2009, 12:41 PM
 
sbkp sbkp is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 83
 

Default Re: Labels in Product description?

Maybe I missed something, or maybe it's that I'm on an old version. But in 4.0.17, to get access to $lng variables from product descriptions, I needed to insert the following in include/func.php:

after this code
Code:
$page_content = $templater->get_template_vars("page_content"); if (!empty($page_content)) { if (preg_match_all('/\$lng\.([\w\d_]+)[\}\s`\|]/US', $page_content, $preg)) $variables = array_merge($variables, $preg[1]); }

added the following:

Code:
$product = $templater->get_template_vars("product"); if (!empty($product)) { if (preg_match_all('/\$lng\.([\w\d_]+)[\}\s`\|]/US', $product['fulldescr'], $preg)) $variables = array_merge($variables, $preg[1]); }

Then I'm able to use any {$lng.xxxxx} in a product full description.
__________________
Gold 4.0.17
On Sale, Smart Search, X-AOM, X-SpecialOffers, XNews, DSEFU, and custom mods/tweaks
Reply With Quote