CMS MADE SIMPLE FORGE

CGEcommerceBase

 

[#6325] Attribute Drop Down Not Populated

avatar
Created By: zark (zark)
Date Submitted: Sun Mar 27 00:32:00 -0400 2011

Assigned To:
Version: 1.2.4
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Summary:
Attribute Drop Down Not Populated
Detailed Description:
Using Products 2.10.3
Adding attributes, but they do not get populated in the product detail drop down
lists.

I tracked the problem down to class.cg_ecomm_productinfo.php, function
get_dropdown_options()
the function call to cg_ecomm::get_displayable_attribute_option($one); (in
class.cg_ecomm.php) correctly assigns the smarty variables, but does not return
the correct data.

I obtain the correct result by adding:
    global $gCms;
    $smarty = $gCms->GetSmarty();
	...

and changing: 
	...
	$output[$one->get_id()] = cg_ecomm::get_displayable_attribute_option($one);
to:
	$tmp = cg_ecomm::get_displayable_attribute_option($one);
	$output[$one->get_id()] = $smarty->get_template_vars('attrib_text');	

Although it might be better to deal with this in class.cg_ecomm.php, I'm not
sure what else I may affect.


History