Exemple #1
0
 function __construct($attrId, $optionId)
 {
     $attrId = Attribute::toID($attrId);
     $optionId = ProductOption::toID($optionId);
     parent::__construct($attrId);
     static $q = null;
     createStaticQuery($q, "\r\n\t\t\tSELECT attribute_value\r\n\t\t\tFROM cf_product_options_attributes\r\n\t\t\tWHERE product_option_id=:optionId AND attribute_id=:attrId\r\n\t\t");
     $q->setParam('optionId', $optionId);
     $q->setParam('attrId', $attrId);
     $q->execute();
     if ($q->fetch()) {
         $this->setValue($q->at('attribute_value'));
     }
     $q->close();
 }