first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
/**
* Subclass for representing a row from the 'st_gift_card_has_category' table.
*
*
*
* @package plugins.stGiftCardPlugin.lib.model
*/
class GiftCardHasCategory extends BaseGiftCardHasCategory
{
public function save($con = null)
{
$isNew = $this->isNew();
$result = parent::save($con);
if ($isNew && $this->getCategory()->hasChildren())
{
$con = Propel::getConnection();
$con->executeQuery(sprintf("INSERT INTO %s (%s, %s, %s) SELECT %d, %s, %d FROM %s WHERE %s BETWEEN %d AND %d AND %s = %d",
GiftCardHasCategoryPeer::TABLE_NAME,
GiftCardHasCategoryPeer::GIFT_CARD_ID,
GiftCardHasCategoryPeer::CATEGORY_ID,
GiftCardHasCategoryPeer::IS_OPT,
$this->getGiftCardId(),
CategoryPeer::ID,
1,
CategoryPeer::TABLE_NAME,
CategoryPeer::LFT,
$this->getCategory()->getLft() + 1,
$this->getCategory()->getRgt() - 1,
CategoryPeer::SCOPE,
$this->getCategory()->getScope()
));
}
return $result;
}
}