Working catalog branch
This commit is contained in:
@@ -170,8 +170,8 @@ final class TheliaEvents
|
||||
const BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT = "action.before_createCategoryAssociatedContent";
|
||||
const AFTER_CREATECATEGORY_ASSOCIATED_CONTENT = "action.after_createCategoryAssociatedContent";
|
||||
|
||||
const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContenty";
|
||||
const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
|
||||
const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContent";
|
||||
const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteCategoryAssociatedContent";
|
||||
|
||||
const BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.before_updateCategoryAssociatedContent";
|
||||
const AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.after_updateCategoryAssociatedContent";
|
||||
@@ -191,6 +191,9 @@ final class TheliaEvents
|
||||
const PRODUCT_REMOVE_ACCESSORY = "action.productRemoveAccessory";
|
||||
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 AFTER_CREATEPRODUCT = "action.after_createproduct";
|
||||
|
||||
@@ -211,17 +214,28 @@ final class TheliaEvents
|
||||
const BEFORE_UPDATEACCESSORY = "action.before_updateAccessory";
|
||||
const AFTER_UPDATEACCESSORY = "action.after_updateAccessory";
|
||||
|
||||
// -- Product Associated Content --------------------------------------------------
|
||||
// -- Product Associated Content -------------------------------------------
|
||||
|
||||
const BEFORE_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.before_createProductAssociatedContent";
|
||||
const AFTER_CREATEPRODUCT_ASSOCIATED_CONTENT = "action.after_createProductAssociatedContent";
|
||||
|
||||
const BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.before_deleteProductAssociatedContenty";
|
||||
const AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.after_deleteproduct_accessory";
|
||||
const BEFORE_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.before_deleteProductAssociatedContent";
|
||||
const AFTER_DELETEPRODUCT_ASSOCIATED_CONTENT = "action.after_deleteProductAssociatedContent";
|
||||
|
||||
const BEFORE_UPDATEPRODUCT_ASSOCIATED_CONTENT = "action.before_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
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ class FeatureValue extends BaseI18nLoop
|
||||
Argument::createIntTypeArgument('product', null, true),
|
||||
Argument::createIntListTypeArgument('feature_availability'),
|
||||
Argument::createBooleanTypeArgument('exclude_feature_availability', 0),
|
||||
Argument::createBooleanTypeArgument('exclude_personal_values', 0),
|
||||
Argument::createBooleanTypeArgument('exclude_free_text', 0),
|
||||
new Argument(
|
||||
'order',
|
||||
new TypeCollection(
|
||||
@@ -79,14 +79,14 @@ class FeatureValue extends BaseI18nLoop
|
||||
{
|
||||
$search = FeatureProductQuery::create();
|
||||
|
||||
/* manage featureAv translations */
|
||||
$locale = $this->configureI18nProcessing(
|
||||
$search,
|
||||
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
||||
FeatureAvTableMap::TABLE_NAME,
|
||||
'FEATURE_AV_ID',
|
||||
true
|
||||
);
|
||||
// manage featureAv translations
|
||||
$locale = $this->configureI18nProcessing(
|
||||
$search,
|
||||
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
||||
FeatureAvTableMap::TABLE_NAME,
|
||||
'FEATURE_AV_ID',
|
||||
true
|
||||
);
|
||||
|
||||
$feature = $this->getFeature();
|
||||
|
||||
@@ -103,13 +103,9 @@ class FeatureValue extends BaseI18nLoop
|
||||
}
|
||||
|
||||
$excludeFeatureAvailability = $this->getExclude_feature_availability();
|
||||
if ($excludeFeatureAvailability == true) {
|
||||
$search->filterByFeatureAvId(null, Criteria::NULL);
|
||||
}
|
||||
|
||||
$excludeDefaultValues = $this->getExclude_personal_values();
|
||||
if ($excludeDefaultValues == true) {
|
||||
$search->filterByByDefault(null, Criteria::NULL);
|
||||
if ($excludeFeatureAvailability == true) {
|
||||
$search->filterByFeatureAvId(null, Criteria::ISNULL);
|
||||
}
|
||||
|
||||
$orders = $this->getOrder();
|
||||
@@ -137,16 +133,24 @@ class FeatureValue extends BaseI18nLoop
|
||||
|
||||
foreach ($featureValues as $featureValue) {
|
||||
$loopResultRow = new LoopResultRow($loopResult, $featureValue, $this->versionable, $this->timestampable, $this->countable);
|
||||
$loopResultRow->set("ID", $featureValue->getId());
|
||||
|
||||
$loopResultRow
|
||||
->set("LOCALE",$locale)
|
||||
->set("PERSONAL_VALUE", $featureValue->getByDefault())
|
||||
->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());
|
||||
->set("ID" , $featureValue->getId())
|
||||
->set("PRODUCT" , $featureValue->getProductId())
|
||||
->set("FEATURE_AV_ID" , $featureValue->getFeatureAvId())
|
||||
->set("FREE_TEXT_VALUE" , $featureValue->getFreeTextValue())
|
||||
|
||||
->set("IS_FREE_TEXT" , is_null($featureValue->getFeatureAvId()) ? 1 : 0)
|
||||
->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);
|
||||
}
|
||||
|
||||
@@ -650,6 +650,7 @@ class Product extends BaseI18nLoop
|
||||
->set("IS_NEW" , $product->getVirtualColumn('main_product_is_new'))
|
||||
->set("POSITION" , $product->getPosition())
|
||||
->set("VISIBLE" , $product->getVisible() ? "1" : "0")
|
||||
->set("TEMPLATE" , $product->getTemplateId())
|
||||
->set("HAS_PREVIOUS" , $previous != null ? 1 : 0)
|
||||
->set("HAS_NEXT" , $next != null ? 1 : 0)
|
||||
->set("PREVIOUS" , $previous != null ? $previous->getId() : -1)
|
||||
|
||||
Reference in New Issue
Block a user