public function savertShopProductsList($con = null)
 {
     if (!$this->isValid()) {
         throw $this->getErrorSchema();
     }
     if (!isset($this->widgetSchema['rt_shop_products_list'])) {
         // Widget has been unset
         return;
     }
     if (null === $con) {
         $con = $this->getConnection();
     }
     Doctrine_Query::create()->from('rtShopProductToCategory ptc')->andWhere('ptc.category_id = ?', $this->object->id)->delete()->execute();
     $values = $this->getValue('rt_shop_products_list');
     if (!is_array($values)) {
         $values = array();
     }
     if (count($values)) {
         $i = 0;
         foreach ($values as $v) {
             $rt_product_to_category = new rtShopProductToCategory();
             $rt_product_to_category->setCategoryId($this->object->id);
             $rt_product_to_category->setProductId($v);
             $rt_product_to_category->setPosition($i);
             $rt_product_to_category->save();
             $i++;
         }
     }
 }
    $cat2->setTitle('Category A');
    $cat2->setRootId(1);
    $cat2->setLft(2);
    $cat2->setRgt(3);
    $cat2->setLevel(1);
    $cat2->save();
} catch (Exception $e) {
    throw new sfException('Categories could not be added! Please check.');
}
// Product to category
try {
    $prod1tocat2 = new rtShopProductToCategory();
    $prod1tocat2->setProductId($prod1->getId());
    $prod1tocat2->setCategoryId($cat2->getId());
    $prod1tocat2->save();
    $prod2tocat2 = new rtShopProductToCategory();
    $prod2tocat2->setProductId($prod2->getId());
    $prod2tocat2->setCategoryId($cat2->getId());
    $prod2tocat2->save();
} catch (Exception $e) {
    throw new sfException('Products could not be added to categories! Please check.');
}
// Attributes
try {
    $att1 = new rtShopAttribute();
    $att1->setTitle('Attribute A');
    $att1->save();
    $att2 = new rtShopAttribute();
    $att2->setTitle('Attribute B');
    $att2->save();
} catch (Exception $e) {