Working catalog branch
This commit is contained in:
@@ -48,6 +48,11 @@ use Thelia\Model\AccessoryQuery;
|
|||||||
use Thelia\Model\Accessory;
|
use Thelia\Model\Accessory;
|
||||||
use Thelia\Core\Event\ProductAddAccessoryEvent;
|
use Thelia\Core\Event\ProductAddAccessoryEvent;
|
||||||
use Thelia\Core\Event\ProductDeleteAccessoryEvent;
|
use Thelia\Core\Event\ProductDeleteAccessoryEvent;
|
||||||
|
use Thelia\Core\Event\FeatureProductUpdateEvent;
|
||||||
|
use Thelia\Model\FeatureProduct;
|
||||||
|
use Thelia\Model\FeatureQuery;
|
||||||
|
use Thelia\Core\Event\FeatureProductDeleteEvent;
|
||||||
|
use Thelia\Model\FeatureProductQuery;
|
||||||
|
|
||||||
class Product extends BaseAction implements EventSubscriberInterface
|
class Product extends BaseAction implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
@@ -247,6 +252,70 @@ class Product extends BaseAction implements EventSubscriberInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateFeatureProductValue(FeatureProductUpdateEvent $event) {
|
||||||
|
|
||||||
|
// If the feature is not free text, it may have one ore more values.
|
||||||
|
// If the value exists, we do not change it
|
||||||
|
// If the value does not exists, we create it.
|
||||||
|
//
|
||||||
|
// If the feature is free text, it has only a single value.
|
||||||
|
// Etiher create or update it.
|
||||||
|
|
||||||
|
$featureProductQuery = FeatureProductQuery::create()
|
||||||
|
->filterByFeatureId($event->getFeatureId())
|
||||||
|
->filterByProductId($event->getProductId())
|
||||||
|
;
|
||||||
|
|
||||||
|
if ($event->getIsTextValue() !== true) {
|
||||||
|
$featureProductQuery->filterByFeatureAvId($event->getFeatureValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
$featureProduct = $featureProductQuery->findOne();
|
||||||
|
echo "<br /> create or update: f=".$event->getFeatureId().", p=".$event->getProductId();
|
||||||
|
|
||||||
|
if ($featureProduct == null) {
|
||||||
|
echo " Create !";
|
||||||
|
$featureProduct = new FeatureProduct();
|
||||||
|
|
||||||
|
$featureProduct
|
||||||
|
->setDispatcher($this->getDispatcher())
|
||||||
|
|
||||||
|
->setProductId($event->getProductId())
|
||||||
|
->setFeatureId($event->getFeatureId())
|
||||||
|
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else echo " Update !";
|
||||||
|
|
||||||
|
if ($event->getIsTextValue() == true) {
|
||||||
|
$featureProduct->setFreeTextValue($event->getFeatureValue());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$featureProduct->setFeatureAvId($event->getFeatureValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
$featureProduct->save();
|
||||||
|
|
||||||
|
$event->setFeatureProduct($featureProduct);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteFeatureProductValue(FeatureProductDeleteEvent $event) {
|
||||||
|
|
||||||
|
$featureProduct = new FeatureProduct();
|
||||||
|
|
||||||
|
$featureProduct
|
||||||
|
->setDispatcher($this->getDispatcher())
|
||||||
|
|
||||||
|
->setProductId($event->getProductId())
|
||||||
|
->setFeatureId($event->getFeatureId())
|
||||||
|
|
||||||
|
->delete();
|
||||||
|
;
|
||||||
|
echo "<br/>Delete p=".$event->getProductId()." f=".$event->getFeatureId();
|
||||||
|
|
||||||
|
$event->setFeatureProduct($featureProduct);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@@ -266,6 +335,9 @@ class Product extends BaseAction implements EventSubscriberInterface
|
|||||||
|
|
||||||
TheliaEvents::PRODUCT_ADD_ACCESSORY => array("addAccessory", 128),
|
TheliaEvents::PRODUCT_ADD_ACCESSORY => array("addAccessory", 128),
|
||||||
TheliaEvents::PRODUCT_REMOVE_ACCESSORY => array("removeAccessory", 128),
|
TheliaEvents::PRODUCT_REMOVE_ACCESSORY => array("removeAccessory", 128),
|
||||||
|
|
||||||
|
TheliaEvents::PRODUCT_FEATURE_UPDATE_VALUE => array("updateFeatureProductValue", 128),
|
||||||
|
TheliaEvents::PRODUCT_FEATURE_DELETE_VALUE => array("deleteFeatureProductValue", 128),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ use Thelia\Model\AccessoryQuery;
|
|||||||
use Thelia\Model\CategoryQuery;
|
use Thelia\Model\CategoryQuery;
|
||||||
use Thelia\Core\Event\ProductAddAccessoryEvent;
|
use Thelia\Core\Event\ProductAddAccessoryEvent;
|
||||||
use Thelia\Core\Event\ProductDeleteAccessoryEvent;
|
use Thelia\Core\Event\ProductDeleteAccessoryEvent;
|
||||||
|
use Thelia\Core\Event\FeatureProductUpdateEvent;
|
||||||
|
use Thelia\Model\FeatureQuery;
|
||||||
|
use Thelia\Core\Event\FeatureProductDeleteEvent;
|
||||||
|
use Thelia\Model\FeatureTemplateQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages products
|
* Manages products
|
||||||
@@ -443,7 +447,7 @@ class ProductController extends AbstractCrudController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update accessory position (only for objects whichsupport that)
|
* Update accessory position
|
||||||
*/
|
*/
|
||||||
public function updateAccessoryPositionAction()
|
public function updateAccessoryPositionAction()
|
||||||
{
|
{
|
||||||
@@ -474,4 +478,72 @@ class ProductController extends AbstractCrudController
|
|||||||
$this->redirectToEditionTemplate();
|
$this->redirectToEditionTemplate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update product attributes and features
|
||||||
|
*/
|
||||||
|
public function updateAttributesAndFeaturesAction($productId) {
|
||||||
|
|
||||||
|
// et all features for the product's template
|
||||||
|
$product = ProductQuery::create()->findPk($productId);
|
||||||
|
|
||||||
|
if ($product != null) {
|
||||||
|
|
||||||
|
$featureTemplate = FeatureTemplateQuery::create()->filterByTemplateId($product->getTemplateId())->find();
|
||||||
|
|
||||||
|
if ($featureTemplate !== null) {
|
||||||
|
// Get all features for the template attached to this product
|
||||||
|
$allFeatures = FeatureQuery::create()
|
||||||
|
->filterByFeatureTemplate($featureTemplate)
|
||||||
|
->find();
|
||||||
|
|
||||||
|
$updatedFeatures = array();
|
||||||
|
|
||||||
|
// Update all features values
|
||||||
|
$featureValues = $this->getRequest()->get('feature_value', array());
|
||||||
|
print_r($featureValues);
|
||||||
|
foreach($featureValues as $featureId => $featureValueList) {
|
||||||
|
|
||||||
|
// Delete all values for this feature.
|
||||||
|
$event = new FeatureProductDeleteEvent($productId, $featureId);
|
||||||
|
|
||||||
|
$this->dispatch(TheliaEvents::PRODUCT_FEATURE_DELETE_VALUE, $event);
|
||||||
|
|
||||||
|
// Add all selected values
|
||||||
|
foreach($featureValueList as $featureValue) {
|
||||||
|
$event = new FeatureProductUpdateEvent($productId, $featureId, $featureValue);
|
||||||
|
|
||||||
|
$this->dispatch(TheliaEvents::PRODUCT_FEATURE_UPDATE_VALUE, $event);
|
||||||
|
}
|
||||||
|
|
||||||
|
$updatedFeatures[] = $featureId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update then features text values
|
||||||
|
$featureTextValues = $this->getRequest()->get('feature_text_value', array());
|
||||||
|
print_r($featureTextValues);
|
||||||
|
foreach($featureTextValues as $featureId => $featureValue) {
|
||||||
|
|
||||||
|
// considere empty text as empty feature value (e.g., we will delete it)
|
||||||
|
if (empty($featureValue)) continue;
|
||||||
|
|
||||||
|
$event = new FeatureProductUpdateEvent($productId, $featureId, $featureValue, true);
|
||||||
|
|
||||||
|
$this->dispatch(TheliaEvents::PRODUCT_FEATURE_UPDATE_VALUE, $event);
|
||||||
|
|
||||||
|
$updatedFeatures[] = $featureId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete features which don't have any values
|
||||||
|
foreach($allFeatures as $feature) {
|
||||||
|
if (! in_array($feature->getId(), $updatedFeatures)) {
|
||||||
|
$event = new FeatureProductDeleteEvent($productId, $feature->getId());
|
||||||
|
echo "delete $productId, ".$feature->getId()." - ";
|
||||||
|
$this->dispatch(TheliaEvents::PRODUCT_FEATURE_DELETE_VALUE, $event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->redirectToEditionTemplate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,8 +170,8 @@ final class TheliaEvents
|
|||||||
const BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT = "action.before_createCategoryAssociatedContent";
|
const BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT = "action.before_createCategoryAssociatedContent";
|
||||||
const AFTER_CREATECATEGORY_ASSOCIATED_CONTENT = "action.after_createCategoryAssociatedContent";
|
const AFTER_CREATECATEGORY_ASSOCIATED_CONTENT = "action.after_createCategoryAssociatedContent";
|
||||||
|
|
||||||
const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContenty";
|
const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContent";
|
||||||
const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
|
const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteCategoryAssociatedContent";
|
||||||
|
|
||||||
const BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.before_updateCategoryAssociatedContent";
|
const BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.before_updateCategoryAssociatedContent";
|
||||||
const AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.after_updateCategoryAssociatedContent";
|
const AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.after_updateCategoryAssociatedContent";
|
||||||
@@ -191,6 +191,9 @@ final class TheliaEvents
|
|||||||
const PRODUCT_REMOVE_ACCESSORY = "action.productRemoveAccessory";
|
const PRODUCT_REMOVE_ACCESSORY = "action.productRemoveAccessory";
|
||||||
const PRODUCT_UPDATE_ACCESSORY_POSITION = "action.updateProductPosition";
|
const PRODUCT_UPDATE_ACCESSORY_POSITION = "action.updateProductPosition";
|
||||||
|
|
||||||
|
const PRODUCT_FEATURE_UPDATE_VALUE = "action.after_updateProductFeatureValue";
|
||||||
|
const PRODUCT_FEATURE_DELETE_VALUE = "action.after_deleteProductFeatureValue";
|
||||||
|
|
||||||
const BEFORE_CREATEPRODUCT = "action.before_createproduct";
|
const BEFORE_CREATEPRODUCT = "action.before_createproduct";
|
||||||
const AFTER_CREATEPRODUCT = "action.after_createproduct";
|
const AFTER_CREATEPRODUCT = "action.after_createproduct";
|
||||||
|
|
||||||
@@ -211,17 +214,28 @@ final class TheliaEvents
|
|||||||
const BEFORE_UPDATEACCESSORY = "action.before_updateAccessory";
|
const BEFORE_UPDATEACCESSORY = "action.before_updateAccessory";
|
||||||
const AFTER_UPDATEACCESSORY = "action.after_updateAccessory";
|
const AFTER_UPDATEACCESSORY = "action.after_updateAccessory";
|
||||||
|
|
||||||
// -- Product Associated Content --------------------------------------------------
|
// -- Product Associated Content -------------------------------------------
|
||||||
|
|
||||||
const BEFORE_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.before_createProductAssociatedContent";
|
const BEFORE_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.before_createProductAssociatedContent";
|
||||||
const AFTER_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.after_createProductAssociatedContent";
|
const AFTER_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.after_createProductAssociatedContent";
|
||||||
|
|
||||||
const BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.before_deleteProductAssociatedContenty";
|
const BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.before_deleteProductAssociatedContent";
|
||||||
const AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
|
const AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.after_deleteProductAssociatedContent";
|
||||||
|
|
||||||
const BEFORE_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.before_updateProductAssociatedContent";
|
const BEFORE_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.before_updateProductAssociatedContent";
|
||||||
const AFTER_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.after_updateProductAssociatedContent";
|
const AFTER_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.after_updateProductAssociatedContent";
|
||||||
|
|
||||||
|
// -- Feature product ------------------------------------------------------
|
||||||
|
|
||||||
|
const BEFORE_CREATEFEATURE_PRODUCT = "action.before_createFeatureProduct";
|
||||||
|
const AFTER_CREATEFEATURE_PRODUCT = "action.after_createFeatureProduct";
|
||||||
|
|
||||||
|
const BEFORE_DELETEFEATURE_PRODUCT = "action.before_deleteFeatureProduct";
|
||||||
|
const AFTER_DELETEFEATURE_PRODUCT = "action.after_deleteFeatureProduct";
|
||||||
|
|
||||||
|
const BEFORE_UPDATEFEATURE_PRODUCT = "action.before_updateFeatureProduct";
|
||||||
|
const AFTER_UPDATEFEATURE_PRODUCT = "action.after_updateFeatureProduct";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sent when a new existing cat id duplicated. This append when current customer is different from current cart
|
* sent when a new existing cat id duplicated. This append when current customer is different from current cart
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class FeatureValue extends BaseI18nLoop
|
|||||||
Argument::createIntTypeArgument('product', null, true),
|
Argument::createIntTypeArgument('product', null, true),
|
||||||
Argument::createIntListTypeArgument('feature_availability'),
|
Argument::createIntListTypeArgument('feature_availability'),
|
||||||
Argument::createBooleanTypeArgument('exclude_feature_availability', 0),
|
Argument::createBooleanTypeArgument('exclude_feature_availability', 0),
|
||||||
Argument::createBooleanTypeArgument('exclude_personal_values', 0),
|
Argument::createBooleanTypeArgument('exclude_free_text', 0),
|
||||||
new Argument(
|
new Argument(
|
||||||
'order',
|
'order',
|
||||||
new TypeCollection(
|
new TypeCollection(
|
||||||
@@ -79,14 +79,14 @@ class FeatureValue extends BaseI18nLoop
|
|||||||
{
|
{
|
||||||
$search = FeatureProductQuery::create();
|
$search = FeatureProductQuery::create();
|
||||||
|
|
||||||
/* manage featureAv translations */
|
// manage featureAv translations
|
||||||
$locale = $this->configureI18nProcessing(
|
$locale = $this->configureI18nProcessing(
|
||||||
$search,
|
$search,
|
||||||
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
||||||
FeatureAvTableMap::TABLE_NAME,
|
FeatureAvTableMap::TABLE_NAME,
|
||||||
'FEATURE_AV_ID',
|
'FEATURE_AV_ID',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
$feature = $this->getFeature();
|
$feature = $this->getFeature();
|
||||||
|
|
||||||
@@ -103,13 +103,9 @@ class FeatureValue extends BaseI18nLoop
|
|||||||
}
|
}
|
||||||
|
|
||||||
$excludeFeatureAvailability = $this->getExclude_feature_availability();
|
$excludeFeatureAvailability = $this->getExclude_feature_availability();
|
||||||
if ($excludeFeatureAvailability == true) {
|
|
||||||
$search->filterByFeatureAvId(null, Criteria::NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
$excludeDefaultValues = $this->getExclude_personal_values();
|
if ($excludeFeatureAvailability == true) {
|
||||||
if ($excludeDefaultValues == true) {
|
$search->filterByFeatureAvId(null, Criteria::ISNULL);
|
||||||
$search->filterByByDefault(null, Criteria::NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$orders = $this->getOrder();
|
$orders = $this->getOrder();
|
||||||
@@ -137,16 +133,24 @@ class FeatureValue extends BaseI18nLoop
|
|||||||
|
|
||||||
foreach ($featureValues as $featureValue) {
|
foreach ($featureValues as $featureValue) {
|
||||||
$loopResultRow = new LoopResultRow($loopResult, $featureValue, $this->versionable, $this->timestampable, $this->countable);
|
$loopResultRow = new LoopResultRow($loopResult, $featureValue, $this->versionable, $this->timestampable, $this->countable);
|
||||||
$loopResultRow->set("ID", $featureValue->getId());
|
|
||||||
|
|
||||||
$loopResultRow
|
$loopResultRow
|
||||||
->set("LOCALE",$locale)
|
->set("ID" , $featureValue->getId())
|
||||||
->set("PERSONAL_VALUE", $featureValue->getByDefault())
|
->set("PRODUCT" , $featureValue->getProductId())
|
||||||
->set("TITLE",$featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_TITLE'))
|
->set("FEATURE_AV_ID" , $featureValue->getFeatureAvId())
|
||||||
->set("CHAPO", $featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_CHAPO'))
|
->set("FREE_TEXT_VALUE" , $featureValue->getFreeTextValue())
|
||||||
->set("DESCRIPTION", $featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_DESCRIPTION'))
|
|
||||||
->set("POSTSCRIPTUM", $featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_POSTSCRIPTUM'))
|
->set("IS_FREE_TEXT" , is_null($featureValue->getFeatureAvId()) ? 1 : 0)
|
||||||
->set("POSITION", $featureValue->getPosition());
|
->set("IS_FEATURE_AV" , is_null($featureValue->getFeatureAvId()) ? 0 : 1)
|
||||||
|
|
||||||
|
->set("LOCALE" , $locale)
|
||||||
|
->set("TITLE" , $featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_TITLE'))
|
||||||
|
->set("CHAPO" , $featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_CHAPO'))
|
||||||
|
->set("DESCRIPTION" , $featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_DESCRIPTION'))
|
||||||
|
->set("POSTSCRIPTUM" , $featureValue->getVirtualColumn(FeatureAvTableMap::TABLE_NAME . '_i18n_POSTSCRIPTUM'))
|
||||||
|
|
||||||
|
->set("POSITION" , $featureValue->getPosition())
|
||||||
|
;
|
||||||
|
|
||||||
$loopResult->addRow($loopResultRow);
|
$loopResult->addRow($loopResultRow);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -650,6 +650,7 @@ class Product extends BaseI18nLoop
|
|||||||
->set("IS_NEW" , $product->getVirtualColumn('main_product_is_new'))
|
->set("IS_NEW" , $product->getVirtualColumn('main_product_is_new'))
|
||||||
->set("POSITION" , $product->getPosition())
|
->set("POSITION" , $product->getPosition())
|
||||||
->set("VISIBLE" , $product->getVisible() ? "1" : "0")
|
->set("VISIBLE" , $product->getVisible() ? "1" : "0")
|
||||||
|
->set("TEMPLATE" , $product->getTemplateId())
|
||||||
->set("HAS_PREVIOUS" , $previous != null ? 1 : 0)
|
->set("HAS_PREVIOUS" , $previous != null ? 1 : 0)
|
||||||
->set("HAS_NEXT" , $next != null ? 1 : 0)
|
->set("HAS_NEXT" , $next != null ? 1 : 0)
|
||||||
->set("PREVIOUS" , $previous != null ? $previous->getId() : -1)
|
->set("PREVIOUS" , $previous != null ? $previous->getId() : -1)
|
||||||
|
|||||||
@@ -78,6 +78,13 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $product_sale_elements_id;
|
protected $product_sale_elements_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the is_default field.
|
||||||
|
* Note: this column has a database default value of: false
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
protected $is_default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the created_at field.
|
* The value for the created_at field.
|
||||||
* @var string
|
* @var string
|
||||||
@@ -113,11 +120,24 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $alreadyInSave = false;
|
protected $alreadyInSave = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies default values to this object.
|
||||||
|
* This method should be called from the object's constructor (or
|
||||||
|
* equivalent initialization method).
|
||||||
|
* @see __construct()
|
||||||
|
*/
|
||||||
|
public function applyDefaultValues()
|
||||||
|
{
|
||||||
|
$this->is_default = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of Thelia\Model\Base\AttributeCombination object.
|
* Initializes internal state of Thelia\Model\Base\AttributeCombination object.
|
||||||
|
* @see applyDefaults()
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
$this->applyDefaultValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -400,6 +420,17 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
return $this->product_sale_elements_id;
|
return $this->product_sale_elements_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [is_default] column value.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function getIsDefault()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->is_default;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [optionally formatted] temporal [created_at] column value.
|
* Get the [optionally formatted] temporal [created_at] column value.
|
||||||
*
|
*
|
||||||
@@ -515,6 +546,35 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
return $this;
|
return $this;
|
||||||
} // setProductSaleElementsId()
|
} // setProductSaleElementsId()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the [is_default] column.
|
||||||
|
* Non-boolean arguments are converted using the following rules:
|
||||||
|
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||||
|
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||||
|
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||||
|
*
|
||||||
|
* @param boolean|integer|string $v The new value
|
||||||
|
* @return \Thelia\Model\AttributeCombination The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setIsDefault($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
if (is_string($v)) {
|
||||||
|
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||||
|
} else {
|
||||||
|
$v = (boolean) $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->is_default !== $v) {
|
||||||
|
$this->is_default = $v;
|
||||||
|
$this->modifiedColumns[] = AttributeCombinationTableMap::IS_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setIsDefault()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||||
*
|
*
|
||||||
@@ -567,6 +627,10 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function hasOnlyDefaultValues()
|
public function hasOnlyDefaultValues()
|
||||||
{
|
{
|
||||||
|
if ($this->is_default !== false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// otherwise, everything was equal, so return TRUE
|
// otherwise, everything was equal, so return TRUE
|
||||||
return true;
|
return true;
|
||||||
} // hasOnlyDefaultValues()
|
} // hasOnlyDefaultValues()
|
||||||
@@ -603,13 +667,16 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : AttributeCombinationTableMap::translateFieldName('ProductSaleElementsId', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : AttributeCombinationTableMap::translateFieldName('ProductSaleElementsId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->product_sale_elements_id = (null !== $col) ? (int) $col : null;
|
$this->product_sale_elements_id = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : AttributeCombinationTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : AttributeCombinationTableMap::translateFieldName('IsDefault', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->is_default = (null !== $col) ? (boolean) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : AttributeCombinationTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : AttributeCombinationTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : AttributeCombinationTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
@@ -622,7 +689,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 5; // 5 = AttributeCombinationTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 6; // 6 = AttributeCombinationTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\AttributeCombination object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\AttributeCombination object", 0, $e);
|
||||||
@@ -885,6 +952,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) {
|
if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'PRODUCT_SALE_ELEMENTS_ID';
|
$modifiedColumns[':p' . $index++] = 'PRODUCT_SALE_ELEMENTS_ID';
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified(AttributeCombinationTableMap::IS_DEFAULT)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'IS_DEFAULT';
|
||||||
|
}
|
||||||
if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) {
|
if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||||
}
|
}
|
||||||
@@ -911,6 +981,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
case 'PRODUCT_SALE_ELEMENTS_ID':
|
case 'PRODUCT_SALE_ELEMENTS_ID':
|
||||||
$stmt->bindValue($identifier, $this->product_sale_elements_id, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->product_sale_elements_id, PDO::PARAM_INT);
|
||||||
break;
|
break;
|
||||||
|
case 'IS_DEFAULT':
|
||||||
|
$stmt->bindValue($identifier, (int) $this->is_default, PDO::PARAM_INT);
|
||||||
|
break;
|
||||||
case 'CREATED_AT':
|
case 'CREATED_AT':
|
||||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||||
break;
|
break;
|
||||||
@@ -982,9 +1055,12 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
return $this->getProductSaleElementsId();
|
return $this->getProductSaleElementsId();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return $this->getCreatedAt();
|
return $this->getIsDefault();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
return $this->getCreatedAt();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
return $this->getUpdatedAt();
|
return $this->getUpdatedAt();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1019,8 +1095,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
$keys[0] => $this->getAttributeId(),
|
$keys[0] => $this->getAttributeId(),
|
||||||
$keys[1] => $this->getAttributeAvId(),
|
$keys[1] => $this->getAttributeAvId(),
|
||||||
$keys[2] => $this->getProductSaleElementsId(),
|
$keys[2] => $this->getProductSaleElementsId(),
|
||||||
$keys[3] => $this->getCreatedAt(),
|
$keys[3] => $this->getIsDefault(),
|
||||||
$keys[4] => $this->getUpdatedAt(),
|
$keys[4] => $this->getCreatedAt(),
|
||||||
|
$keys[5] => $this->getUpdatedAt(),
|
||||||
);
|
);
|
||||||
$virtualColumns = $this->virtualColumns;
|
$virtualColumns = $this->virtualColumns;
|
||||||
foreach($virtualColumns as $key => $virtualColumn)
|
foreach($virtualColumns as $key => $virtualColumn)
|
||||||
@@ -1082,9 +1159,12 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
$this->setProductSaleElementsId($value);
|
$this->setProductSaleElementsId($value);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->setCreatedAt($value);
|
$this->setIsDefault($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
$this->setCreatedAt($value);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
$this->setUpdatedAt($value);
|
$this->setUpdatedAt($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
@@ -1114,8 +1194,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
if (array_key_exists($keys[0], $arr)) $this->setAttributeId($arr[$keys[0]]);
|
if (array_key_exists($keys[0], $arr)) $this->setAttributeId($arr[$keys[0]]);
|
||||||
if (array_key_exists($keys[1], $arr)) $this->setAttributeAvId($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setAttributeAvId($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setProductSaleElementsId($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setProductSaleElementsId($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setIsDefault($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||||
|
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1130,6 +1211,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_ID)) $criteria->add(AttributeCombinationTableMap::ATTRIBUTE_ID, $this->attribute_id);
|
if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_ID)) $criteria->add(AttributeCombinationTableMap::ATTRIBUTE_ID, $this->attribute_id);
|
||||||
if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_AV_ID)) $criteria->add(AttributeCombinationTableMap::ATTRIBUTE_AV_ID, $this->attribute_av_id);
|
if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_AV_ID)) $criteria->add(AttributeCombinationTableMap::ATTRIBUTE_AV_ID, $this->attribute_av_id);
|
||||||
if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) $criteria->add(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $this->product_sale_elements_id);
|
if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) $criteria->add(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $this->product_sale_elements_id);
|
||||||
|
if ($this->isColumnModified(AttributeCombinationTableMap::IS_DEFAULT)) $criteria->add(AttributeCombinationTableMap::IS_DEFAULT, $this->is_default);
|
||||||
if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) $criteria->add(AttributeCombinationTableMap::CREATED_AT, $this->created_at);
|
if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) $criteria->add(AttributeCombinationTableMap::CREATED_AT, $this->created_at);
|
||||||
if ($this->isColumnModified(AttributeCombinationTableMap::UPDATED_AT)) $criteria->add(AttributeCombinationTableMap::UPDATED_AT, $this->updated_at);
|
if ($this->isColumnModified(AttributeCombinationTableMap::UPDATED_AT)) $criteria->add(AttributeCombinationTableMap::UPDATED_AT, $this->updated_at);
|
||||||
|
|
||||||
@@ -1208,6 +1290,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
$copyObj->setAttributeId($this->getAttributeId());
|
$copyObj->setAttributeId($this->getAttributeId());
|
||||||
$copyObj->setAttributeAvId($this->getAttributeAvId());
|
$copyObj->setAttributeAvId($this->getAttributeAvId());
|
||||||
$copyObj->setProductSaleElementsId($this->getProductSaleElementsId());
|
$copyObj->setProductSaleElementsId($this->getProductSaleElementsId());
|
||||||
|
$copyObj->setIsDefault($this->getIsDefault());
|
||||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||||
if ($makeNew) {
|
if ($makeNew) {
|
||||||
@@ -1398,10 +1481,12 @@ abstract class AttributeCombination implements ActiveRecordInterface
|
|||||||
$this->attribute_id = null;
|
$this->attribute_id = null;
|
||||||
$this->attribute_av_id = null;
|
$this->attribute_av_id = null;
|
||||||
$this->product_sale_elements_id = null;
|
$this->product_sale_elements_id = null;
|
||||||
|
$this->is_default = null;
|
||||||
$this->created_at = null;
|
$this->created_at = null;
|
||||||
$this->updated_at = null;
|
$this->updated_at = null;
|
||||||
$this->alreadyInSave = false;
|
$this->alreadyInSave = false;
|
||||||
$this->clearAllReferences();
|
$this->clearAllReferences();
|
||||||
|
$this->applyDefaultValues();
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
$this->setNew(true);
|
$this->setNew(true);
|
||||||
$this->setDeleted(false);
|
$this->setDeleted(false);
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ use Thelia\Model\Map\AttributeCombinationTableMap;
|
|||||||
* @method ChildAttributeCombinationQuery orderByAttributeId($order = Criteria::ASC) Order by the attribute_id column
|
* @method ChildAttributeCombinationQuery orderByAttributeId($order = Criteria::ASC) Order by the attribute_id column
|
||||||
* @method ChildAttributeCombinationQuery orderByAttributeAvId($order = Criteria::ASC) Order by the attribute_av_id column
|
* @method ChildAttributeCombinationQuery orderByAttributeAvId($order = Criteria::ASC) Order by the attribute_av_id column
|
||||||
* @method ChildAttributeCombinationQuery orderByProductSaleElementsId($order = Criteria::ASC) Order by the product_sale_elements_id column
|
* @method ChildAttributeCombinationQuery orderByProductSaleElementsId($order = Criteria::ASC) Order by the product_sale_elements_id column
|
||||||
|
* @method ChildAttributeCombinationQuery orderByIsDefault($order = Criteria::ASC) Order by the is_default column
|
||||||
* @method ChildAttributeCombinationQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildAttributeCombinationQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildAttributeCombinationQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildAttributeCombinationQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
*
|
*
|
||||||
* @method ChildAttributeCombinationQuery groupByAttributeId() Group by the attribute_id column
|
* @method ChildAttributeCombinationQuery groupByAttributeId() Group by the attribute_id column
|
||||||
* @method ChildAttributeCombinationQuery groupByAttributeAvId() Group by the attribute_av_id column
|
* @method ChildAttributeCombinationQuery groupByAttributeAvId() Group by the attribute_av_id column
|
||||||
* @method ChildAttributeCombinationQuery groupByProductSaleElementsId() Group by the product_sale_elements_id column
|
* @method ChildAttributeCombinationQuery groupByProductSaleElementsId() Group by the product_sale_elements_id column
|
||||||
|
* @method ChildAttributeCombinationQuery groupByIsDefault() Group by the is_default column
|
||||||
* @method ChildAttributeCombinationQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildAttributeCombinationQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildAttributeCombinationQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildAttributeCombinationQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -55,12 +57,14 @@ use Thelia\Model\Map\AttributeCombinationTableMap;
|
|||||||
* @method ChildAttributeCombination findOneByAttributeId(int $attribute_id) Return the first ChildAttributeCombination filtered by the attribute_id column
|
* @method ChildAttributeCombination findOneByAttributeId(int $attribute_id) Return the first ChildAttributeCombination filtered by the attribute_id column
|
||||||
* @method ChildAttributeCombination findOneByAttributeAvId(int $attribute_av_id) Return the first ChildAttributeCombination filtered by the attribute_av_id column
|
* @method ChildAttributeCombination findOneByAttributeAvId(int $attribute_av_id) Return the first ChildAttributeCombination filtered by the attribute_av_id column
|
||||||
* @method ChildAttributeCombination findOneByProductSaleElementsId(int $product_sale_elements_id) Return the first ChildAttributeCombination filtered by the product_sale_elements_id column
|
* @method ChildAttributeCombination findOneByProductSaleElementsId(int $product_sale_elements_id) Return the first ChildAttributeCombination filtered by the product_sale_elements_id column
|
||||||
|
* @method ChildAttributeCombination findOneByIsDefault(boolean $is_default) Return the first ChildAttributeCombination filtered by the is_default column
|
||||||
* @method ChildAttributeCombination findOneByCreatedAt(string $created_at) Return the first ChildAttributeCombination filtered by the created_at column
|
* @method ChildAttributeCombination findOneByCreatedAt(string $created_at) Return the first ChildAttributeCombination filtered by the created_at column
|
||||||
* @method ChildAttributeCombination findOneByUpdatedAt(string $updated_at) Return the first ChildAttributeCombination filtered by the updated_at column
|
* @method ChildAttributeCombination findOneByUpdatedAt(string $updated_at) Return the first ChildAttributeCombination filtered by the updated_at column
|
||||||
*
|
*
|
||||||
* @method array findByAttributeId(int $attribute_id) Return ChildAttributeCombination objects filtered by the attribute_id column
|
* @method array findByAttributeId(int $attribute_id) Return ChildAttributeCombination objects filtered by the attribute_id column
|
||||||
* @method array findByAttributeAvId(int $attribute_av_id) Return ChildAttributeCombination objects filtered by the attribute_av_id column
|
* @method array findByAttributeAvId(int $attribute_av_id) Return ChildAttributeCombination objects filtered by the attribute_av_id column
|
||||||
* @method array findByProductSaleElementsId(int $product_sale_elements_id) Return ChildAttributeCombination objects filtered by the product_sale_elements_id column
|
* @method array findByProductSaleElementsId(int $product_sale_elements_id) Return ChildAttributeCombination objects filtered by the product_sale_elements_id column
|
||||||
|
* @method array findByIsDefault(boolean $is_default) Return ChildAttributeCombination objects filtered by the is_default column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildAttributeCombination objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildAttributeCombination objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildAttributeCombination objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildAttributeCombination objects filtered by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -151,7 +155,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ATTRIBUTE_ID, ATTRIBUTE_AV_ID, PRODUCT_SALE_ELEMENTS_ID, CREATED_AT, UPDATED_AT FROM attribute_combination WHERE ATTRIBUTE_ID = :p0 AND ATTRIBUTE_AV_ID = :p1 AND PRODUCT_SALE_ELEMENTS_ID = :p2';
|
$sql = 'SELECT ATTRIBUTE_ID, ATTRIBUTE_AV_ID, PRODUCT_SALE_ELEMENTS_ID, IS_DEFAULT, CREATED_AT, UPDATED_AT FROM attribute_combination WHERE ATTRIBUTE_ID = :p0 AND ATTRIBUTE_AV_ID = :p1 AND PRODUCT_SALE_ELEMENTS_ID = :p2';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||||
@@ -385,6 +389,33 @@ abstract class AttributeCombinationQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $productSaleElementsId, $comparison);
|
return $this->addUsingAlias(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $productSaleElementsId, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the is_default column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByIsDefault(true); // WHERE is_default = true
|
||||||
|
* $query->filterByIsDefault('yes'); // WHERE is_default = true
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param boolean|string $isDefault The value to use as filter.
|
||||||
|
* Non-boolean arguments are converted using the following rules:
|
||||||
|
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||||
|
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||||
|
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildAttributeCombinationQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByIsDefault($isDefault = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_string($isDefault)) {
|
||||||
|
$is_default = in_array(strtolower($isDefault), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(AttributeCombinationTableMap::IS_DEFAULT, $isDefault, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the created_at column
|
* Filter the query on the created_at column
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -85,10 +85,10 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
protected $feature_av_id;
|
protected $feature_av_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the by_default field.
|
* The value for the free_text_value field.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $by_default;
|
protected $free_text_value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the position field.
|
* The value for the position field.
|
||||||
@@ -430,14 +430,14 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [by_default] column value.
|
* Get the [free_text_value] column value.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getByDefault()
|
public function getFreeTextValue()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->by_default;
|
return $this->free_text_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -588,25 +588,25 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
} // setFeatureAvId()
|
} // setFeatureAvId()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [by_default] column.
|
* Set the value of [free_text_value] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return \Thelia\Model\FeatureProduct The current object (for fluent API support)
|
* @return \Thelia\Model\FeatureProduct The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setByDefault($v)
|
public function setFreeTextValue($v)
|
||||||
{
|
{
|
||||||
if ($v !== null) {
|
if ($v !== null) {
|
||||||
$v = (string) $v;
|
$v = (string) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->by_default !== $v) {
|
if ($this->free_text_value !== $v) {
|
||||||
$this->by_default = $v;
|
$this->free_text_value = $v;
|
||||||
$this->modifiedColumns[] = FeatureProductTableMap::BY_DEFAULT;
|
$this->modifiedColumns[] = FeatureProductTableMap::FREE_TEXT_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
} // setByDefault()
|
} // setFreeTextValue()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [position] column.
|
* Set the value of [position] column.
|
||||||
@@ -720,8 +720,8 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : FeatureProductTableMap::translateFieldName('FeatureAvId', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : FeatureProductTableMap::translateFieldName('FeatureAvId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->feature_av_id = (null !== $col) ? (int) $col : null;
|
$this->feature_av_id = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FeatureProductTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FeatureProductTableMap::translateFieldName('FreeTextValue', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->by_default = (null !== $col) ? (string) $col : null;
|
$this->free_text_value = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FeatureProductTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FeatureProductTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->position = (null !== $col) ? (int) $col : null;
|
$this->position = (null !== $col) ? (int) $col : null;
|
||||||
@@ -1015,8 +1015,8 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_AV_ID)) {
|
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_AV_ID)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'FEATURE_AV_ID';
|
$modifiedColumns[':p' . $index++] = 'FEATURE_AV_ID';
|
||||||
}
|
}
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::BY_DEFAULT)) {
|
if ($this->isColumnModified(FeatureProductTableMap::FREE_TEXT_VALUE)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'BY_DEFAULT';
|
$modifiedColumns[':p' . $index++] = 'FREE_TEXT_VALUE';
|
||||||
}
|
}
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::POSITION)) {
|
if ($this->isColumnModified(FeatureProductTableMap::POSITION)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'POSITION';
|
$modifiedColumns[':p' . $index++] = 'POSITION';
|
||||||
@@ -1050,8 +1050,8 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
case 'FEATURE_AV_ID':
|
case 'FEATURE_AV_ID':
|
||||||
$stmt->bindValue($identifier, $this->feature_av_id, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->feature_av_id, PDO::PARAM_INT);
|
||||||
break;
|
break;
|
||||||
case 'BY_DEFAULT':
|
case 'FREE_TEXT_VALUE':
|
||||||
$stmt->bindValue($identifier, $this->by_default, PDO::PARAM_STR);
|
$stmt->bindValue($identifier, $this->free_text_value, PDO::PARAM_STR);
|
||||||
break;
|
break;
|
||||||
case 'POSITION':
|
case 'POSITION':
|
||||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||||
@@ -1137,7 +1137,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
return $this->getFeatureAvId();
|
return $this->getFeatureAvId();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
return $this->getByDefault();
|
return $this->getFreeTextValue();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
return $this->getPosition();
|
return $this->getPosition();
|
||||||
@@ -1181,7 +1181,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
$keys[1] => $this->getProductId(),
|
$keys[1] => $this->getProductId(),
|
||||||
$keys[2] => $this->getFeatureId(),
|
$keys[2] => $this->getFeatureId(),
|
||||||
$keys[3] => $this->getFeatureAvId(),
|
$keys[3] => $this->getFeatureAvId(),
|
||||||
$keys[4] => $this->getByDefault(),
|
$keys[4] => $this->getFreeTextValue(),
|
||||||
$keys[5] => $this->getPosition(),
|
$keys[5] => $this->getPosition(),
|
||||||
$keys[6] => $this->getCreatedAt(),
|
$keys[6] => $this->getCreatedAt(),
|
||||||
$keys[7] => $this->getUpdatedAt(),
|
$keys[7] => $this->getUpdatedAt(),
|
||||||
@@ -1249,7 +1249,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
$this->setFeatureAvId($value);
|
$this->setFeatureAvId($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$this->setByDefault($value);
|
$this->setFreeTextValue($value);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
$this->setPosition($value);
|
$this->setPosition($value);
|
||||||
@@ -1288,7 +1288,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
if (array_key_exists($keys[1], $arr)) $this->setProductId($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setProductId($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setFeatureId($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setFeatureId($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setFeatureAvId($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setFeatureAvId($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setByDefault($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setFreeTextValue($arr[$keys[4]]);
|
||||||
if (array_key_exists($keys[5], $arr)) $this->setPosition($arr[$keys[5]]);
|
if (array_key_exists($keys[5], $arr)) $this->setPosition($arr[$keys[5]]);
|
||||||
if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]);
|
if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]);
|
||||||
if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]);
|
if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]);
|
||||||
@@ -1307,7 +1307,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(FeatureProductTableMap::PRODUCT_ID)) $criteria->add(FeatureProductTableMap::PRODUCT_ID, $this->product_id);
|
if ($this->isColumnModified(FeatureProductTableMap::PRODUCT_ID)) $criteria->add(FeatureProductTableMap::PRODUCT_ID, $this->product_id);
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_ID)) $criteria->add(FeatureProductTableMap::FEATURE_ID, $this->feature_id);
|
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_ID)) $criteria->add(FeatureProductTableMap::FEATURE_ID, $this->feature_id);
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_AV_ID)) $criteria->add(FeatureProductTableMap::FEATURE_AV_ID, $this->feature_av_id);
|
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_AV_ID)) $criteria->add(FeatureProductTableMap::FEATURE_AV_ID, $this->feature_av_id);
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::BY_DEFAULT)) $criteria->add(FeatureProductTableMap::BY_DEFAULT, $this->by_default);
|
if ($this->isColumnModified(FeatureProductTableMap::FREE_TEXT_VALUE)) $criteria->add(FeatureProductTableMap::FREE_TEXT_VALUE, $this->free_text_value);
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::POSITION)) $criteria->add(FeatureProductTableMap::POSITION, $this->position);
|
if ($this->isColumnModified(FeatureProductTableMap::POSITION)) $criteria->add(FeatureProductTableMap::POSITION, $this->position);
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::CREATED_AT)) $criteria->add(FeatureProductTableMap::CREATED_AT, $this->created_at);
|
if ($this->isColumnModified(FeatureProductTableMap::CREATED_AT)) $criteria->add(FeatureProductTableMap::CREATED_AT, $this->created_at);
|
||||||
if ($this->isColumnModified(FeatureProductTableMap::UPDATED_AT)) $criteria->add(FeatureProductTableMap::UPDATED_AT, $this->updated_at);
|
if ($this->isColumnModified(FeatureProductTableMap::UPDATED_AT)) $criteria->add(FeatureProductTableMap::UPDATED_AT, $this->updated_at);
|
||||||
@@ -1377,7 +1377,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
$copyObj->setProductId($this->getProductId());
|
$copyObj->setProductId($this->getProductId());
|
||||||
$copyObj->setFeatureId($this->getFeatureId());
|
$copyObj->setFeatureId($this->getFeatureId());
|
||||||
$copyObj->setFeatureAvId($this->getFeatureAvId());
|
$copyObj->setFeatureAvId($this->getFeatureAvId());
|
||||||
$copyObj->setByDefault($this->getByDefault());
|
$copyObj->setFreeTextValue($this->getFreeTextValue());
|
||||||
$copyObj->setPosition($this->getPosition());
|
$copyObj->setPosition($this->getPosition());
|
||||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||||
@@ -1571,7 +1571,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
|
|||||||
$this->product_id = null;
|
$this->product_id = null;
|
||||||
$this->feature_id = null;
|
$this->feature_id = null;
|
||||||
$this->feature_av_id = null;
|
$this->feature_av_id = null;
|
||||||
$this->by_default = null;
|
$this->free_text_value = null;
|
||||||
$this->position = null;
|
$this->position = null;
|
||||||
$this->created_at = null;
|
$this->created_at = null;
|
||||||
$this->updated_at = null;
|
$this->updated_at = null;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
|
|||||||
* @method ChildFeatureProductQuery orderByProductId($order = Criteria::ASC) Order by the product_id column
|
* @method ChildFeatureProductQuery orderByProductId($order = Criteria::ASC) Order by the product_id column
|
||||||
* @method ChildFeatureProductQuery orderByFeatureId($order = Criteria::ASC) Order by the feature_id column
|
* @method ChildFeatureProductQuery orderByFeatureId($order = Criteria::ASC) Order by the feature_id column
|
||||||
* @method ChildFeatureProductQuery orderByFeatureAvId($order = Criteria::ASC) Order by the feature_av_id column
|
* @method ChildFeatureProductQuery orderByFeatureAvId($order = Criteria::ASC) Order by the feature_av_id column
|
||||||
* @method ChildFeatureProductQuery orderByByDefault($order = Criteria::ASC) Order by the by_default column
|
* @method ChildFeatureProductQuery orderByFreeTextValue($order = Criteria::ASC) Order by the free_text_value column
|
||||||
* @method ChildFeatureProductQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
* @method ChildFeatureProductQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||||
* @method ChildFeatureProductQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildFeatureProductQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildFeatureProductQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildFeatureProductQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
@@ -34,7 +34,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
|
|||||||
* @method ChildFeatureProductQuery groupByProductId() Group by the product_id column
|
* @method ChildFeatureProductQuery groupByProductId() Group by the product_id column
|
||||||
* @method ChildFeatureProductQuery groupByFeatureId() Group by the feature_id column
|
* @method ChildFeatureProductQuery groupByFeatureId() Group by the feature_id column
|
||||||
* @method ChildFeatureProductQuery groupByFeatureAvId() Group by the feature_av_id column
|
* @method ChildFeatureProductQuery groupByFeatureAvId() Group by the feature_av_id column
|
||||||
* @method ChildFeatureProductQuery groupByByDefault() Group by the by_default column
|
* @method ChildFeatureProductQuery groupByFreeTextValue() Group by the free_text_value column
|
||||||
* @method ChildFeatureProductQuery groupByPosition() Group by the position column
|
* @method ChildFeatureProductQuery groupByPosition() Group by the position column
|
||||||
* @method ChildFeatureProductQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildFeatureProductQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildFeatureProductQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildFeatureProductQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
@@ -62,7 +62,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
|
|||||||
* @method ChildFeatureProduct findOneByProductId(int $product_id) Return the first ChildFeatureProduct filtered by the product_id column
|
* @method ChildFeatureProduct findOneByProductId(int $product_id) Return the first ChildFeatureProduct filtered by the product_id column
|
||||||
* @method ChildFeatureProduct findOneByFeatureId(int $feature_id) Return the first ChildFeatureProduct filtered by the feature_id column
|
* @method ChildFeatureProduct findOneByFeatureId(int $feature_id) Return the first ChildFeatureProduct filtered by the feature_id column
|
||||||
* @method ChildFeatureProduct findOneByFeatureAvId(int $feature_av_id) Return the first ChildFeatureProduct filtered by the feature_av_id column
|
* @method ChildFeatureProduct findOneByFeatureAvId(int $feature_av_id) Return the first ChildFeatureProduct filtered by the feature_av_id column
|
||||||
* @method ChildFeatureProduct findOneByByDefault(string $by_default) Return the first ChildFeatureProduct filtered by the by_default column
|
* @method ChildFeatureProduct findOneByFreeTextValue(string $free_text_value) Return the first ChildFeatureProduct filtered by the free_text_value column
|
||||||
* @method ChildFeatureProduct findOneByPosition(int $position) Return the first ChildFeatureProduct filtered by the position column
|
* @method ChildFeatureProduct findOneByPosition(int $position) Return the first ChildFeatureProduct filtered by the position column
|
||||||
* @method ChildFeatureProduct findOneByCreatedAt(string $created_at) Return the first ChildFeatureProduct filtered by the created_at column
|
* @method ChildFeatureProduct findOneByCreatedAt(string $created_at) Return the first ChildFeatureProduct filtered by the created_at column
|
||||||
* @method ChildFeatureProduct findOneByUpdatedAt(string $updated_at) Return the first ChildFeatureProduct filtered by the updated_at column
|
* @method ChildFeatureProduct findOneByUpdatedAt(string $updated_at) Return the first ChildFeatureProduct filtered by the updated_at column
|
||||||
@@ -71,7 +71,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
|
|||||||
* @method array findByProductId(int $product_id) Return ChildFeatureProduct objects filtered by the product_id column
|
* @method array findByProductId(int $product_id) Return ChildFeatureProduct objects filtered by the product_id column
|
||||||
* @method array findByFeatureId(int $feature_id) Return ChildFeatureProduct objects filtered by the feature_id column
|
* @method array findByFeatureId(int $feature_id) Return ChildFeatureProduct objects filtered by the feature_id column
|
||||||
* @method array findByFeatureAvId(int $feature_av_id) Return ChildFeatureProduct objects filtered by the feature_av_id column
|
* @method array findByFeatureAvId(int $feature_av_id) Return ChildFeatureProduct objects filtered by the feature_av_id column
|
||||||
* @method array findByByDefault(string $by_default) Return ChildFeatureProduct objects filtered by the by_default column
|
* @method array findByFreeTextValue(string $free_text_value) Return ChildFeatureProduct objects filtered by the free_text_value column
|
||||||
* @method array findByPosition(int $position) Return ChildFeatureProduct objects filtered by the position column
|
* @method array findByPosition(int $position) Return ChildFeatureProduct objects filtered by the position column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildFeatureProduct objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildFeatureProduct objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildFeatureProduct objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildFeatureProduct objects filtered by the updated_at column
|
||||||
@@ -163,7 +163,7 @@ abstract class FeatureProductQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ID, PRODUCT_ID, FEATURE_ID, FEATURE_AV_ID, BY_DEFAULT, POSITION, CREATED_AT, UPDATED_AT FROM feature_product WHERE ID = :p0';
|
$sql = 'SELECT ID, PRODUCT_ID, FEATURE_ID, FEATURE_AV_ID, FREE_TEXT_VALUE, POSITION, CREATED_AT, UPDATED_AT FROM feature_product WHERE ID = :p0';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
@@ -423,32 +423,32 @@ abstract class FeatureProductQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the by_default column
|
* Filter the query on the free_text_value column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByByDefault('fooValue'); // WHERE by_default = 'fooValue'
|
* $query->filterByFreeTextValue('fooValue'); // WHERE free_text_value = 'fooValue'
|
||||||
* $query->filterByByDefault('%fooValue%'); // WHERE by_default LIKE '%fooValue%'
|
* $query->filterByFreeTextValue('%fooValue%'); // WHERE free_text_value LIKE '%fooValue%'
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $byDefault The value to use as filter.
|
* @param string $freeTextValue The value to use as filter.
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildFeatureProductQuery The current query, for fluid interface
|
* @return ChildFeatureProductQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByByDefault($byDefault = null, $comparison = null)
|
public function filterByFreeTextValue($freeTextValue = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
if (is_array($byDefault)) {
|
if (is_array($freeTextValue)) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $byDefault)) {
|
} elseif (preg_match('/[\%\*]/', $freeTextValue)) {
|
||||||
$byDefault = str_replace('*', '%', $byDefault);
|
$freeTextValue = str_replace('*', '%', $freeTextValue);
|
||||||
$comparison = Criteria::LIKE;
|
$comparison = Criteria::LIKE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(FeatureProductTableMap::BY_DEFAULT, $byDefault, $comparison);
|
return $this->addUsingAlias(FeatureProductTableMap::FREE_TEXT_VALUE, $freeTextValue, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -24,12 +24,19 @@ use Thelia\Model\Map\OrderProductTableMap;
|
|||||||
* @method ChildOrderProductQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildOrderProductQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildOrderProductQuery orderByOrderId($order = Criteria::ASC) Order by the order_id column
|
* @method ChildOrderProductQuery orderByOrderId($order = Criteria::ASC) Order by the order_id column
|
||||||
* @method ChildOrderProductQuery orderByProductRef($order = Criteria::ASC) Order by the product_ref column
|
* @method ChildOrderProductQuery orderByProductRef($order = Criteria::ASC) Order by the product_ref column
|
||||||
|
* @method ChildOrderProductQuery orderByProductSaleElementsRef($order = Criteria::ASC) Order by the product_sale_elements_ref column
|
||||||
* @method ChildOrderProductQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
* @method ChildOrderProductQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||||
* @method ChildOrderProductQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
|
||||||
* @method ChildOrderProductQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
|
* @method ChildOrderProductQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
|
||||||
|
* @method ChildOrderProductQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||||
|
* @method ChildOrderProductQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
|
||||||
* @method ChildOrderProductQuery orderByQuantity($order = Criteria::ASC) Order by the quantity column
|
* @method ChildOrderProductQuery orderByQuantity($order = Criteria::ASC) Order by the quantity column
|
||||||
* @method ChildOrderProductQuery orderByPrice($order = Criteria::ASC) Order by the price column
|
* @method ChildOrderProductQuery orderByPrice($order = Criteria::ASC) Order by the price column
|
||||||
* @method ChildOrderProductQuery orderByTax($order = Criteria::ASC) Order by the tax column
|
* @method ChildOrderProductQuery orderByPromoPrice($order = Criteria::ASC) Order by the promo_price column
|
||||||
|
* @method ChildOrderProductQuery orderByWasNew($order = Criteria::ASC) Order by the was_new column
|
||||||
|
* @method ChildOrderProductQuery orderByWasInPromo($order = Criteria::ASC) Order by the was_in_promo column
|
||||||
|
* @method ChildOrderProductQuery orderByWeight($order = Criteria::ASC) Order by the weight column
|
||||||
|
* @method ChildOrderProductQuery orderByTaxRuleTitle($order = Criteria::ASC) Order by the tax_rule_title column
|
||||||
|
* @method ChildOrderProductQuery orderByTaxRuleDescription($order = Criteria::ASC) Order by the tax_rule_description column
|
||||||
* @method ChildOrderProductQuery orderByParent($order = Criteria::ASC) Order by the parent column
|
* @method ChildOrderProductQuery orderByParent($order = Criteria::ASC) Order by the parent column
|
||||||
* @method ChildOrderProductQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildOrderProductQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildOrderProductQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildOrderProductQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
@@ -37,12 +44,19 @@ use Thelia\Model\Map\OrderProductTableMap;
|
|||||||
* @method ChildOrderProductQuery groupById() Group by the id column
|
* @method ChildOrderProductQuery groupById() Group by the id column
|
||||||
* @method ChildOrderProductQuery groupByOrderId() Group by the order_id column
|
* @method ChildOrderProductQuery groupByOrderId() Group by the order_id column
|
||||||
* @method ChildOrderProductQuery groupByProductRef() Group by the product_ref column
|
* @method ChildOrderProductQuery groupByProductRef() Group by the product_ref column
|
||||||
|
* @method ChildOrderProductQuery groupByProductSaleElementsRef() Group by the product_sale_elements_ref column
|
||||||
* @method ChildOrderProductQuery groupByTitle() Group by the title column
|
* @method ChildOrderProductQuery groupByTitle() Group by the title column
|
||||||
* @method ChildOrderProductQuery groupByDescription() Group by the description column
|
|
||||||
* @method ChildOrderProductQuery groupByChapo() Group by the chapo column
|
* @method ChildOrderProductQuery groupByChapo() Group by the chapo column
|
||||||
|
* @method ChildOrderProductQuery groupByDescription() Group by the description column
|
||||||
|
* @method ChildOrderProductQuery groupByPostscriptum() Group by the postscriptum column
|
||||||
* @method ChildOrderProductQuery groupByQuantity() Group by the quantity column
|
* @method ChildOrderProductQuery groupByQuantity() Group by the quantity column
|
||||||
* @method ChildOrderProductQuery groupByPrice() Group by the price column
|
* @method ChildOrderProductQuery groupByPrice() Group by the price column
|
||||||
* @method ChildOrderProductQuery groupByTax() Group by the tax column
|
* @method ChildOrderProductQuery groupByPromoPrice() Group by the promo_price column
|
||||||
|
* @method ChildOrderProductQuery groupByWasNew() Group by the was_new column
|
||||||
|
* @method ChildOrderProductQuery groupByWasInPromo() Group by the was_in_promo column
|
||||||
|
* @method ChildOrderProductQuery groupByWeight() Group by the weight column
|
||||||
|
* @method ChildOrderProductQuery groupByTaxRuleTitle() Group by the tax_rule_title column
|
||||||
|
* @method ChildOrderProductQuery groupByTaxRuleDescription() Group by the tax_rule_description column
|
||||||
* @method ChildOrderProductQuery groupByParent() Group by the parent column
|
* @method ChildOrderProductQuery groupByParent() Group by the parent column
|
||||||
* @method ChildOrderProductQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildOrderProductQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildOrderProductQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildOrderProductQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
@@ -55,9 +69,13 @@ use Thelia\Model\Map\OrderProductTableMap;
|
|||||||
* @method ChildOrderProductQuery rightJoinOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Order relation
|
* @method ChildOrderProductQuery rightJoinOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Order relation
|
||||||
* @method ChildOrderProductQuery innerJoinOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the Order relation
|
* @method ChildOrderProductQuery innerJoinOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the Order relation
|
||||||
*
|
*
|
||||||
* @method ChildOrderProductQuery leftJoinOrderFeature($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderFeature relation
|
* @method ChildOrderProductQuery leftJoinOrderProductAttributeCombination($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||||
* @method ChildOrderProductQuery rightJoinOrderFeature($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderFeature relation
|
* @method ChildOrderProductQuery rightJoinOrderProductAttributeCombination($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||||
* @method ChildOrderProductQuery innerJoinOrderFeature($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderFeature relation
|
* @method ChildOrderProductQuery innerJoinOrderProductAttributeCombination($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||||
|
*
|
||||||
|
* @method ChildOrderProductQuery leftJoinOrderProductTax($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProductTax relation
|
||||||
|
* @method ChildOrderProductQuery rightJoinOrderProductTax($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProductTax relation
|
||||||
|
* @method ChildOrderProductQuery innerJoinOrderProductTax($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProductTax relation
|
||||||
*
|
*
|
||||||
* @method ChildOrderProduct findOne(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query
|
* @method ChildOrderProduct findOne(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query
|
||||||
* @method ChildOrderProduct findOneOrCreate(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query, or a new ChildOrderProduct object populated from the query conditions when no match is found
|
* @method ChildOrderProduct findOneOrCreate(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query, or a new ChildOrderProduct object populated from the query conditions when no match is found
|
||||||
@@ -65,12 +83,19 @@ use Thelia\Model\Map\OrderProductTableMap;
|
|||||||
* @method ChildOrderProduct findOneById(int $id) Return the first ChildOrderProduct filtered by the id column
|
* @method ChildOrderProduct findOneById(int $id) Return the first ChildOrderProduct filtered by the id column
|
||||||
* @method ChildOrderProduct findOneByOrderId(int $order_id) Return the first ChildOrderProduct filtered by the order_id column
|
* @method ChildOrderProduct findOneByOrderId(int $order_id) Return the first ChildOrderProduct filtered by the order_id column
|
||||||
* @method ChildOrderProduct findOneByProductRef(string $product_ref) Return the first ChildOrderProduct filtered by the product_ref column
|
* @method ChildOrderProduct findOneByProductRef(string $product_ref) Return the first ChildOrderProduct filtered by the product_ref column
|
||||||
|
* @method ChildOrderProduct findOneByProductSaleElementsRef(string $product_sale_elements_ref) Return the first ChildOrderProduct filtered by the product_sale_elements_ref column
|
||||||
* @method ChildOrderProduct findOneByTitle(string $title) Return the first ChildOrderProduct filtered by the title column
|
* @method ChildOrderProduct findOneByTitle(string $title) Return the first ChildOrderProduct filtered by the title column
|
||||||
* @method ChildOrderProduct findOneByDescription(string $description) Return the first ChildOrderProduct filtered by the description column
|
|
||||||
* @method ChildOrderProduct findOneByChapo(string $chapo) Return the first ChildOrderProduct filtered by the chapo column
|
* @method ChildOrderProduct findOneByChapo(string $chapo) Return the first ChildOrderProduct filtered by the chapo column
|
||||||
|
* @method ChildOrderProduct findOneByDescription(string $description) Return the first ChildOrderProduct filtered by the description column
|
||||||
|
* @method ChildOrderProduct findOneByPostscriptum(string $postscriptum) Return the first ChildOrderProduct filtered by the postscriptum column
|
||||||
* @method ChildOrderProduct findOneByQuantity(double $quantity) Return the first ChildOrderProduct filtered by the quantity column
|
* @method ChildOrderProduct findOneByQuantity(double $quantity) Return the first ChildOrderProduct filtered by the quantity column
|
||||||
* @method ChildOrderProduct findOneByPrice(double $price) Return the first ChildOrderProduct filtered by the price column
|
* @method ChildOrderProduct findOneByPrice(double $price) Return the first ChildOrderProduct filtered by the price column
|
||||||
* @method ChildOrderProduct findOneByTax(double $tax) Return the first ChildOrderProduct filtered by the tax column
|
* @method ChildOrderProduct findOneByPromoPrice(string $promo_price) Return the first ChildOrderProduct filtered by the promo_price column
|
||||||
|
* @method ChildOrderProduct findOneByWasNew(int $was_new) Return the first ChildOrderProduct filtered by the was_new column
|
||||||
|
* @method ChildOrderProduct findOneByWasInPromo(int $was_in_promo) Return the first ChildOrderProduct filtered by the was_in_promo column
|
||||||
|
* @method ChildOrderProduct findOneByWeight(string $weight) Return the first ChildOrderProduct filtered by the weight column
|
||||||
|
* @method ChildOrderProduct findOneByTaxRuleTitle(string $tax_rule_title) Return the first ChildOrderProduct filtered by the tax_rule_title column
|
||||||
|
* @method ChildOrderProduct findOneByTaxRuleDescription(string $tax_rule_description) Return the first ChildOrderProduct filtered by the tax_rule_description column
|
||||||
* @method ChildOrderProduct findOneByParent(int $parent) Return the first ChildOrderProduct filtered by the parent column
|
* @method ChildOrderProduct findOneByParent(int $parent) Return the first ChildOrderProduct filtered by the parent column
|
||||||
* @method ChildOrderProduct findOneByCreatedAt(string $created_at) Return the first ChildOrderProduct filtered by the created_at column
|
* @method ChildOrderProduct findOneByCreatedAt(string $created_at) Return the first ChildOrderProduct filtered by the created_at column
|
||||||
* @method ChildOrderProduct findOneByUpdatedAt(string $updated_at) Return the first ChildOrderProduct filtered by the updated_at column
|
* @method ChildOrderProduct findOneByUpdatedAt(string $updated_at) Return the first ChildOrderProduct filtered by the updated_at column
|
||||||
@@ -78,12 +103,19 @@ use Thelia\Model\Map\OrderProductTableMap;
|
|||||||
* @method array findById(int $id) Return ChildOrderProduct objects filtered by the id column
|
* @method array findById(int $id) Return ChildOrderProduct objects filtered by the id column
|
||||||
* @method array findByOrderId(int $order_id) Return ChildOrderProduct objects filtered by the order_id column
|
* @method array findByOrderId(int $order_id) Return ChildOrderProduct objects filtered by the order_id column
|
||||||
* @method array findByProductRef(string $product_ref) Return ChildOrderProduct objects filtered by the product_ref column
|
* @method array findByProductRef(string $product_ref) Return ChildOrderProduct objects filtered by the product_ref column
|
||||||
|
* @method array findByProductSaleElementsRef(string $product_sale_elements_ref) Return ChildOrderProduct objects filtered by the product_sale_elements_ref column
|
||||||
* @method array findByTitle(string $title) Return ChildOrderProduct objects filtered by the title column
|
* @method array findByTitle(string $title) Return ChildOrderProduct objects filtered by the title column
|
||||||
* @method array findByDescription(string $description) Return ChildOrderProduct objects filtered by the description column
|
|
||||||
* @method array findByChapo(string $chapo) Return ChildOrderProduct objects filtered by the chapo column
|
* @method array findByChapo(string $chapo) Return ChildOrderProduct objects filtered by the chapo column
|
||||||
|
* @method array findByDescription(string $description) Return ChildOrderProduct objects filtered by the description column
|
||||||
|
* @method array findByPostscriptum(string $postscriptum) Return ChildOrderProduct objects filtered by the postscriptum column
|
||||||
* @method array findByQuantity(double $quantity) Return ChildOrderProduct objects filtered by the quantity column
|
* @method array findByQuantity(double $quantity) Return ChildOrderProduct objects filtered by the quantity column
|
||||||
* @method array findByPrice(double $price) Return ChildOrderProduct objects filtered by the price column
|
* @method array findByPrice(double $price) Return ChildOrderProduct objects filtered by the price column
|
||||||
* @method array findByTax(double $tax) Return ChildOrderProduct objects filtered by the tax column
|
* @method array findByPromoPrice(string $promo_price) Return ChildOrderProduct objects filtered by the promo_price column
|
||||||
|
* @method array findByWasNew(int $was_new) Return ChildOrderProduct objects filtered by the was_new column
|
||||||
|
* @method array findByWasInPromo(int $was_in_promo) Return ChildOrderProduct objects filtered by the was_in_promo column
|
||||||
|
* @method array findByWeight(string $weight) Return ChildOrderProduct objects filtered by the weight column
|
||||||
|
* @method array findByTaxRuleTitle(string $tax_rule_title) Return ChildOrderProduct objects filtered by the tax_rule_title column
|
||||||
|
* @method array findByTaxRuleDescription(string $tax_rule_description) Return ChildOrderProduct objects filtered by the tax_rule_description column
|
||||||
* @method array findByParent(int $parent) Return ChildOrderProduct objects filtered by the parent column
|
* @method array findByParent(int $parent) Return ChildOrderProduct objects filtered by the parent column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildOrderProduct objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildOrderProduct objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildOrderProduct objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildOrderProduct objects filtered by the updated_at column
|
||||||
@@ -175,7 +207,7 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ID, ORDER_ID, PRODUCT_REF, TITLE, DESCRIPTION, CHAPO, QUANTITY, PRICE, TAX, PARENT, CREATED_AT, UPDATED_AT FROM order_product WHERE ID = :p0';
|
$sql = 'SELECT ID, ORDER_ID, PRODUCT_REF, PRODUCT_SALE_ELEMENTS_REF, TITLE, CHAPO, DESCRIPTION, POSTSCRIPTUM, QUANTITY, PRICE, PROMO_PRICE, WAS_NEW, WAS_IN_PROMO, WEIGHT, TAX_RULE_TITLE, TAX_RULE_DESCRIPTION, PARENT, CREATED_AT, UPDATED_AT FROM order_product WHERE ID = :p0';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
@@ -377,6 +409,35 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(OrderProductTableMap::PRODUCT_REF, $productRef, $comparison);
|
return $this->addUsingAlias(OrderProductTableMap::PRODUCT_REF, $productRef, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the product_sale_elements_ref column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByProductSaleElementsRef('fooValue'); // WHERE product_sale_elements_ref = 'fooValue'
|
||||||
|
* $query->filterByProductSaleElementsRef('%fooValue%'); // WHERE product_sale_elements_ref LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $productSaleElementsRef The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByProductSaleElementsRef($productSaleElementsRef = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($productSaleElementsRef)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $productSaleElementsRef)) {
|
||||||
|
$productSaleElementsRef = str_replace('*', '%', $productSaleElementsRef);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF, $productSaleElementsRef, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the title column
|
* Filter the query on the title column
|
||||||
*
|
*
|
||||||
@@ -406,6 +467,35 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(OrderProductTableMap::TITLE, $title, $comparison);
|
return $this->addUsingAlias(OrderProductTableMap::TITLE, $title, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the chapo column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
|
||||||
|
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $chapo The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByChapo($chapo = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($chapo)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $chapo)) {
|
||||||
|
$chapo = str_replace('*', '%', $chapo);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(OrderProductTableMap::CHAPO, $chapo, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the description column
|
* Filter the query on the description column
|
||||||
*
|
*
|
||||||
@@ -436,32 +526,32 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the chapo column
|
* Filter the query on the postscriptum column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
|
* $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue'
|
||||||
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
|
* $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%'
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $chapo The value to use as filter.
|
* @param string $postscriptum The value to use as filter.
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByChapo($chapo = null, $comparison = null)
|
public function filterByPostscriptum($postscriptum = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
if (is_array($chapo)) {
|
if (is_array($postscriptum)) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $chapo)) {
|
} elseif (preg_match('/[\%\*]/', $postscriptum)) {
|
||||||
$chapo = str_replace('*', '%', $chapo);
|
$postscriptum = str_replace('*', '%', $postscriptum);
|
||||||
$comparison = Criteria::LIKE;
|
$comparison = Criteria::LIKE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderProductTableMap::CHAPO, $chapo, $comparison);
|
return $this->addUsingAlias(OrderProductTableMap::POSTSCRIPTUM, $postscriptum, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -547,16 +637,45 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the tax column
|
* Filter the query on the promo_price column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByTax(1234); // WHERE tax = 1234
|
* $query->filterByPromoPrice('fooValue'); // WHERE promo_price = 'fooValue'
|
||||||
* $query->filterByTax(array(12, 34)); // WHERE tax IN (12, 34)
|
* $query->filterByPromoPrice('%fooValue%'); // WHERE promo_price LIKE '%fooValue%'
|
||||||
* $query->filterByTax(array('min' => 12)); // WHERE tax > 12
|
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param mixed $tax The value to use as filter.
|
* @param string $promoPrice The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPromoPrice($promoPrice = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($promoPrice)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $promoPrice)) {
|
||||||
|
$promoPrice = str_replace('*', '%', $promoPrice);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(OrderProductTableMap::PROMO_PRICE, $promoPrice, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the was_new column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByWasNew(1234); // WHERE was_new = 1234
|
||||||
|
* $query->filterByWasNew(array(12, 34)); // WHERE was_new IN (12, 34)
|
||||||
|
* $query->filterByWasNew(array('min' => 12)); // WHERE was_new > 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $wasNew The value to use as filter.
|
||||||
* Use scalar values for equality.
|
* Use scalar values for equality.
|
||||||
* Use array values for in_array() equivalent.
|
* Use array values for in_array() equivalent.
|
||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
@@ -564,16 +683,16 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByTax($tax = null, $comparison = null)
|
public function filterByWasNew($wasNew = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($tax)) {
|
if (is_array($wasNew)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($tax['min'])) {
|
if (isset($wasNew['min'])) {
|
||||||
$this->addUsingAlias(OrderProductTableMap::TAX, $tax['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(OrderProductTableMap::WAS_NEW, $wasNew['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($tax['max'])) {
|
if (isset($wasNew['max'])) {
|
||||||
$this->addUsingAlias(OrderProductTableMap::TAX, $tax['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(OrderProductTableMap::WAS_NEW, $wasNew['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -584,7 +703,135 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderProductTableMap::TAX, $tax, $comparison);
|
return $this->addUsingAlias(OrderProductTableMap::WAS_NEW, $wasNew, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the was_in_promo column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByWasInPromo(1234); // WHERE was_in_promo = 1234
|
||||||
|
* $query->filterByWasInPromo(array(12, 34)); // WHERE was_in_promo IN (12, 34)
|
||||||
|
* $query->filterByWasInPromo(array('min' => 12)); // WHERE was_in_promo > 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $wasInPromo The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByWasInPromo($wasInPromo = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($wasInPromo)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($wasInPromo['min'])) {
|
||||||
|
$this->addUsingAlias(OrderProductTableMap::WAS_IN_PROMO, $wasInPromo['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($wasInPromo['max'])) {
|
||||||
|
$this->addUsingAlias(OrderProductTableMap::WAS_IN_PROMO, $wasInPromo['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(OrderProductTableMap::WAS_IN_PROMO, $wasInPromo, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the weight column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByWeight('fooValue'); // WHERE weight = 'fooValue'
|
||||||
|
* $query->filterByWeight('%fooValue%'); // WHERE weight LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $weight The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByWeight($weight = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($weight)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $weight)) {
|
||||||
|
$weight = str_replace('*', '%', $weight);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(OrderProductTableMap::WEIGHT, $weight, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the tax_rule_title column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTaxRuleTitle('fooValue'); // WHERE tax_rule_title = 'fooValue'
|
||||||
|
* $query->filterByTaxRuleTitle('%fooValue%'); // WHERE tax_rule_title LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $taxRuleTitle The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTaxRuleTitle($taxRuleTitle = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($taxRuleTitle)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $taxRuleTitle)) {
|
||||||
|
$taxRuleTitle = str_replace('*', '%', $taxRuleTitle);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(OrderProductTableMap::TAX_RULE_TITLE, $taxRuleTitle, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the tax_rule_description column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTaxRuleDescription('fooValue'); // WHERE tax_rule_description = 'fooValue'
|
||||||
|
* $query->filterByTaxRuleDescription('%fooValue%'); // WHERE tax_rule_description LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $taxRuleDescription The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTaxRuleDescription($taxRuleDescription = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($taxRuleDescription)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $taxRuleDescription)) {
|
||||||
|
$taxRuleDescription = str_replace('*', '%', $taxRuleDescription);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(OrderProductTableMap::TAX_RULE_DESCRIPTION, $taxRuleDescription, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -790,40 +1037,40 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\OrderFeature object
|
* Filter the query by a related \Thelia\Model\OrderProductAttributeCombination object
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\OrderFeature|ObjectCollection $orderFeature the related object to use as filter
|
* @param \Thelia\Model\OrderProductAttributeCombination|ObjectCollection $orderProductAttributeCombination the related object to use as filter
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByOrderFeature($orderFeature, $comparison = null)
|
public function filterByOrderProductAttributeCombination($orderProductAttributeCombination, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($orderFeature instanceof \Thelia\Model\OrderFeature) {
|
if ($orderProductAttributeCombination instanceof \Thelia\Model\OrderProductAttributeCombination) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(OrderProductTableMap::ID, $orderFeature->getOrderProductId(), $comparison);
|
->addUsingAlias(OrderProductTableMap::ID, $orderProductAttributeCombination->getOrderProductId(), $comparison);
|
||||||
} elseif ($orderFeature instanceof ObjectCollection) {
|
} elseif ($orderProductAttributeCombination instanceof ObjectCollection) {
|
||||||
return $this
|
return $this
|
||||||
->useOrderFeatureQuery()
|
->useOrderProductAttributeCombinationQuery()
|
||||||
->filterByPrimaryKeys($orderFeature->getPrimaryKeys())
|
->filterByPrimaryKeys($orderProductAttributeCombination->getPrimaryKeys())
|
||||||
->endUse();
|
->endUse();
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByOrderFeature() only accepts arguments of type \Thelia\Model\OrderFeature or Collection');
|
throw new PropelException('filterByOrderProductAttributeCombination() only accepts arguments of type \Thelia\Model\OrderProductAttributeCombination or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the OrderFeature relation
|
* Adds a JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrderFeature($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
public function joinOrderProductAttributeCombination($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('OrderFeature');
|
$relationMap = $tableMap->getRelation('OrderProductAttributeCombination');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -838,14 +1085,14 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'OrderFeature');
|
$this->addJoinObject($join, 'OrderProductAttributeCombination');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the OrderFeature relation OrderFeature object
|
* Use the OrderProductAttributeCombination relation OrderProductAttributeCombination object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -853,13 +1100,86 @@ abstract class OrderProductQuery extends ModelCriteria
|
|||||||
* to be used as main alias in the secondary query
|
* to be used as main alias in the secondary query
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderFeatureQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderProductAttributeCombinationQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
public function useOrderProductAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrderFeature($relationAlias, $joinType)
|
->joinOrderProductAttributeCombination($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'OrderFeature', '\Thelia\Model\OrderFeatureQuery');
|
->useQuery($relationAlias ? $relationAlias : 'OrderProductAttributeCombination', '\Thelia\Model\OrderProductAttributeCombinationQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\OrderProductTax object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\OrderProductTax|ObjectCollection $orderProductTax the related object to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByOrderProductTax($orderProductTax, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($orderProductTax instanceof \Thelia\Model\OrderProductTax) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(OrderProductTableMap::ID, $orderProductTax->getOrderProductId(), $comparison);
|
||||||
|
} elseif ($orderProductTax instanceof ObjectCollection) {
|
||||||
|
return $this
|
||||||
|
->useOrderProductTaxQuery()
|
||||||
|
->filterByPrimaryKeys($orderProductTax->getPrimaryKeys())
|
||||||
|
->endUse();
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByOrderProductTax() only accepts arguments of type \Thelia\Model\OrderProductTax or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the OrderProductTax relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinOrderProductTax($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('OrderProductTax');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'OrderProductTax');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the OrderProductTax relation OrderProductTax object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\OrderProductTaxQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useOrderProductTaxQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinOrderProductTax($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'OrderProductTax', '\Thelia\Model\OrderProductTaxQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,8 +3,66 @@
|
|||||||
namespace Thelia\Model;
|
namespace Thelia\Model;
|
||||||
|
|
||||||
use Thelia\Model\Base\FeatureProduct as BaseFeatureProduct;
|
use Thelia\Model\Base\FeatureProduct as BaseFeatureProduct;
|
||||||
|
use Thelia\Core\Event\TheliaEvents;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Thelia\Core\Event\FeatureProductEvent;
|
||||||
|
|
||||||
class FeatureProduct extends BaseFeatureProduct
|
class FeatureProduct extends BaseFeatureProduct
|
||||||
{
|
{
|
||||||
|
|
||||||
|
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function preInsert(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$this->dispatchEvent(TheliaEvents::BEFORE_CREATEFEATURE_PRODUCT, new FeatureProductEvent($this));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function postInsert(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$this->dispatchEvent(TheliaEvents::AFTER_CREATEFEATURE_PRODUCT, new FeatureProductEvent($this));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function preUpdate(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$this->dispatchEvent(TheliaEvents::BEFORE_UPDATEFEATURE_PRODUCT, new FeatureProductEvent($this));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function postUpdate(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$this->dispatchEvent(TheliaEvents::AFTER_UPDATEFEATURE_PRODUCT, new FeatureProductEvent($this));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function preDelete(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$this->dispatchEvent(TheliaEvents::BEFORE_DELETEFEATURE_PRODUCT, new FeatureProductEvent($this));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function postDelete(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$this->dispatchEvent(TheliaEvents::AFTER_DELETEFEATURE_PRODUCT, new FeatureProductEvent($this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class AttributeCombinationTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 5;
|
const NUM_COLUMNS = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -67,7 +67,7 @@ class AttributeCombinationTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
*/
|
*/
|
||||||
const NUM_HYDRATE_COLUMNS = 5;
|
const NUM_HYDRATE_COLUMNS = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ATTRIBUTE_ID field
|
* the column name for the ATTRIBUTE_ID field
|
||||||
@@ -84,6 +84,11 @@ class AttributeCombinationTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
const PRODUCT_SALE_ELEMENTS_ID = 'attribute_combination.PRODUCT_SALE_ELEMENTS_ID';
|
const PRODUCT_SALE_ELEMENTS_ID = 'attribute_combination.PRODUCT_SALE_ELEMENTS_ID';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the IS_DEFAULT field
|
||||||
|
*/
|
||||||
|
const IS_DEFAULT = 'attribute_combination.IS_DEFAULT';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
*/
|
*/
|
||||||
@@ -106,12 +111,12 @@ class AttributeCombinationTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('AttributeId', 'AttributeAvId', 'ProductSaleElementsId', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('AttributeId', 'AttributeAvId', 'ProductSaleElementsId', 'IsDefault', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('attributeId', 'attributeAvId', 'productSaleElementsId', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('attributeId', 'attributeAvId', 'productSaleElementsId', 'isDefault', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(AttributeCombinationTableMap::ATTRIBUTE_ID, AttributeCombinationTableMap::ATTRIBUTE_AV_ID, AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, AttributeCombinationTableMap::CREATED_AT, AttributeCombinationTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(AttributeCombinationTableMap::ATTRIBUTE_ID, AttributeCombinationTableMap::ATTRIBUTE_AV_ID, AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, AttributeCombinationTableMap::IS_DEFAULT, AttributeCombinationTableMap::CREATED_AT, AttributeCombinationTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ATTRIBUTE_ID', 'ATTRIBUTE_AV_ID', 'PRODUCT_SALE_ELEMENTS_ID', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ATTRIBUTE_ID', 'ATTRIBUTE_AV_ID', 'PRODUCT_SALE_ELEMENTS_ID', 'IS_DEFAULT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('attribute_id', 'attribute_av_id', 'product_sale_elements_id', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('attribute_id', 'attribute_av_id', 'product_sale_elements_id', 'is_default', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,12 +126,12 @@ class AttributeCombinationTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('AttributeId' => 0, 'AttributeAvId' => 1, 'ProductSaleElementsId' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
self::TYPE_PHPNAME => array('AttributeId' => 0, 'AttributeAvId' => 1, 'ProductSaleElementsId' => 2, 'IsDefault' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('attributeId' => 0, 'attributeAvId' => 1, 'productSaleElementsId' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
self::TYPE_STUDLYPHPNAME => array('attributeId' => 0, 'attributeAvId' => 1, 'productSaleElementsId' => 2, 'isDefault' => 3, 'createdAt' => 4, 'updatedAt' => 5, ),
|
||||||
self::TYPE_COLNAME => array(AttributeCombinationTableMap::ATTRIBUTE_ID => 0, AttributeCombinationTableMap::ATTRIBUTE_AV_ID => 1, AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID => 2, AttributeCombinationTableMap::CREATED_AT => 3, AttributeCombinationTableMap::UPDATED_AT => 4, ),
|
self::TYPE_COLNAME => array(AttributeCombinationTableMap::ATTRIBUTE_ID => 0, AttributeCombinationTableMap::ATTRIBUTE_AV_ID => 1, AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID => 2, AttributeCombinationTableMap::IS_DEFAULT => 3, AttributeCombinationTableMap::CREATED_AT => 4, AttributeCombinationTableMap::UPDATED_AT => 5, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ATTRIBUTE_ID' => 0, 'ATTRIBUTE_AV_ID' => 1, 'PRODUCT_SALE_ELEMENTS_ID' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
self::TYPE_RAW_COLNAME => array('ATTRIBUTE_ID' => 0, 'ATTRIBUTE_AV_ID' => 1, 'PRODUCT_SALE_ELEMENTS_ID' => 2, 'IS_DEFAULT' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ),
|
||||||
self::TYPE_FIELDNAME => array('attribute_id' => 0, 'attribute_av_id' => 1, 'product_sale_elements_id' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
self::TYPE_FIELDNAME => array('attribute_id' => 0, 'attribute_av_id' => 1, 'product_sale_elements_id' => 2, 'is_default' => 3, 'created_at' => 4, 'updated_at' => 5, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -148,6 +153,7 @@ class AttributeCombinationTableMap extends TableMap
|
|||||||
$this->addForeignPrimaryKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER' , 'attribute', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER' , 'attribute', 'ID', true, null, null);
|
||||||
$this->addForeignPrimaryKey('ATTRIBUTE_AV_ID', 'AttributeAvId', 'INTEGER' , 'attribute_av', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('ATTRIBUTE_AV_ID', 'AttributeAvId', 'INTEGER' , 'attribute_av', 'ID', true, null, null);
|
||||||
$this->addForeignPrimaryKey('PRODUCT_SALE_ELEMENTS_ID', 'ProductSaleElementsId', 'INTEGER' , 'product_sale_elements', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('PRODUCT_SALE_ELEMENTS_ID', 'ProductSaleElementsId', 'INTEGER' , 'product_sale_elements', 'ID', true, null, null);
|
||||||
|
$this->addColumn('IS_DEFAULT', 'IsDefault', 'BOOLEAN', false, 1, false);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
@@ -365,12 +371,14 @@ class AttributeCombinationTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(AttributeCombinationTableMap::ATTRIBUTE_ID);
|
$criteria->addSelectColumn(AttributeCombinationTableMap::ATTRIBUTE_ID);
|
||||||
$criteria->addSelectColumn(AttributeCombinationTableMap::ATTRIBUTE_AV_ID);
|
$criteria->addSelectColumn(AttributeCombinationTableMap::ATTRIBUTE_AV_ID);
|
||||||
$criteria->addSelectColumn(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID);
|
$criteria->addSelectColumn(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID);
|
||||||
|
$criteria->addSelectColumn(AttributeCombinationTableMap::IS_DEFAULT);
|
||||||
$criteria->addSelectColumn(AttributeCombinationTableMap::CREATED_AT);
|
$criteria->addSelectColumn(AttributeCombinationTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(AttributeCombinationTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(AttributeCombinationTableMap::UPDATED_AT);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_ID');
|
$criteria->addSelectColumn($alias . '.ATTRIBUTE_ID');
|
||||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_AV_ID');
|
$criteria->addSelectColumn($alias . '.ATTRIBUTE_AV_ID');
|
||||||
$criteria->addSelectColumn($alias . '.PRODUCT_SALE_ELEMENTS_ID');
|
$criteria->addSelectColumn($alias . '.PRODUCT_SALE_ELEMENTS_ID');
|
||||||
|
$criteria->addSelectColumn($alias . '.IS_DEFAULT');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,9 +90,9 @@ class FeatureProductTableMap extends TableMap
|
|||||||
const FEATURE_AV_ID = 'feature_product.FEATURE_AV_ID';
|
const FEATURE_AV_ID = 'feature_product.FEATURE_AV_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the BY_DEFAULT field
|
* the column name for the FREE_TEXT_VALUE field
|
||||||
*/
|
*/
|
||||||
const BY_DEFAULT = 'feature_product.BY_DEFAULT';
|
const FREE_TEXT_VALUE = 'feature_product.FREE_TEXT_VALUE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the POSITION field
|
* the column name for the POSITION field
|
||||||
@@ -121,11 +121,11 @@ class FeatureProductTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'ProductId', 'FeatureId', 'FeatureAvId', 'ByDefault', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('Id', 'ProductId', 'FeatureId', 'FeatureAvId', 'FreeTextValue', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'productId', 'featureId', 'featureAvId', 'byDefault', 'position', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'productId', 'featureId', 'featureAvId', 'freeTextValue', 'position', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(FeatureProductTableMap::ID, FeatureProductTableMap::PRODUCT_ID, FeatureProductTableMap::FEATURE_ID, FeatureProductTableMap::FEATURE_AV_ID, FeatureProductTableMap::BY_DEFAULT, FeatureProductTableMap::POSITION, FeatureProductTableMap::CREATED_AT, FeatureProductTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(FeatureProductTableMap::ID, FeatureProductTableMap::PRODUCT_ID, FeatureProductTableMap::FEATURE_ID, FeatureProductTableMap::FEATURE_AV_ID, FeatureProductTableMap::FREE_TEXT_VALUE, FeatureProductTableMap::POSITION, FeatureProductTableMap::CREATED_AT, FeatureProductTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'PRODUCT_ID', 'FEATURE_ID', 'FEATURE_AV_ID', 'BY_DEFAULT', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'PRODUCT_ID', 'FEATURE_ID', 'FEATURE_AV_ID', 'FREE_TEXT_VALUE', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'product_id', 'feature_id', 'feature_av_id', 'by_default', 'position', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('id', 'product_id', 'feature_id', 'feature_av_id', 'free_text_value', 'position', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -136,11 +136,11 @@ class FeatureProductTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'ProductId' => 1, 'FeatureId' => 2, 'FeatureAvId' => 3, 'ByDefault' => 4, 'Position' => 5, 'CreatedAt' => 6, 'UpdatedAt' => 7, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'ProductId' => 1, 'FeatureId' => 2, 'FeatureAvId' => 3, 'FreeTextValue' => 4, 'Position' => 5, 'CreatedAt' => 6, 'UpdatedAt' => 7, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'productId' => 1, 'featureId' => 2, 'featureAvId' => 3, 'byDefault' => 4, 'position' => 5, 'createdAt' => 6, 'updatedAt' => 7, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'productId' => 1, 'featureId' => 2, 'featureAvId' => 3, 'freeTextValue' => 4, 'position' => 5, 'createdAt' => 6, 'updatedAt' => 7, ),
|
||||||
self::TYPE_COLNAME => array(FeatureProductTableMap::ID => 0, FeatureProductTableMap::PRODUCT_ID => 1, FeatureProductTableMap::FEATURE_ID => 2, FeatureProductTableMap::FEATURE_AV_ID => 3, FeatureProductTableMap::BY_DEFAULT => 4, FeatureProductTableMap::POSITION => 5, FeatureProductTableMap::CREATED_AT => 6, FeatureProductTableMap::UPDATED_AT => 7, ),
|
self::TYPE_COLNAME => array(FeatureProductTableMap::ID => 0, FeatureProductTableMap::PRODUCT_ID => 1, FeatureProductTableMap::FEATURE_ID => 2, FeatureProductTableMap::FEATURE_AV_ID => 3, FeatureProductTableMap::FREE_TEXT_VALUE => 4, FeatureProductTableMap::POSITION => 5, FeatureProductTableMap::CREATED_AT => 6, FeatureProductTableMap::UPDATED_AT => 7, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PRODUCT_ID' => 1, 'FEATURE_ID' => 2, 'FEATURE_AV_ID' => 3, 'BY_DEFAULT' => 4, 'POSITION' => 5, 'CREATED_AT' => 6, 'UPDATED_AT' => 7, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PRODUCT_ID' => 1, 'FEATURE_ID' => 2, 'FEATURE_AV_ID' => 3, 'FREE_TEXT_VALUE' => 4, 'POSITION' => 5, 'CREATED_AT' => 6, 'UPDATED_AT' => 7, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'product_id' => 1, 'feature_id' => 2, 'feature_av_id' => 3, 'by_default' => 4, 'position' => 5, 'created_at' => 6, 'updated_at' => 7, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'product_id' => 1, 'feature_id' => 2, 'feature_av_id' => 3, 'free_text_value' => 4, 'position' => 5, 'created_at' => 6, 'updated_at' => 7, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ class FeatureProductTableMap extends TableMap
|
|||||||
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
|
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
|
||||||
$this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', true, null, null);
|
$this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', true, null, null);
|
||||||
$this->addForeignKey('FEATURE_AV_ID', 'FeatureAvId', 'INTEGER', 'feature_av', 'ID', false, null, null);
|
$this->addForeignKey('FEATURE_AV_ID', 'FeatureAvId', 'INTEGER', 'feature_av', 'ID', false, null, null);
|
||||||
$this->addColumn('BY_DEFAULT', 'ByDefault', 'VARCHAR', false, 255, null);
|
$this->addColumn('FREE_TEXT_VALUE', 'FreeTextValue', 'LONGVARCHAR', false, null, null);
|
||||||
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
|
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
@@ -335,7 +335,7 @@ class FeatureProductTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(FeatureProductTableMap::PRODUCT_ID);
|
$criteria->addSelectColumn(FeatureProductTableMap::PRODUCT_ID);
|
||||||
$criteria->addSelectColumn(FeatureProductTableMap::FEATURE_ID);
|
$criteria->addSelectColumn(FeatureProductTableMap::FEATURE_ID);
|
||||||
$criteria->addSelectColumn(FeatureProductTableMap::FEATURE_AV_ID);
|
$criteria->addSelectColumn(FeatureProductTableMap::FEATURE_AV_ID);
|
||||||
$criteria->addSelectColumn(FeatureProductTableMap::BY_DEFAULT);
|
$criteria->addSelectColumn(FeatureProductTableMap::FREE_TEXT_VALUE);
|
||||||
$criteria->addSelectColumn(FeatureProductTableMap::POSITION);
|
$criteria->addSelectColumn(FeatureProductTableMap::POSITION);
|
||||||
$criteria->addSelectColumn(FeatureProductTableMap::CREATED_AT);
|
$criteria->addSelectColumn(FeatureProductTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(FeatureProductTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(FeatureProductTableMap::UPDATED_AT);
|
||||||
@@ -344,7 +344,7 @@ class FeatureProductTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn($alias . '.PRODUCT_ID');
|
$criteria->addSelectColumn($alias . '.PRODUCT_ID');
|
||||||
$criteria->addSelectColumn($alias . '.FEATURE_ID');
|
$criteria->addSelectColumn($alias . '.FEATURE_ID');
|
||||||
$criteria->addSelectColumn($alias . '.FEATURE_AV_ID');
|
$criteria->addSelectColumn($alias . '.FEATURE_AV_ID');
|
||||||
$criteria->addSelectColumn($alias . '.BY_DEFAULT');
|
$criteria->addSelectColumn($alias . '.FREE_TEXT_VALUE');
|
||||||
$criteria->addSelectColumn($alias . '.POSITION');
|
$criteria->addSelectColumn($alias . '.POSITION');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class OrderProductTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 12;
|
const NUM_COLUMNS = 19;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -67,7 +67,7 @@ class OrderProductTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
*/
|
*/
|
||||||
const NUM_HYDRATE_COLUMNS = 12;
|
const NUM_HYDRATE_COLUMNS = 19;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
@@ -84,20 +84,30 @@ class OrderProductTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
const PRODUCT_REF = 'order_product.PRODUCT_REF';
|
const PRODUCT_REF = 'order_product.PRODUCT_REF';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the PRODUCT_SALE_ELEMENTS_REF field
|
||||||
|
*/
|
||||||
|
const PRODUCT_SALE_ELEMENTS_REF = 'order_product.PRODUCT_SALE_ELEMENTS_REF';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the TITLE field
|
* the column name for the TITLE field
|
||||||
*/
|
*/
|
||||||
const TITLE = 'order_product.TITLE';
|
const TITLE = 'order_product.TITLE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the CHAPO field
|
||||||
|
*/
|
||||||
|
const CHAPO = 'order_product.CHAPO';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the DESCRIPTION field
|
* the column name for the DESCRIPTION field
|
||||||
*/
|
*/
|
||||||
const DESCRIPTION = 'order_product.DESCRIPTION';
|
const DESCRIPTION = 'order_product.DESCRIPTION';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CHAPO field
|
* the column name for the POSTSCRIPTUM field
|
||||||
*/
|
*/
|
||||||
const CHAPO = 'order_product.CHAPO';
|
const POSTSCRIPTUM = 'order_product.POSTSCRIPTUM';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the QUANTITY field
|
* the column name for the QUANTITY field
|
||||||
@@ -110,9 +120,34 @@ class OrderProductTableMap extends TableMap
|
|||||||
const PRICE = 'order_product.PRICE';
|
const PRICE = 'order_product.PRICE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the TAX field
|
* the column name for the PROMO_PRICE field
|
||||||
*/
|
*/
|
||||||
const TAX = 'order_product.TAX';
|
const PROMO_PRICE = 'order_product.PROMO_PRICE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the WAS_NEW field
|
||||||
|
*/
|
||||||
|
const WAS_NEW = 'order_product.WAS_NEW';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the WAS_IN_PROMO field
|
||||||
|
*/
|
||||||
|
const WAS_IN_PROMO = 'order_product.WAS_IN_PROMO';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the WEIGHT field
|
||||||
|
*/
|
||||||
|
const WEIGHT = 'order_product.WEIGHT';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TAX_RULE_TITLE field
|
||||||
|
*/
|
||||||
|
const TAX_RULE_TITLE = 'order_product.TAX_RULE_TITLE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TAX_RULE_DESCRIPTION field
|
||||||
|
*/
|
||||||
|
const TAX_RULE_DESCRIPTION = 'order_product.TAX_RULE_DESCRIPTION';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the PARENT field
|
* the column name for the PARENT field
|
||||||
@@ -141,12 +176,12 @@ class OrderProductTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'OrderId', 'ProductRef', 'Title', 'Description', 'Chapo', 'Quantity', 'Price', 'Tax', 'Parent', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('Id', 'OrderId', 'ProductRef', 'ProductSaleElementsRef', 'Title', 'Chapo', 'Description', 'Postscriptum', 'Quantity', 'Price', 'PromoPrice', 'WasNew', 'WasInPromo', 'Weight', 'TaxRuleTitle', 'TaxRuleDescription', 'Parent', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'productRef', 'title', 'description', 'chapo', 'quantity', 'price', 'tax', 'parent', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'productRef', 'productSaleElementsRef', 'title', 'chapo', 'description', 'postscriptum', 'quantity', 'price', 'promoPrice', 'wasNew', 'wasInPromo', 'weight', 'taxRuleTitle', 'taxRuleDescription', 'parent', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(OrderProductTableMap::ID, OrderProductTableMap::ORDER_ID, OrderProductTableMap::PRODUCT_REF, OrderProductTableMap::TITLE, OrderProductTableMap::DESCRIPTION, OrderProductTableMap::CHAPO, OrderProductTableMap::QUANTITY, OrderProductTableMap::PRICE, OrderProductTableMap::TAX, OrderProductTableMap::PARENT, OrderProductTableMap::CREATED_AT, OrderProductTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(OrderProductTableMap::ID, OrderProductTableMap::ORDER_ID, OrderProductTableMap::PRODUCT_REF, OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF, OrderProductTableMap::TITLE, OrderProductTableMap::CHAPO, OrderProductTableMap::DESCRIPTION, OrderProductTableMap::POSTSCRIPTUM, OrderProductTableMap::QUANTITY, OrderProductTableMap::PRICE, OrderProductTableMap::PROMO_PRICE, OrderProductTableMap::WAS_NEW, OrderProductTableMap::WAS_IN_PROMO, OrderProductTableMap::WEIGHT, OrderProductTableMap::TAX_RULE_TITLE, OrderProductTableMap::TAX_RULE_DESCRIPTION, OrderProductTableMap::PARENT, OrderProductTableMap::CREATED_AT, OrderProductTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'PRODUCT_REF', 'TITLE', 'DESCRIPTION', 'CHAPO', 'QUANTITY', 'PRICE', 'TAX', 'PARENT', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'PRODUCT_REF', 'PRODUCT_SALE_ELEMENTS_REF', 'TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM', 'QUANTITY', 'PRICE', 'PROMO_PRICE', 'WAS_NEW', 'WAS_IN_PROMO', 'WEIGHT', 'TAX_RULE_TITLE', 'TAX_RULE_DESCRIPTION', 'PARENT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'order_id', 'product_ref', 'title', 'description', 'chapo', 'quantity', 'price', 'tax', 'parent', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('id', 'order_id', 'product_ref', 'product_sale_elements_ref', 'title', 'chapo', 'description', 'postscriptum', 'quantity', 'price', 'promo_price', 'was_new', 'was_in_promo', 'weight', 'tax_rule_title', 'tax_rule_description', 'parent', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -156,12 +191,12 @@ class OrderProductTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'ProductRef' => 2, 'Title' => 3, 'Description' => 4, 'Chapo' => 5, 'Quantity' => 6, 'Price' => 7, 'Tax' => 8, 'Parent' => 9, 'CreatedAt' => 10, 'UpdatedAt' => 11, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'ProductRef' => 2, 'ProductSaleElementsRef' => 3, 'Title' => 4, 'Chapo' => 5, 'Description' => 6, 'Postscriptum' => 7, 'Quantity' => 8, 'Price' => 9, 'PromoPrice' => 10, 'WasNew' => 11, 'WasInPromo' => 12, 'Weight' => 13, 'TaxRuleTitle' => 14, 'TaxRuleDescription' => 15, 'Parent' => 16, 'CreatedAt' => 17, 'UpdatedAt' => 18, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'productRef' => 2, 'title' => 3, 'description' => 4, 'chapo' => 5, 'quantity' => 6, 'price' => 7, 'tax' => 8, 'parent' => 9, 'createdAt' => 10, 'updatedAt' => 11, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'productRef' => 2, 'productSaleElementsRef' => 3, 'title' => 4, 'chapo' => 5, 'description' => 6, 'postscriptum' => 7, 'quantity' => 8, 'price' => 9, 'promoPrice' => 10, 'wasNew' => 11, 'wasInPromo' => 12, 'weight' => 13, 'taxRuleTitle' => 14, 'taxRuleDescription' => 15, 'parent' => 16, 'createdAt' => 17, 'updatedAt' => 18, ),
|
||||||
self::TYPE_COLNAME => array(OrderProductTableMap::ID => 0, OrderProductTableMap::ORDER_ID => 1, OrderProductTableMap::PRODUCT_REF => 2, OrderProductTableMap::TITLE => 3, OrderProductTableMap::DESCRIPTION => 4, OrderProductTableMap::CHAPO => 5, OrderProductTableMap::QUANTITY => 6, OrderProductTableMap::PRICE => 7, OrderProductTableMap::TAX => 8, OrderProductTableMap::PARENT => 9, OrderProductTableMap::CREATED_AT => 10, OrderProductTableMap::UPDATED_AT => 11, ),
|
self::TYPE_COLNAME => array(OrderProductTableMap::ID => 0, OrderProductTableMap::ORDER_ID => 1, OrderProductTableMap::PRODUCT_REF => 2, OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF => 3, OrderProductTableMap::TITLE => 4, OrderProductTableMap::CHAPO => 5, OrderProductTableMap::DESCRIPTION => 6, OrderProductTableMap::POSTSCRIPTUM => 7, OrderProductTableMap::QUANTITY => 8, OrderProductTableMap::PRICE => 9, OrderProductTableMap::PROMO_PRICE => 10, OrderProductTableMap::WAS_NEW => 11, OrderProductTableMap::WAS_IN_PROMO => 12, OrderProductTableMap::WEIGHT => 13, OrderProductTableMap::TAX_RULE_TITLE => 14, OrderProductTableMap::TAX_RULE_DESCRIPTION => 15, OrderProductTableMap::PARENT => 16, OrderProductTableMap::CREATED_AT => 17, OrderProductTableMap::UPDATED_AT => 18, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'PRODUCT_REF' => 2, 'TITLE' => 3, 'DESCRIPTION' => 4, 'CHAPO' => 5, 'QUANTITY' => 6, 'PRICE' => 7, 'TAX' => 8, 'PARENT' => 9, 'CREATED_AT' => 10, 'UPDATED_AT' => 11, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'PRODUCT_REF' => 2, 'PRODUCT_SALE_ELEMENTS_REF' => 3, 'TITLE' => 4, 'CHAPO' => 5, 'DESCRIPTION' => 6, 'POSTSCRIPTUM' => 7, 'QUANTITY' => 8, 'PRICE' => 9, 'PROMO_PRICE' => 10, 'WAS_NEW' => 11, 'WAS_IN_PROMO' => 12, 'WEIGHT' => 13, 'TAX_RULE_TITLE' => 14, 'TAX_RULE_DESCRIPTION' => 15, 'PARENT' => 16, 'CREATED_AT' => 17, 'UPDATED_AT' => 18, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'product_ref' => 2, 'title' => 3, 'description' => 4, 'chapo' => 5, 'quantity' => 6, 'price' => 7, 'tax' => 8, 'parent' => 9, 'created_at' => 10, 'updated_at' => 11, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'product_ref' => 2, 'product_sale_elements_ref' => 3, 'title' => 4, 'chapo' => 5, 'description' => 6, 'postscriptum' => 7, 'quantity' => 8, 'price' => 9, 'promo_price' => 10, 'was_new' => 11, 'was_in_promo' => 12, 'weight' => 13, 'tax_rule_title' => 14, 'tax_rule_description' => 15, 'parent' => 16, 'created_at' => 17, 'updated_at' => 18, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -182,13 +217,20 @@ class OrderProductTableMap extends TableMap
|
|||||||
// columns
|
// columns
|
||||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
$this->addForeignKey('ORDER_ID', 'OrderId', 'INTEGER', 'order', 'ID', true, null, null);
|
$this->addForeignKey('ORDER_ID', 'OrderId', 'INTEGER', 'order', 'ID', true, null, null);
|
||||||
$this->addColumn('PRODUCT_REF', 'ProductRef', 'VARCHAR', false, 255, null);
|
$this->addColumn('PRODUCT_REF', 'ProductRef', 'VARCHAR', true, 255, null);
|
||||||
|
$this->addColumn('PRODUCT_SALE_ELEMENTS_REF', 'ProductSaleElementsRef', 'VARCHAR', true, 255, null);
|
||||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
||||||
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
|
|
||||||
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
|
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
|
||||||
|
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||||
|
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
|
||||||
$this->addColumn('QUANTITY', 'Quantity', 'FLOAT', true, null, null);
|
$this->addColumn('QUANTITY', 'Quantity', 'FLOAT', true, null, null);
|
||||||
$this->addColumn('PRICE', 'Price', 'FLOAT', true, null, null);
|
$this->addColumn('PRICE', 'Price', 'FLOAT', true, null, null);
|
||||||
$this->addColumn('TAX', 'Tax', 'FLOAT', false, null, null);
|
$this->addColumn('PROMO_PRICE', 'PromoPrice', 'VARCHAR', false, 45, null);
|
||||||
|
$this->addColumn('WAS_NEW', 'WasNew', 'TINYINT', true, null, null);
|
||||||
|
$this->addColumn('WAS_IN_PROMO', 'WasInPromo', 'TINYINT', true, null, null);
|
||||||
|
$this->addColumn('WEIGHT', 'Weight', 'VARCHAR', false, 45, null);
|
||||||
|
$this->addColumn('TAX_RULE_TITLE', 'TaxRuleTitle', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('TAX_RULE_DESCRIPTION', 'TaxRuleDescription', 'CLOB', false, null, null);
|
||||||
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
|
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
@@ -200,7 +242,8 @@ class OrderProductTableMap extends TableMap
|
|||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::MANY_TO_ONE, array('order_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::MANY_TO_ONE, array('order_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||||
$this->addRelation('OrderFeature', '\\Thelia\\Model\\OrderFeature', RelationMap::ONE_TO_MANY, array('id' => 'order_product_id', ), 'CASCADE', 'RESTRICT', 'OrderFeatures');
|
$this->addRelation('OrderProductAttributeCombination', '\\Thelia\\Model\\OrderProductAttributeCombination', RelationMap::ONE_TO_MANY, array('id' => 'order_product_id', ), 'CASCADE', 'RESTRICT', 'OrderProductAttributeCombinations');
|
||||||
|
$this->addRelation('OrderProductTax', '\\Thelia\\Model\\OrderProductTax', RelationMap::ONE_TO_MANY, array('id' => 'order_product_id', ), 'CASCADE', 'RESTRICT', 'OrderProductTaxes');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -222,7 +265,8 @@ class OrderProductTableMap extends TableMap
|
|||||||
{
|
{
|
||||||
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
||||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||||
OrderFeatureTableMap::clearInstancePool();
|
OrderProductAttributeCombinationTableMap::clearInstancePool();
|
||||||
|
OrderProductTaxTableMap::clearInstancePool();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -366,12 +410,19 @@ class OrderProductTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(OrderProductTableMap::ID);
|
$criteria->addSelectColumn(OrderProductTableMap::ID);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::ORDER_ID);
|
$criteria->addSelectColumn(OrderProductTableMap::ORDER_ID);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::PRODUCT_REF);
|
$criteria->addSelectColumn(OrderProductTableMap::PRODUCT_REF);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::TITLE);
|
$criteria->addSelectColumn(OrderProductTableMap::TITLE);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::DESCRIPTION);
|
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::CHAPO);
|
$criteria->addSelectColumn(OrderProductTableMap::CHAPO);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::DESCRIPTION);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::POSTSCRIPTUM);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::QUANTITY);
|
$criteria->addSelectColumn(OrderProductTableMap::QUANTITY);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::PRICE);
|
$criteria->addSelectColumn(OrderProductTableMap::PRICE);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::TAX);
|
$criteria->addSelectColumn(OrderProductTableMap::PROMO_PRICE);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::WAS_NEW);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::WAS_IN_PROMO);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::WEIGHT);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::TAX_RULE_TITLE);
|
||||||
|
$criteria->addSelectColumn(OrderProductTableMap::TAX_RULE_DESCRIPTION);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::PARENT);
|
$criteria->addSelectColumn(OrderProductTableMap::PARENT);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::CREATED_AT);
|
$criteria->addSelectColumn(OrderProductTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(OrderProductTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(OrderProductTableMap::UPDATED_AT);
|
||||||
@@ -379,12 +430,19 @@ class OrderProductTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.ORDER_ID');
|
$criteria->addSelectColumn($alias . '.ORDER_ID');
|
||||||
$criteria->addSelectColumn($alias . '.PRODUCT_REF');
|
$criteria->addSelectColumn($alias . '.PRODUCT_REF');
|
||||||
|
$criteria->addSelectColumn($alias . '.PRODUCT_SALE_ELEMENTS_REF');
|
||||||
$criteria->addSelectColumn($alias . '.TITLE');
|
$criteria->addSelectColumn($alias . '.TITLE');
|
||||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
|
||||||
$criteria->addSelectColumn($alias . '.CHAPO');
|
$criteria->addSelectColumn($alias . '.CHAPO');
|
||||||
|
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||||
|
$criteria->addSelectColumn($alias . '.POSTSCRIPTUM');
|
||||||
$criteria->addSelectColumn($alias . '.QUANTITY');
|
$criteria->addSelectColumn($alias . '.QUANTITY');
|
||||||
$criteria->addSelectColumn($alias . '.PRICE');
|
$criteria->addSelectColumn($alias . '.PRICE');
|
||||||
$criteria->addSelectColumn($alias . '.TAX');
|
$criteria->addSelectColumn($alias . '.PROMO_PRICE');
|
||||||
|
$criteria->addSelectColumn($alias . '.WAS_NEW');
|
||||||
|
$criteria->addSelectColumn($alias . '.WAS_IN_PROMO');
|
||||||
|
$criteria->addSelectColumn($alias . '.WEIGHT');
|
||||||
|
$criteria->addSelectColumn($alias . '.TAX_RULE_TITLE');
|
||||||
|
$criteria->addSelectColumn($alias . '.TAX_RULE_DESCRIPTION');
|
||||||
$criteria->addSelectColumn($alias . '.PARENT');
|
$criteria->addSelectColumn($alias . '.PARENT');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ class ProductSaleElementsTableMap extends TableMap
|
|||||||
// columns
|
// columns
|
||||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
|
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
|
||||||
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 45, null);
|
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null);
|
||||||
$this->addColumn('QUANTITY', 'Quantity', 'FLOAT', true, null, null);
|
$this->addColumn('QUANTITY', 'Quantity', 'FLOAT', true, null, null);
|
||||||
$this->addColumn('PROMO', 'Promo', 'TINYINT', false, null, 0);
|
$this->addColumn('PROMO', 'Promo', 'TINYINT', false, null, 0);
|
||||||
$this->addColumn('NEWNESS', 'Newness', 'TINYINT', false, null, 0);
|
$this->addColumn('NEWNESS', 'Newness', 'TINYINT', false, null, 0);
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class TaxI18nTableMap extends TableMap
|
|||||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax', 'ID', true, null, null);
|
||||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
||||||
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
|
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class TaxRuleI18nTableMap extends TableMap
|
|||||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax_rule', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax_rule', 'ID', true, null, null);
|
||||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
||||||
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
|
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ try {
|
|||||||
$featureAvId[array_rand($featureAvId, 1)]
|
$featureAvId[array_rand($featureAvId, 1)]
|
||||||
);
|
);
|
||||||
} else { //no av
|
} else { //no av
|
||||||
$featureProduct->setByDefault($faker->text(10));
|
$featureProduct->setFreeTextValue($faker->text(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
$featureProduct->save();
|
$featureProduct->save();
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ CREATE TABLE `product`
|
|||||||
REFERENCES `tax_rule` (`id`)
|
REFERENCES `tax_rule` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE SET NULL,
|
ON DELETE SET NULL,
|
||||||
CONSTRAINT `fk_product_template1`
|
CONSTRAINT `fk_product_template`
|
||||||
FOREIGN KEY (`template_id`)
|
FOREIGN KEY (`template_id`)
|
||||||
REFERENCES `template` (`id`)
|
REFERENCES `template` (`id`)
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
@@ -226,7 +226,7 @@ CREATE TABLE `feature_product`
|
|||||||
`product_id` INTEGER NOT NULL,
|
`product_id` INTEGER NOT NULL,
|
||||||
`feature_id` INTEGER NOT NULL,
|
`feature_id` INTEGER NOT NULL,
|
||||||
`feature_av_id` INTEGER,
|
`feature_av_id` INTEGER,
|
||||||
`by_default` VARCHAR(255),
|
`free_text_value` TEXT,
|
||||||
`position` INTEGER,
|
`position` INTEGER,
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
@@ -325,6 +325,7 @@ CREATE TABLE `attribute_combination`
|
|||||||
`attribute_id` INTEGER NOT NULL,
|
`attribute_id` INTEGER NOT NULL,
|
||||||
`attribute_av_id` INTEGER NOT NULL,
|
`attribute_av_id` INTEGER NOT NULL,
|
||||||
`product_sale_elements_id` INTEGER NOT NULL,
|
`product_sale_elements_id` INTEGER NOT NULL,
|
||||||
|
`is_default` TINYINT(1) DEFAULT 0,
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`attribute_id`,`attribute_av_id`,`product_sale_elements_id`),
|
PRIMARY KEY (`attribute_id`,`attribute_av_id`,`product_sale_elements_id`),
|
||||||
@@ -358,7 +359,7 @@ CREATE TABLE `product_sale_elements`
|
|||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`product_id` INTEGER NOT NULL,
|
`product_id` INTEGER NOT NULL,
|
||||||
`ref` VARCHAR(45) NOT NULL,
|
`ref` VARCHAR(255) NOT NULL,
|
||||||
`quantity` FLOAT NOT NULL,
|
`quantity` FLOAT NOT NULL,
|
||||||
`promo` TINYINT DEFAULT 0,
|
`promo` TINYINT DEFAULT 0,
|
||||||
`newness` TINYINT DEFAULT 0,
|
`newness` TINYINT DEFAULT 0,
|
||||||
@@ -760,14 +761,21 @@ CREATE TABLE `order_product`
|
|||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`order_id` INTEGER NOT NULL,
|
`order_id` INTEGER NOT NULL,
|
||||||
`product_ref` VARCHAR(255),
|
`product_ref` VARCHAR(255) NOT NULL,
|
||||||
|
`product_sale_elements_ref` VARCHAR(255) NOT NULL,
|
||||||
`title` VARCHAR(255),
|
`title` VARCHAR(255),
|
||||||
`description` TEXT,
|
|
||||||
`chapo` TEXT,
|
`chapo` TEXT,
|
||||||
|
`description` LONGTEXT,
|
||||||
|
`postscriptum` TEXT,
|
||||||
`quantity` FLOAT NOT NULL,
|
`quantity` FLOAT NOT NULL,
|
||||||
`price` FLOAT NOT NULL,
|
`price` FLOAT NOT NULL,
|
||||||
`tax` FLOAT,
|
`promo_price` VARCHAR(45),
|
||||||
`parent` INTEGER,
|
`was_new` TINYINT NOT NULL,
|
||||||
|
`was_in_promo` TINYINT NOT NULL,
|
||||||
|
`weight` VARCHAR(45),
|
||||||
|
`tax_rule_title` VARCHAR(255),
|
||||||
|
`tax_rule_description` LONGTEXT,
|
||||||
|
`parent` INTEGER COMMENT 'not managed yet',
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
@@ -796,22 +804,28 @@ CREATE TABLE `order_status`
|
|||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- order_feature
|
-- order_product_attribute_combination
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `order_feature`;
|
DROP TABLE IF EXISTS `order_product_attribute_combination`;
|
||||||
|
|
||||||
CREATE TABLE `order_feature`
|
CREATE TABLE `order_product_attribute_combination`
|
||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`order_product_id` INTEGER NOT NULL,
|
`order_product_id` INTEGER NOT NULL,
|
||||||
`feature_desc` VARCHAR(255),
|
`attribute_title` VARCHAR(255) NOT NULL,
|
||||||
`feature_av_desc` VARCHAR(255),
|
`attribute_chapo` TEXT,
|
||||||
|
`attribute_description` LONGTEXT,
|
||||||
|
`attribute_postscriptumn` TEXT,
|
||||||
|
`attribute_av_title` VARCHAR(255) NOT NULL,
|
||||||
|
`attribute_av_chapo` TEXT,
|
||||||
|
`attribute_av_description` LONGTEXT,
|
||||||
|
`attribute_av_postscriptum` TEXT,
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
INDEX `idx_order_feature_order_product_id` (`order_product_id`),
|
INDEX `idx_order_product_attribute_combination_order_product_id` (`order_product_id`),
|
||||||
CONSTRAINT `fk_order_feature_order_product_id`
|
CONSTRAINT `fk_order_product_attribute_combination_order_product_id`
|
||||||
FOREIGN KEY (`order_product_id`)
|
FOREIGN KEY (`order_product_id`)
|
||||||
REFERENCES `order_product` (`id`)
|
REFERENCES `order_product` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
@@ -1560,6 +1574,30 @@ CREATE TABLE `module_image`
|
|||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- order_product_tax
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `order_product_tax`;
|
||||||
|
|
||||||
|
CREATE TABLE `order_product_tax`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`order_product_id` INTEGER NOT NULL,
|
||||||
|
`title` VARCHAR(255) NOT NULL,
|
||||||
|
`description` LONGTEXT,
|
||||||
|
`amount` FLOAT NOT NULL,
|
||||||
|
`created_at` DATETIME,
|
||||||
|
`updated_at` DATETIME,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
INDEX `idx_ order_product_tax_order_product_id` (`order_product_id`),
|
||||||
|
CONSTRAINT `fk_ order_product_tax_order_product_id0`
|
||||||
|
FOREIGN KEY (`order_product_id`)
|
||||||
|
REFERENCES `order_product` (`id`)
|
||||||
|
ON UPDATE RESTRICT
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- category_i18n
|
-- category_i18n
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
@@ -1634,7 +1672,7 @@ CREATE TABLE `tax_i18n`
|
|||||||
`id` INTEGER NOT NULL,
|
`id` INTEGER NOT NULL,
|
||||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
`title` VARCHAR(255),
|
`title` VARCHAR(255),
|
||||||
`description` TEXT,
|
`description` LONGTEXT,
|
||||||
PRIMARY KEY (`id`,`locale`),
|
PRIMARY KEY (`id`,`locale`),
|
||||||
CONSTRAINT `tax_i18n_FK_1`
|
CONSTRAINT `tax_i18n_FK_1`
|
||||||
FOREIGN KEY (`id`)
|
FOREIGN KEY (`id`)
|
||||||
@@ -1653,7 +1691,7 @@ CREATE TABLE `tax_rule_i18n`
|
|||||||
`id` INTEGER NOT NULL,
|
`id` INTEGER NOT NULL,
|
||||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
`title` VARCHAR(255),
|
`title` VARCHAR(255),
|
||||||
`description` TEXT,
|
`description` LONGTEXT,
|
||||||
PRIMARY KEY (`id`,`locale`),
|
PRIMARY KEY (`id`,`locale`),
|
||||||
CONSTRAINT `tax_rule_i18n_FK_1`
|
CONSTRAINT `tax_rule_i18n_FK_1`
|
||||||
FOREIGN KEY (`id`)
|
FOREIGN KEY (`id`)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select required="required" name="attribute_id" id="attribute_id" class="form-control">
|
<select required="required" name="attribute_id" id="attribute_id" class="form-control">
|
||||||
<option value="">Select an attribute...</option>
|
<option value="">{intl l='Select an attribute...'}</option>
|
||||||
{loop name="free_attributes" type="attribute" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
{loop name="free_attributes" type="attribute" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||||
<option value="{$ID}">{$TITLE}</option>
|
<option value="{$ID}">{$TITLE}</option>
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select required="required" name="feature_id" id="feature_id" class="form-control">
|
<select required="required" name="feature_id" id="feature_id" class="form-control">
|
||||||
<option value="">Select an feature...</option>
|
<option value="">{intl l='Select an feature...'}</option>
|
||||||
{loop name="free_features" type="feature" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
{loop name="free_features" type="feature" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||||
<option value="{$ID}">{$TITLE}</option>
|
<option value="{$ID}">{$TITLE}</option>
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<select name="folder_id" id="folder_id" class="form-control">
|
<select name="folder_id" id="folder_id" class="form-control">
|
||||||
<option value="">Select a folder...</option>
|
<option value="">{intl l='Select a folder...'}</option>
|
||||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
||||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||||
{/loop}
|
{/loop}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
<div id="content_selector" class="hide">
|
<div id="content_selector" class="hide">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select required="required" name="content_id" id="content_id" class="form-control">
|
<select required="required" name="content_id" id="content_id" class="form-control">
|
||||||
<option value="">Select a folder content...</option>
|
<option value="">{intl l='Select a folder content...'}</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="input-group-btn" id="content_add_button">
|
<span class="input-group-btn" id="content_add_button">
|
||||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{extends file="admin-layout.tpl"}
|
{extends file="admin-layout.tpl"}
|
||||||
|
|
||||||
{block name="page-title"}{intl l='Edit an feature'}{/block}
|
{block name="page-title"}{intl l='Edit a feature'}{/block}
|
||||||
|
|
||||||
{block name="check-permissions"}admin.configuration.features.edit{/block}
|
{block name="check-permissions"}admin.configuration.features.edit{/block}
|
||||||
|
|
||||||
@@ -75,9 +75,9 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
{intl l="Enter here all possible feature values."}
|
{intl l="Enter here all possible feature values. To get a free text feature in product forms, don't add any value."}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-condensed table-left-aligned">
|
<table class="table table-striped table-condensed table-left-aligned">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
|
{loop name="list" type="feature-availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$ID}</td>
|
<td>{$ID}</td>
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<select name="folder_id" id="folder_id" class="form-control">
|
<select name="folder_id" id="folder_id" class="form-control">
|
||||||
<option value="">Select a folder...</option>
|
<option value="">{intl l='Select a folder...'}</option>
|
||||||
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
|
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
|
||||||
<option value="{$ID}">{$TITLE}</option>
|
<option value="{$ID}">{$TITLE}</option>
|
||||||
{/loop}
|
{/loop}
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
<div id="content_selector" class="hide">
|
<div id="content_selector" class="hide">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select required="required" name="content_id" id="content_id" class="form-control">
|
<select required="required" name="content_id" id="content_id" class="form-control">
|
||||||
<option value="">Select a folder content...</option>
|
<option value="">{intl l='Select a folder content...'}</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="input-group-btn" id="content_add_button">
|
<span class="input-group-btn" id="content_add_button">
|
||||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">
|
<label for="{$label_attr.for}" class="control-label">
|
||||||
{intl l="{$label}"} :
|
{intl l="{$label}"} :
|
||||||
<span class="label-help-block">{intl l="The détailed description."}</span>
|
<span class="label-help-block">{intl l="The detailed description."}</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control wysiwyg">{$value}</textarea>
|
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control wysiwyg">{$value}</textarea>
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
|
|
||||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||||
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
||||||
<li {if $current_tab == 'details'}class="active"{/if}><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
|
<li {if $current_tab == 'attributes'}class="active"{/if}><a href="#attributes" data-toggle="tab">{intl l="Attributes & Features"}</a></li>
|
||||||
|
<li {if $current_tab == 'content'}class="active"{/if}><a href="#content" data-toggle="tab">{intl l="Content & accessories"}</a></li>
|
||||||
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
||||||
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
||||||
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||||
@@ -51,333 +52,20 @@
|
|||||||
|
|
||||||
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
|
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
|
||||||
|
|
||||||
<div class="form-container">
|
{include file="includes/product-general-tab.html"}
|
||||||
|
|
||||||
{form name="thelia.admin.product.modification"}
|
|
||||||
<form method="POST" action="{url path='/admin/products/save'}" {form_enctype form=$form} class="clearfix">
|
|
||||||
|
|
||||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/products' product_id=$product_id}"}
|
|
||||||
|
|
||||||
{* Be sure to get the product ID, even if the form could not be validated *}
|
|
||||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
|
||||||
|
|
||||||
<input type="hidden" name="current_tab" value="general" />
|
|
||||||
|
|
||||||
{form_hidden_fields form=$form}
|
|
||||||
|
|
||||||
{form_field form=$form field='success_url'}
|
|
||||||
<input type="hidden" name="{$name}" value="{url path='/admin/product' product_id={$product_d}}" />
|
|
||||||
{/form_field}
|
|
||||||
|
|
||||||
{form_field form=$form field='locale'}
|
|
||||||
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
|
|
||||||
{/form_field}
|
|
||||||
|
|
||||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="product_ref" class="control-label">
|
|
||||||
{intl l='Product reference'} :
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<div class="well well-sm">{$REF}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{include file="includes/standard-description-form-fields.html"}
|
|
||||||
|
|
||||||
{form_field form=$form field='url'}
|
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
|
||||||
<label for="{$label_attr.for}" class="control-label">
|
|
||||||
{intl l="{$label}"} :
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
|
|
||||||
</div>
|
|
||||||
{/form_field}
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
{form_field form=$form field='default_category'}
|
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
|
||||||
|
|
||||||
<label for="{$label_attr.for}" class="control-label">
|
|
||||||
{intl l="{$label}"} :
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
|
||||||
<option value="0">{intl l="Top level"}</option>
|
|
||||||
|
|
||||||
{loop name="cat-parent" type="category-tree" category="0" visible="*" product="0"}
|
|
||||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_CATEGORY == $ID}selected="selected"{/if} {if $product_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
|
|
||||||
{/loop}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
<span class="help-block">{intl l='You can attach this product to more categories in the details tab.'}</span>
|
|
||||||
</div>
|
|
||||||
{/form_field}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
{form_field form=$form field='visible'}
|
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
|
||||||
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
|
|
||||||
<div class="checkbox">
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
|
||||||
{$label}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/form_field}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="control-group">
|
|
||||||
<lablel> </lablel>
|
|
||||||
<div class="controls">
|
|
||||||
<p>{intl l='Product created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
{/form}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade {if $current_tab == 'details'}active in{/if}" id="details">
|
<div class="tab-pane fade {if $current_tab == 'attributes'}active in{/if}" id="attributes">
|
||||||
<div class="form-container">
|
|
||||||
|
|
||||||
{include
|
{include file="includes/product-attributes-tab.html"}
|
||||||
file="includes/inner-form-toolbar.html"
|
|
||||||
hide_submit_buttons=true
|
|
||||||
close_url="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
|
||||||
}
|
|
||||||
|
|
||||||
{* -- Begin related content management -- *}
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="tab-pane fade {if $current_tab == 'content'}active in{/if}" id="content">
|
||||||
<div class="form-group">
|
|
||||||
<form action="{url path='/admin/products/related-content/add'}" id="related_content_form">
|
|
||||||
|
|
||||||
<p class="title title-without-tabs">{intl l='Related content'}</p>
|
{include file="includes/product-content-tab.html"}
|
||||||
<p>{intl l='You can attach here some content to this product'}</p>
|
|
||||||
|
|
||||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
|
||||||
<input type="hidden" name="current_tab" value="details" />
|
|
||||||
|
|
||||||
{ifloop rel="folders"}
|
|
||||||
<div class="form-group">
|
|
||||||
<select name="folder_id" id="folder_id" class="form-control">
|
|
||||||
<option value="">Select a folder...</option>
|
|
||||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
|
||||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
|
||||||
{/loop}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<span class="help-block">{intl l='Select a folder to get its content'}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content_selector" class="hide">
|
|
||||||
<div class="input-group">
|
|
||||||
<select required="required" name="content_id" id="content_id" class="form-control">
|
|
||||||
<option value="">Select a folder content...</option>
|
|
||||||
</select>
|
|
||||||
<span class="input-group-btn" id="content_add_button">
|
|
||||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span class="help-block">{intl l='Select a content and click (+) to add it to this product'}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content_selector_empty" class="hide">
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="No available content for this folder"}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/ifloop}
|
|
||||||
|
|
||||||
{elseloop rel="folders"}
|
|
||||||
<div class="alert alert-info">{intl l="No folders found"}</div>
|
|
||||||
{/elseloop}
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class="table table-striped table-condensed table-left-aligned">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{intl l='ID'}</th>
|
|
||||||
|
|
||||||
<th>{intl l='Content title'}</th>
|
|
||||||
|
|
||||||
{module_include location='product_contents_table_header'}
|
|
||||||
|
|
||||||
<th class="actions">{intl l="Actions"}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
{loop name="assigned_contents" type="associated_content" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
|
||||||
<tr>
|
|
||||||
<td>{$ID}</td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
{$TITLE}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
{module_include location='product_contents_table_row'}
|
|
||||||
|
|
||||||
<td class="actions">
|
|
||||||
<div class="btn-group">
|
|
||||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.content.delete"}
|
|
||||||
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
|
|
||||||
<span class="glyphicon glyphicon-trash"></span>
|
|
||||||
</a>
|
|
||||||
{/loop}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/loop}
|
|
||||||
|
|
||||||
{elseloop rel="assigned_contents"}
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="This product contains no contents"}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/elseloop}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{* -- End related content management ---- *}
|
|
||||||
|
|
||||||
{* -- Begin accessories management ------ *}
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<form action="{url path='/admin/products/accessory/add'}" id="accessory_form">
|
|
||||||
|
|
||||||
<p class="title title-without-tabs">{intl l='Product accessories'}</p>
|
|
||||||
<p>{intl l='Define here this product\'s accessories'}</p>
|
|
||||||
|
|
||||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
|
||||||
<input type="hidden" name="current_tab" value="details" />
|
|
||||||
|
|
||||||
{ifloop rel="categories"}
|
|
||||||
<div class="form-group">
|
|
||||||
<select name="accessory_category_id" id="accessory_category_id" class="form-control">
|
|
||||||
<option value="">Select a category...</option>
|
|
||||||
{loop name="categories" type="category-tree" category="0" backend_context="1" lang="$edit_language_id"}
|
|
||||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
|
||||||
{/loop}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<span class="help-block">{intl l='Select a category to get its products'}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="accessory_selector" class="hide">
|
|
||||||
<div class="input-group">
|
|
||||||
<select required="required" name="accessory_id" id="accessory_id" class="form-control">
|
|
||||||
<option value="">Select a product...</option>
|
|
||||||
</select>
|
|
||||||
<span class="input-group-btn" id="accessory_add_button">
|
|
||||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span class="help-block">{intl l='Select a product and click (+) to add it as an accessory'}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="accessory_selector_empty" class="hide">
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="No available product in this category"}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/ifloop}
|
|
||||||
|
|
||||||
{elseloop rel="categories"}
|
|
||||||
<div class="alert alert-info">{intl l="No categories found"}</div>
|
|
||||||
{/elseloop}
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class="table table-striped table-condensed table-left-aligned">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{intl l='ID'}</th>
|
|
||||||
|
|
||||||
<th>{intl l='Accessory title'}</th>
|
|
||||||
|
|
||||||
<th class="text-center">{intl l='Position'}</th>
|
|
||||||
|
|
||||||
{module_include location='product_accessories_table_header'}
|
|
||||||
|
|
||||||
<th class="actions">{intl l="Actions"}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
{loop name="assigned_accessories" order="accessory" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
|
||||||
<tr>
|
|
||||||
<td>{$ID}</td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
{$TITLE}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="text-center">
|
|
||||||
{admin_position_block
|
|
||||||
permission="admin.products.edit"
|
|
||||||
path={url path='/admin/products/update-accessory-position' product_id=$ID}
|
|
||||||
url_parameter="accessory_id"
|
|
||||||
in_place_edit_class="accessoryPositionChange"
|
|
||||||
position=$POSITION
|
|
||||||
id=$ID
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
{module_include location='product_accessories_table_row'}
|
|
||||||
|
|
||||||
<td class="actions">
|
|
||||||
<div class="btn-group">
|
|
||||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.accessory.delete"}
|
|
||||||
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ID}" data-toggle="modal">
|
|
||||||
<span class="glyphicon glyphicon-trash"></span>
|
|
||||||
</a>
|
|
||||||
{/loop}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/loop}
|
|
||||||
|
|
||||||
{elseloop rel="assigned_accessories"}
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="This product contains no accessories"}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/elseloop}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{* -- End accessories management -------- *}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
|
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
|
||||||
@@ -397,48 +85,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{* Delete related content confirmation dialog *}
|
|
||||||
|
|
||||||
{capture "delete_content_dialog"}
|
|
||||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
|
||||||
<input type="hidden" name="content_id" id="content_delete_id" value="" />
|
|
||||||
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
|
|
||||||
|
|
||||||
<input type="hidden" name="current_tab" value="details" />
|
|
||||||
{/capture}
|
|
||||||
|
|
||||||
{include
|
|
||||||
file = "includes/generic-confirm-dialog.html"
|
|
||||||
|
|
||||||
dialog_id = "delete_content_dialog"
|
|
||||||
dialog_title = {intl l="Remove related content"}
|
|
||||||
dialog_message = {intl l="Do you really want to remove this related content from the product ?"}
|
|
||||||
|
|
||||||
form_action = {url path='/admin/products/related-content/delete'}
|
|
||||||
form_content = {$smarty.capture.delete_content_dialog nofilter}
|
|
||||||
}
|
|
||||||
|
|
||||||
{* Delete accessory confirmation dialog *}
|
|
||||||
|
|
||||||
{capture "delete_accessory_dialog"}
|
|
||||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
|
||||||
<input type="hidden" name="accessory_id" id="accessory_delete_id" value="" />
|
|
||||||
<input type="hidden" name="accessory_category_id" id="accessory_category_delete_id" value="" />
|
|
||||||
|
|
||||||
<input type="hidden" name="current_tab" value="details" />
|
|
||||||
{/capture}
|
|
||||||
|
|
||||||
{include
|
|
||||||
file = "includes/generic-confirm-dialog.html"
|
|
||||||
|
|
||||||
dialog_id = "delete_accessory_dialog"
|
|
||||||
dialog_title = {intl l="Remove an accessory"}
|
|
||||||
dialog_message = {intl l="Do you really want to remove this accessory from the product ?"}
|
|
||||||
|
|
||||||
form_action = {url path='/admin/products/accessory/delete'}
|
|
||||||
form_content = {$smarty.capture.delete_accessory_dialog nofilter}
|
|
||||||
}
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="javascript-initialization"}
|
{block name="javascript-initialization"}
|
||||||
@@ -594,6 +240,13 @@ $(function() {
|
|||||||
{if $accessory_category_id != 0}
|
{if $accessory_category_id != 0}
|
||||||
$('#accessory_category_id').val("{$accessory_category_id}").change();
|
$('#accessory_category_id').val("{$accessory_category_id}").change();
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
// Unselect all options in attribute + feature tab
|
||||||
|
$('.clear_feature_value').click(function(event){
|
||||||
|
$('#feature_value_' + $(this).data('id') + ' option').prop('selected', false);
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
Reference in New Issue
Block a user