Merge branch 'master' of github.com:thelia/thelia
This commit is contained in:
@@ -42,6 +42,14 @@ use Thelia\Core\Event\TemplateEvent;
|
||||
use Thelia\Model\TemplateTemplate;
|
||||
use Thelia\Model\TemplateTemplateQuery;
|
||||
use Thelia\Model\ProductQuery;
|
||||
use Thelia\Core\Event\TemplateAddAttributeEvent;
|
||||
use Thelia\Core\Event\TemplateDeleteAttributeEvent;
|
||||
use Thelia\Model\AttributeTemplateQuery;
|
||||
use Thelia\Model\AttributeTemplate;
|
||||
use Thelia\Core\Event\TemplateDeleteFeatureEvent;
|
||||
use Thelia\Core\Event\TemplateAddFeatureEvent;
|
||||
use Thelia\Model\FeatureTemplateQuery;
|
||||
use Thelia\Model\FeatureTemplate;
|
||||
|
||||
class Template extends BaseAction implements EventSubscriberInterface
|
||||
{
|
||||
@@ -113,6 +121,54 @@ class Template extends BaseAction implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function addAttribute(TemplateAddAttributeEvent $event) {
|
||||
|
||||
if (null === AttributeTemplateQuery::create()->filterByAttributeId($event->getAttributeId())->filterByTemplate($event->getTemplate())->findOne()) {
|
||||
|
||||
$attribute_template = new AttributeTemplate();
|
||||
|
||||
$attribute_template
|
||||
->setAttributeId($event->getAttributeId())
|
||||
->setTemplate($event->getTemplate())
|
||||
->save()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteAttribute(TemplateDeleteAttributeEvent $event) {
|
||||
|
||||
$attribute_template = AttributeTemplateQuery::create()
|
||||
->filterByAttributeId($event->getAttributeId())
|
||||
->filterByTemplate($event->getTemplate())->findOne()
|
||||
;
|
||||
|
||||
if ($attribute_template !== null) $attribute_template->delete();
|
||||
}
|
||||
|
||||
public function addFeature(TemplateAddFeatureEvent $event) {
|
||||
|
||||
if (null === FeatureTemplateQuery::create()->filterByFeatureId($event->getFeatureId())->filterByTemplate($event->getTemplate())->findOne()) {
|
||||
|
||||
$feature_template = new FeatureTemplate();
|
||||
|
||||
$feature_template
|
||||
->setFeatureId($event->getFeatureId())
|
||||
->setTemplate($event->getTemplate())
|
||||
->save()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteFeature(TemplateDeleteFeatureEvent $event) {
|
||||
|
||||
$feature_template = FeatureTemplateQuery::create()
|
||||
->filterByFeatureId($event->getFeatureId())
|
||||
->filterByTemplate($event->getTemplate())->findOne()
|
||||
;
|
||||
|
||||
if ($feature_template !== null) $feature_template->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@@ -122,6 +178,13 @@ class Template extends BaseAction implements EventSubscriberInterface
|
||||
TheliaEvents::TEMPLATE_CREATE => array("create", 128),
|
||||
TheliaEvents::TEMPLATE_UPDATE => array("update", 128),
|
||||
TheliaEvents::TEMPLATE_DELETE => array("delete", 128),
|
||||
|
||||
TheliaEvents::TEMPLATE_ADD_ATTRIBUTE => array("addAttribute", 128),
|
||||
TheliaEvents::TEMPLATE_DELETE_ATTRIBUTE => array("deleteAttribute", 128),
|
||||
|
||||
TheliaEvents::TEMPLATE_ADD_FEATURE => array("addFeature", 128),
|
||||
TheliaEvents::TEMPLATE_DELETE_FEATURE => array("deleteFeature", 128),
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,9 @@
|
||||
<form name="thelia.admin.template.creation" class="Thelia\Form\TemplateCreationForm"/>
|
||||
<form name="thelia.admin.template.modification" class="Thelia\Form\TemplateModificationForm"/>
|
||||
|
||||
<form name="thelia.admin.country.creation" class="Thelia\Form\CountryCreationForm"/>
|
||||
<form name="thelia.admin.country.modification" class="Thelia\Form\CountryModificationForm"/>
|
||||
|
||||
</forms>
|
||||
|
||||
|
||||
|
||||
@@ -234,6 +234,30 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\TemplateController::deleteAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.templates.features.list" path="/admin/configuration/templates/features/list">
|
||||
<default key="_controller">Thelia\Controller\Admin\TemplateController::getAjaxFeaturesAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.templates.features.add" path="/admin/configuration/templates/features/add">
|
||||
<default key="_controller">Thelia\Controller\Admin\TemplateController::addFeatureAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.templates.features.delete" path="/admin/configuration/templates/features/delete">
|
||||
<default key="_controller">Thelia\Controller\Admin\TemplateController::deleteFeatureAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.templates.attributes.list" path="/admin/configuration/templates/attributes/list">
|
||||
<default key="_controller">Thelia\Controller\Admin\TemplateController::getAjaxAttributesAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.templates.attributes.add" path="/admin/configuration/templates/attributes/add">
|
||||
<default key="_controller">Thelia\Controller\Admin\TemplateController::addAttributeAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.templates.attributes.delete" path="/admin/configuration/templates/attributes/delete">
|
||||
<default key="_controller">Thelia\Controller\Admin\TemplateController::deleteAttributeAction</default>
|
||||
</route>
|
||||
|
||||
|
||||
<!-- attribute and attributes value management -->
|
||||
|
||||
@@ -292,6 +316,23 @@
|
||||
|
||||
<!-- end attribute and feature routes management -->
|
||||
|
||||
<!-- Countries routes management -->
|
||||
|
||||
<route id="admin.configuration.countries.default" path="/admin/configuration/countries">
|
||||
<default key="_controller">Thelia\Controller\Admin\CountryController::indexAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.countries.create" path="/admin/configuration/countries/create">
|
||||
<default key="_controller">Thelia\Controller\Admin\CountryController::createAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.countries.update.view" path="/admin/configuration/countries/update/{country_id}" methods="get">
|
||||
<default key="_controller">Thelia\Controller\Admin\CountryController::updateAction</default>
|
||||
<requirement key="country_id">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<!-- end countries routes management -->
|
||||
|
||||
<!-- feature and features value management -->
|
||||
|
||||
<route id="admin.configuration.features.default" path="/admin/configuration/features">
|
||||
|
||||
52
core/lib/Thelia/Controller/Admin/CountryController.php
Normal file
52
core/lib/Thelia/Controller/Admin/CountryController.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
|
||||
/**
|
||||
* Class CustomerController
|
||||
* @package Thelia\Controller\Admin
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class CountryController extends BaseAdminController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
if (null !== $response = $this->checkAuth("admin.country.view")) return $response;
|
||||
return $this->render("countries", array("display_country" => 20));
|
||||
}
|
||||
|
||||
/**
|
||||
* update country action
|
||||
*
|
||||
* @param $country_id
|
||||
* @return mixed|\Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function updateAction($country_id)
|
||||
{
|
||||
return $this->render("country-edit", array(
|
||||
"country_id" => $country_id
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,6 +35,10 @@ use Thelia\Model\TemplateAv;
|
||||
use Thelia\Model\TemplateAvQuery;
|
||||
use Thelia\Core\Event\TemplateAvUpdateEvent;
|
||||
use Thelia\Core\Event\TemplateEvent;
|
||||
use Thelia\Core\Event\TemplateDeleteAttributeEvent;
|
||||
use Thelia\Core\Event\TemplateAddAttributeEvent;
|
||||
use Thelia\Core\Event\TemplateAddFeatureEvent;
|
||||
use Thelia\Core\Event\TemplateDeleteFeatureEvent;
|
||||
|
||||
/**
|
||||
* Manages templates sent by mail
|
||||
@@ -193,4 +197,106 @@ class TemplateController extends AbstractCrudController
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getAjaxFeaturesAction() {
|
||||
return $this->render(
|
||||
'ajax/template-feature-list',
|
||||
array('template_id' => $this->getRequest()->get('template_id'))
|
||||
);
|
||||
}
|
||||
|
||||
public function getAjaxAttributesAction() {
|
||||
return $this->render(
|
||||
'ajax/template-attribute-list',
|
||||
array('template_id' => $this->getRequest()->get('template_id'))
|
||||
);
|
||||
}
|
||||
|
||||
public function addAttributeAction() {
|
||||
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth("admin.configuration.template.attribute.add")) return $response;
|
||||
|
||||
$attribute_id = intval($this->getRequest()->get('attribute_id'));
|
||||
|
||||
if ($attribute_id > 0) {
|
||||
$event = new TemplateAddAttributeEvent(
|
||||
$this->getExistingObject(),
|
||||
$attribute_id
|
||||
);
|
||||
|
||||
try {
|
||||
$this->dispatch(TheliaEvents::TEMPLATE_ADD_ATTRIBUTE, $event);
|
||||
} catch (\Exception $ex) {
|
||||
// Any error
|
||||
return $this->errorPage($ex);
|
||||
}
|
||||
}
|
||||
|
||||
$this->redirectToEditionTemplate();
|
||||
}
|
||||
|
||||
public function deleteAttributeAction() {
|
||||
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth("admin.configuration.template.attribute.delete")) return $response;
|
||||
|
||||
$event = new TemplateDeleteAttributeEvent(
|
||||
$this->getExistingObject(),
|
||||
intval($this->getRequest()->get('attribute_id'))
|
||||
);
|
||||
|
||||
try {
|
||||
$this->dispatch(TheliaEvents::TEMPLATE_DELETE_ATTRIBUTE, $event);
|
||||
} catch (\Exception $ex) {
|
||||
// Any error
|
||||
return $this->errorPage($ex);
|
||||
}
|
||||
|
||||
$this->redirectToEditionTemplate();
|
||||
}
|
||||
|
||||
public function addFeatureAction() {
|
||||
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth("admin.configuration.template.feature.add")) return $response;
|
||||
|
||||
$feature_id = intval($this->getRequest()->get('feature_id'));
|
||||
|
||||
if ($feature_id > 0) {
|
||||
$event = new TemplateAddFeatureEvent(
|
||||
$this->getExistingObject(),
|
||||
$feature_id
|
||||
);
|
||||
|
||||
try {
|
||||
$this->dispatch(TheliaEvents::TEMPLATE_ADD_FEATURE, $event);
|
||||
} catch (\Exception $ex) {
|
||||
// Any error
|
||||
return $this->errorPage($ex);
|
||||
}
|
||||
}
|
||||
|
||||
$this->redirectToEditionTemplate();
|
||||
}
|
||||
|
||||
public function deleteFeatureAction() {
|
||||
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth("admin.configuration.template.feature.delete")) return $response;
|
||||
|
||||
$event = new TemplateDeleteFeatureEvent(
|
||||
$this->getExistingObject(),
|
||||
intval($this->getRequest()->get('feature_id'))
|
||||
);
|
||||
|
||||
try {
|
||||
$this->dispatch(TheliaEvents::TEMPLATE_DELETE_FEATURE, $event);
|
||||
} catch (\Exception $ex) {
|
||||
// Any error
|
||||
return $this->errorPage($ex);
|
||||
}
|
||||
|
||||
$this->redirectToEditionTemplate();
|
||||
}
|
||||
|
||||
}
|
||||
51
core/lib/Thelia/Core/Event/TemplateAddAttributeEvent.php
Normal file
51
core/lib/Thelia/Core/Event/TemplateAddAttributeEvent.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
use Thelia\Model\Template;
|
||||
class TemplateAddAttributeEvent extends TemplateEvent
|
||||
{
|
||||
protected $attribute_id;
|
||||
|
||||
public function __construct(Template $template, $attribute_id)
|
||||
{
|
||||
|
||||
parent::__construct($template);
|
||||
|
||||
$this->attribute_id = $attribute_id;
|
||||
}
|
||||
|
||||
public function getAttributeId()
|
||||
{
|
||||
return $this->attribute_id;
|
||||
}
|
||||
|
||||
public function setAttributeId($attribute_id)
|
||||
{
|
||||
$this->attribute_id = $attribute_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
51
core/lib/Thelia/Core/Event/TemplateAddFeatureEvent.php
Normal file
51
core/lib/Thelia/Core/Event/TemplateAddFeatureEvent.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
use Thelia\Model\Template;
|
||||
class TemplateAddFeatureEvent extends TemplateEvent
|
||||
{
|
||||
protected $feature_id;
|
||||
|
||||
public function __construct(Template $template, $feature_id)
|
||||
{
|
||||
|
||||
parent::__construct($template);
|
||||
|
||||
$this->feature_id = $feature_id;
|
||||
}
|
||||
|
||||
public function getFeatureId()
|
||||
{
|
||||
return $this->feature_id;
|
||||
}
|
||||
|
||||
public function setFeatureId($feature_id)
|
||||
{
|
||||
$this->feature_id = $feature_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
51
core/lib/Thelia/Core/Event/TemplateDeleteAttributeEvent.php
Normal file
51
core/lib/Thelia/Core/Event/TemplateDeleteAttributeEvent.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
use Thelia\Model\Template;
|
||||
|
||||
class TemplateDeleteAttributeEvent extends TemplateEvent
|
||||
{
|
||||
protected $attribute_id;
|
||||
|
||||
public function __construct(Template $template, $attribute_id)
|
||||
{
|
||||
|
||||
parent::__construct($template);
|
||||
|
||||
$this->attribute_id = $attribute_id;
|
||||
}
|
||||
|
||||
public function getAttributeId()
|
||||
{
|
||||
return $this->attribute_id;
|
||||
}
|
||||
|
||||
public function setAttributeId($attribute_id)
|
||||
{
|
||||
$this->attribute_id = $attribute_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
51
core/lib/Thelia/Core/Event/TemplateDeleteFeatureEvent.php
Normal file
51
core/lib/Thelia/Core/Event/TemplateDeleteFeatureEvent.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
use Thelia\Model\Template;
|
||||
|
||||
class TemplateDeleteFeatureEvent extends TemplateEvent
|
||||
{
|
||||
protected $feature_id;
|
||||
|
||||
public function __construct(Template $template, $feature_id)
|
||||
{
|
||||
|
||||
parent::__construct($template);
|
||||
|
||||
$this->feature_id = $feature_id;
|
||||
}
|
||||
|
||||
public function getFeatureId()
|
||||
{
|
||||
return $this->feature_id;
|
||||
}
|
||||
|
||||
public function setFeatureId($feature_id)
|
||||
{
|
||||
$this->feature_id = $feature_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -344,6 +344,12 @@ final class TheliaEvents
|
||||
const TEMPLATE_UPDATE = "action.updateTemplate";
|
||||
const TEMPLATE_DELETE = "action.deleteTemplate";
|
||||
|
||||
const TEMPLATE_ADD_ATTRIBUTE = "action.templateAddAttribute";
|
||||
const TEMPLATE_DELETE_ATTRIBUTE = "action.templateDeleteAttribute";
|
||||
|
||||
const TEMPLATE_ADD_FEATURE = "action.templateAddFeature";
|
||||
const TEMPLATE_DELETE_FEATURE = "action.templateDeleteFeature";
|
||||
|
||||
const BEFORE_CREATETEMPLATE = "action.before_createTemplate";
|
||||
const AFTER_CREATETEMPLATE = "action.after_createTemplate";
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class LoopResult implements \Iterator
|
||||
public function __construct($modelCollection = null)
|
||||
{
|
||||
$this->position = 0;
|
||||
if ($modelCollection instanceof ObjectCollection || $modelCollection instanceof PropelModelPager) {
|
||||
if ($modelCollection instanceof ObjectCollection || $modelCollection instanceof PropelModelPager || is_array($modelCollection)) {
|
||||
$this->modelCollection = $modelCollection;
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,17 @@ class LoopResult implements \Iterator
|
||||
return count($this->collection);
|
||||
}
|
||||
|
||||
public function getModelCollectionCount()
|
||||
{
|
||||
if ($this->modelCollection instanceof ObjectCollection || $this->modelCollection instanceof PropelModelPager) {
|
||||
return $this->modelCollection->count();
|
||||
} elseif (is_array($this->modelCollection)) {
|
||||
return count($this->modelCollection);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.0.0)<br/>
|
||||
* Return the current element
|
||||
|
||||
@@ -107,7 +107,7 @@ class LoopResultRow
|
||||
}
|
||||
if (true === $this->countable) {
|
||||
$this->set('LOOP_COUNT', 1 + $this->loopResult->getCount());
|
||||
$this->set('LOOP_TOTAL', $this->loopResult->modelCollection->count());
|
||||
$this->set('LOOP_TOTAL', $this->loopResult->getModelCollectionCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ class Attribute extends BaseI18nLoop
|
||||
Argument::createIntListTypeArgument('id'),
|
||||
Argument::createIntListTypeArgument('product'),
|
||||
Argument::createIntListTypeArgument('template'),
|
||||
Argument::createIntListTypeArgument('exclude_template'),
|
||||
Argument::createIntListTypeArgument('exclude'),
|
||||
new Argument(
|
||||
'order',
|
||||
@@ -115,15 +116,25 @@ class Attribute extends BaseI18nLoop
|
||||
$template = $productObj->getTemplate();
|
||||
}
|
||||
|
||||
|
||||
// If we have to filter by template, find all attributes assigned to this template, and filter by found IDs
|
||||
if (null !== $template) {
|
||||
$search->filterById(
|
||||
AttributeTemplateQuery::create()->filterByTemplateId($template)->select('id')->find(),
|
||||
AttributeTemplateQuery::create()->filterByTemplateId($template)->select('attribute_id')->find(),
|
||||
Criteria::IN
|
||||
);
|
||||
}
|
||||
|
||||
$exclude_template = $this->getExcludeTemplate();
|
||||
|
||||
// If we have to filter by template, find all attributes assigned to this template, and filter by found IDs
|
||||
if (null !== $exclude_template) {
|
||||
// Exclure tous les attribut qui sont attachés aux templates indiqués
|
||||
$search->filterById(
|
||||
AttributeTemplateQuery::create()->filterByTemplateId($exclude_template)->select('attribute_id')->find(),
|
||||
Criteria::NOT_IN
|
||||
);
|
||||
}
|
||||
|
||||
$orders = $this->getOrder();
|
||||
|
||||
foreach ($orders as $order) {
|
||||
|
||||
@@ -38,6 +38,7 @@ use Thelia\Model\Map\ProductCategoryTableMap;
|
||||
use Thelia\Type\TypeCollection;
|
||||
use Thelia\Type;
|
||||
use Thelia\Type\BooleanOrBothType;
|
||||
use Thelia\Model\FeatureTemplateQuery;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -60,7 +61,8 @@ class Feature extends BaseI18nLoop
|
||||
return new ArgumentCollection(
|
||||
Argument::createIntListTypeArgument('id'),
|
||||
Argument::createIntListTypeArgument('product'),
|
||||
Argument::createIntListTypeArgument('category'),
|
||||
Argument::createIntListTypeArgument('template'),
|
||||
Argument::createIntListTypeArgument('exclude_template'),
|
||||
Argument::createBooleanOrBothTypeArgument('visible', 1),
|
||||
Argument::createIntListTypeArgument('exclude'),
|
||||
new Argument(
|
||||
@@ -102,22 +104,33 @@ class Feature extends BaseI18nLoop
|
||||
if ($visible != BooleanOrBothType::ANY) $search->filterByVisible($visible);
|
||||
|
||||
$product = $this->getProduct();
|
||||
$category = $this->getCategory();
|
||||
$template = $this->getTemplate();
|
||||
|
||||
if (null !== $product) {
|
||||
$productCategories = ProductCategoryQuery::create()->select(array(ProductCategoryTableMap::CATEGORY_ID))->filterByProductId($product, Criteria::IN)->find()->getData();
|
||||
// Find the template assigned to the product.
|
||||
$productObj = ProductQuery::create()->findPk($product);
|
||||
|
||||
if (null === $category) {
|
||||
$category = $productCategories;
|
||||
} else {
|
||||
$category = array_merge($category, $productCategories);
|
||||
}
|
||||
// Ignore if the product cannot be found.
|
||||
if ($productObj !== null)
|
||||
$template = $productObj->getTemplate();
|
||||
}
|
||||
|
||||
// If we have to filter by template, find all features assigned to this template, and filter by found IDs
|
||||
if (null !== $template) {
|
||||
$search->filterById(
|
||||
FeatureTemplateQuery::create()->filterByTemplateId($template)->select('feature_id')->find(),
|
||||
Criteria::IN
|
||||
);
|
||||
}
|
||||
|
||||
if (null !== $category) {
|
||||
$search->filterByCategory(
|
||||
CategoryQuery::create()->filterById($category)->find(),
|
||||
Criteria::IN
|
||||
$exclude_template = $this->getExcludeTemplate();
|
||||
|
||||
// If we have to filter by template, find all features assigned to this template, and filter by found IDs
|
||||
if (null !== $exclude_template) {
|
||||
// Exclure tous les attribut qui sont attachés aux templates indiqués
|
||||
$search->filterById(
|
||||
FeatureTemplateQuery::create()->filterByTemplateId($exclude_template)->select('feature_id')->find(),
|
||||
Criteria::NOT_IN
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,9 +73,14 @@ class Feed extends BaseLoop
|
||||
|
||||
$limit = min(count($items), $this->getLimit());
|
||||
|
||||
$loopResult = new LoopResult();
|
||||
|
||||
$indexes = array();
|
||||
for ($idx = 0; $idx < $limit; $idx++) {
|
||||
$indexes[] = $idx;
|
||||
}
|
||||
|
||||
$loopResult = new LoopResult($indexes);
|
||||
|
||||
foreach ($indexes as $idx) {
|
||||
|
||||
$item = $items[$idx];
|
||||
|
||||
@@ -87,7 +92,7 @@ class Feed extends BaseLoop
|
||||
|
||||
$date = $item->get_date('d/m/Y');
|
||||
|
||||
$loopResultRow = new LoopResultRow();
|
||||
$loopResultRow = new LoopResultRow($loopResult, null, $this->versionable, $this->timestampable, $this->countable);
|
||||
|
||||
$loopResultRow->set("URL", $item->get_permalink());
|
||||
$loopResultRow->set("TITLE", $item->get_title());
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\Length;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class AdminLogin extends BaseForm
|
||||
{
|
||||
@@ -34,15 +35,27 @@ class AdminLogin extends BaseForm
|
||||
"constraints" => array(
|
||||
new NotBlank(),
|
||||
new Length(array("min" => 3))
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Username *"),
|
||||
"label_attr" => array(
|
||||
"for" => "username"
|
||||
)
|
||||
))
|
||||
->add("password", "password", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Password *"),
|
||||
"label_attr" => array(
|
||||
"for" => "password"
|
||||
)
|
||||
))
|
||||
->add("remember_me", "checkbox", array(
|
||||
'value' => 'yes'
|
||||
'value' => 'yes',
|
||||
"label" => Translator::getInstance()->trans("Remember me ?"),
|
||||
"label_attr" => array(
|
||||
"for" => "remember_me"
|
||||
)
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
85
core/lib/Thelia/Form/CountryCreationForm.php
Normal file
85
core/lib/Thelia/Form/CountryCreationForm.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class CountryCreationForm extends BaseForm
|
||||
{
|
||||
protected function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Country title *"),
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
))
|
||||
->add("area", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Country area *"),
|
||||
"label_attr" => array(
|
||||
"for" => "area"
|
||||
)
|
||||
))
|
||||
->add("isocode", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("ISO Code *"),
|
||||
"label_attr" => array(
|
||||
"for" => "isocode"
|
||||
)
|
||||
))
|
||||
->add("isoalpha2", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Alpha code 2 *"),
|
||||
"label_attr" => array(
|
||||
"for" => "isoalpha2"
|
||||
)
|
||||
))
|
||||
->add("isoalpha3", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Alpha code 3 *"),
|
||||
"label_attr" => array(
|
||||
"for" => "isoalpha3"
|
||||
)
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "thelia_country_creation";
|
||||
}
|
||||
}
|
||||
107
core/lib/Thelia/Form/CountryModificationForm.php
Normal file
107
core/lib/Thelia/Form/CountryModificationForm.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\GreaterThan;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class CountryModificationForm extends CurrencyCreationForm
|
||||
{
|
||||
protected function buildForm()
|
||||
{
|
||||
parent::buildForm(true);
|
||||
|
||||
$this->formBuilder
|
||||
->add("id", "hidden", array("constraints" => array(new GreaterThan(array('value' => 0)))))
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Country title *"),
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
))
|
||||
->add("short-description", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Country short description *"),
|
||||
"label_attr" => array(
|
||||
"for" => "short-description"
|
||||
)
|
||||
))
|
||||
->add("description", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Country description *"),
|
||||
"label_attr" => array(
|
||||
"for" => "description"
|
||||
)
|
||||
))
|
||||
->add("area", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Country area *"),
|
||||
"label_attr" => array(
|
||||
"for" => "area"
|
||||
)
|
||||
))
|
||||
->add("isocode", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("ISO Code *"),
|
||||
"label_attr" => array(
|
||||
"for" => "isocode"
|
||||
)
|
||||
))
|
||||
->add("isoalpha2", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Alpha code 2 *"),
|
||||
"label_attr" => array(
|
||||
"for" => "isoalpha2"
|
||||
)
|
||||
))
|
||||
->add("isoalpha3", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Alpha code 3 *"),
|
||||
"label_attr" => array(
|
||||
"for" => "isoalpha3"
|
||||
)
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "thelia_country_modification";
|
||||
}
|
||||
}
|
||||
@@ -93,6 +93,12 @@ abstract class Country implements ActiveRecordInterface
|
||||
*/
|
||||
protected $isoalpha3;
|
||||
|
||||
/**
|
||||
* The value for the by_default field.
|
||||
* @var int
|
||||
*/
|
||||
protected $by_default;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -477,6 +483,17 @@ abstract class Country implements ActiveRecordInterface
|
||||
return $this->isoalpha3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [by_default] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getByDefault()
|
||||
{
|
||||
|
||||
return $this->by_default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -626,6 +643,27 @@ abstract class Country implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setIsoalpha3()
|
||||
|
||||
/**
|
||||
* Set the value of [by_default] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Country The current object (for fluent API support)
|
||||
*/
|
||||
public function setByDefault($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->by_default !== $v) {
|
||||
$this->by_default = $v;
|
||||
$this->modifiedColumns[] = CountryTableMap::BY_DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setByDefault()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -720,13 +758,16 @@ abstract class Country implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CountryTableMap::translateFieldName('Isoalpha3', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->isoalpha3 = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CountryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CountryTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->by_default = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CountryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CountryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CountryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -739,7 +780,7 @@ abstract class Country implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 7; // 7 = CountryTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 8; // 8 = CountryTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Country object", 0, $e);
|
||||
@@ -1043,6 +1084,9 @@ abstract class Country implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CountryTableMap::ISOALPHA3)) {
|
||||
$modifiedColumns[':p' . $index++] = 'ISOALPHA3';
|
||||
}
|
||||
if ($this->isColumnModified(CountryTableMap::BY_DEFAULT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'BY_DEFAULT';
|
||||
}
|
||||
if ($this->isColumnModified(CountryTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||
}
|
||||
@@ -1075,6 +1119,9 @@ abstract class Country implements ActiveRecordInterface
|
||||
case 'ISOALPHA3':
|
||||
$stmt->bindValue($identifier, $this->isoalpha3, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'BY_DEFAULT':
|
||||
$stmt->bindValue($identifier, $this->by_default, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'CREATED_AT':
|
||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1152,9 +1199,12 @@ abstract class Country implements ActiveRecordInterface
|
||||
return $this->getIsoalpha3();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getByDefault();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1191,8 +1241,9 @@ abstract class Country implements ActiveRecordInterface
|
||||
$keys[2] => $this->getIsocode(),
|
||||
$keys[3] => $this->getIsoalpha2(),
|
||||
$keys[4] => $this->getIsoalpha3(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
$keys[5] => $this->getByDefault(),
|
||||
$keys[6] => $this->getCreatedAt(),
|
||||
$keys[7] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1263,9 +1314,12 @@ abstract class Country implements ActiveRecordInterface
|
||||
$this->setIsoalpha3($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setByDefault($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1297,8 +1351,9 @@ abstract class Country implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[2], $arr)) $this->setIsocode($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setIsoalpha2($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setIsoalpha3($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setByDefault($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1315,6 +1370,7 @@ abstract class Country implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CountryTableMap::ISOCODE)) $criteria->add(CountryTableMap::ISOCODE, $this->isocode);
|
||||
if ($this->isColumnModified(CountryTableMap::ISOALPHA2)) $criteria->add(CountryTableMap::ISOALPHA2, $this->isoalpha2);
|
||||
if ($this->isColumnModified(CountryTableMap::ISOALPHA3)) $criteria->add(CountryTableMap::ISOALPHA3, $this->isoalpha3);
|
||||
if ($this->isColumnModified(CountryTableMap::BY_DEFAULT)) $criteria->add(CountryTableMap::BY_DEFAULT, $this->by_default);
|
||||
if ($this->isColumnModified(CountryTableMap::CREATED_AT)) $criteria->add(CountryTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(CountryTableMap::UPDATED_AT)) $criteria->add(CountryTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -1385,6 +1441,7 @@ abstract class Country implements ActiveRecordInterface
|
||||
$copyObj->setIsocode($this->getIsocode());
|
||||
$copyObj->setIsoalpha2($this->getIsoalpha2());
|
||||
$copyObj->setIsoalpha3($this->getIsoalpha3());
|
||||
$copyObj->setByDefault($this->getByDefault());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
|
||||
@@ -2287,6 +2344,7 @@ abstract class Country implements ActiveRecordInterface
|
||||
$this->isocode = null;
|
||||
$this->isoalpha2 = null;
|
||||
$this->isoalpha3 = null;
|
||||
$this->by_default = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
@@ -27,6 +27,7 @@ use Thelia\Model\Map\CountryTableMap;
|
||||
* @method ChildCountryQuery orderByIsocode($order = Criteria::ASC) Order by the isocode column
|
||||
* @method ChildCountryQuery orderByIsoalpha2($order = Criteria::ASC) Order by the isoalpha2 column
|
||||
* @method ChildCountryQuery orderByIsoalpha3($order = Criteria::ASC) Order by the isoalpha3 column
|
||||
* @method ChildCountryQuery orderByByDefault($order = Criteria::ASC) Order by the by_default column
|
||||
* @method ChildCountryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildCountryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
@@ -35,6 +36,7 @@ use Thelia\Model\Map\CountryTableMap;
|
||||
* @method ChildCountryQuery groupByIsocode() Group by the isocode column
|
||||
* @method ChildCountryQuery groupByIsoalpha2() Group by the isoalpha2 column
|
||||
* @method ChildCountryQuery groupByIsoalpha3() Group by the isoalpha3 column
|
||||
* @method ChildCountryQuery groupByByDefault() Group by the by_default column
|
||||
* @method ChildCountryQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildCountryQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -66,6 +68,7 @@ use Thelia\Model\Map\CountryTableMap;
|
||||
* @method ChildCountry findOneByIsocode(string $isocode) Return the first ChildCountry filtered by the isocode column
|
||||
* @method ChildCountry findOneByIsoalpha2(string $isoalpha2) Return the first ChildCountry filtered by the isoalpha2 column
|
||||
* @method ChildCountry findOneByIsoalpha3(string $isoalpha3) Return the first ChildCountry filtered by the isoalpha3 column
|
||||
* @method ChildCountry findOneByByDefault(int $by_default) Return the first ChildCountry filtered by the by_default column
|
||||
* @method ChildCountry findOneByCreatedAt(string $created_at) Return the first ChildCountry filtered by the created_at column
|
||||
* @method ChildCountry findOneByUpdatedAt(string $updated_at) Return the first ChildCountry filtered by the updated_at column
|
||||
*
|
||||
@@ -74,6 +77,7 @@ use Thelia\Model\Map\CountryTableMap;
|
||||
* @method array findByIsocode(string $isocode) Return ChildCountry objects filtered by the isocode column
|
||||
* @method array findByIsoalpha2(string $isoalpha2) Return ChildCountry objects filtered by the isoalpha2 column
|
||||
* @method array findByIsoalpha3(string $isoalpha3) Return ChildCountry objects filtered by the isoalpha3 column
|
||||
* @method array findByByDefault(int $by_default) Return ChildCountry objects filtered by the by_default column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildCountry objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildCountry objects filtered by the updated_at column
|
||||
*
|
||||
@@ -164,7 +168,7 @@ abstract class CountryQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, AREA_ID, ISOCODE, ISOALPHA2, ISOALPHA3, CREATED_AT, UPDATED_AT FROM country WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, AREA_ID, ISOCODE, ISOALPHA2, ISOALPHA3, BY_DEFAULT, CREATED_AT, UPDATED_AT FROM country WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -424,6 +428,47 @@ abstract class CountryQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CountryTableMap::ISOALPHA3, $isoalpha3, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the by_default column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByByDefault(1234); // WHERE by_default = 1234
|
||||
* $query->filterByByDefault(array(12, 34)); // WHERE by_default IN (12, 34)
|
||||
* $query->filterByByDefault(array('min' => 12)); // WHERE by_default > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $byDefault 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 ChildCountryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByByDefault($byDefault = null, $comparison = null)
|
||||
{
|
||||
if (is_array($byDefault)) {
|
||||
$useMinMax = false;
|
||||
if (isset($byDefault['min'])) {
|
||||
$this->addUsingAlias(CountryTableMap::BY_DEFAULT, $byDefault['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($byDefault['max'])) {
|
||||
$this->addUsingAlias(CountryTableMap::BY_DEFAULT, $byDefault['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CountryTableMap::BY_DEFAULT, $byDefault, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
@@ -57,7 +57,7 @@ class CountryTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 7;
|
||||
const NUM_COLUMNS = 8;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -67,7 +67,7 @@ class CountryTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 7;
|
||||
const NUM_HYDRATE_COLUMNS = 8;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -94,6 +94,11 @@ class CountryTableMap extends TableMap
|
||||
*/
|
||||
const ISOALPHA3 = 'country.ISOALPHA3';
|
||||
|
||||
/**
|
||||
* the column name for the BY_DEFAULT field
|
||||
*/
|
||||
const BY_DEFAULT = 'country.BY_DEFAULT';
|
||||
|
||||
/**
|
||||
* the column name for the CREATED_AT field
|
||||
*/
|
||||
@@ -125,12 +130,12 @@ class CountryTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'AreaId', 'Isocode', 'Isoalpha2', 'Isoalpha3', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'areaId', 'isocode', 'isoalpha2', 'isoalpha3', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(CountryTableMap::ID, CountryTableMap::AREA_ID, CountryTableMap::ISOCODE, CountryTableMap::ISOALPHA2, CountryTableMap::ISOALPHA3, CountryTableMap::CREATED_AT, CountryTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'AREA_ID', 'ISOCODE', 'ISOALPHA2', 'ISOALPHA3', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'area_id', 'isocode', 'isoalpha2', 'isoalpha3', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
|
||||
self::TYPE_PHPNAME => array('Id', 'AreaId', 'Isocode', 'Isoalpha2', 'Isoalpha3', 'ByDefault', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'areaId', 'isocode', 'isoalpha2', 'isoalpha3', 'byDefault', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(CountryTableMap::ID, CountryTableMap::AREA_ID, CountryTableMap::ISOCODE, CountryTableMap::ISOALPHA2, CountryTableMap::ISOALPHA3, CountryTableMap::BY_DEFAULT, CountryTableMap::CREATED_AT, CountryTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'AREA_ID', 'ISOCODE', 'ISOALPHA2', 'ISOALPHA3', 'BY_DEFAULT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'area_id', 'isocode', 'isoalpha2', 'isoalpha3', 'by_default', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -140,12 +145,12 @@ class CountryTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'AreaId' => 1, 'Isocode' => 2, 'Isoalpha2' => 3, 'Isoalpha3' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'areaId' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
|
||||
self::TYPE_COLNAME => array(CountryTableMap::ID => 0, CountryTableMap::AREA_ID => 1, CountryTableMap::ISOCODE => 2, CountryTableMap::ISOALPHA2 => 3, CountryTableMap::ISOALPHA3 => 4, CountryTableMap::CREATED_AT => 5, CountryTableMap::UPDATED_AT => 6, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'AREA_ID' => 1, 'ISOCODE' => 2, 'ISOALPHA2' => 3, 'ISOALPHA3' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'area_id' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'created_at' => 5, 'updated_at' => 6, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'AreaId' => 1, 'Isocode' => 2, 'Isoalpha2' => 3, 'Isoalpha3' => 4, 'ByDefault' => 5, 'CreatedAt' => 6, 'UpdatedAt' => 7, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'areaId' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'byDefault' => 5, 'createdAt' => 6, 'updatedAt' => 7, ),
|
||||
self::TYPE_COLNAME => array(CountryTableMap::ID => 0, CountryTableMap::AREA_ID => 1, CountryTableMap::ISOCODE => 2, CountryTableMap::ISOALPHA2 => 3, CountryTableMap::ISOALPHA3 => 4, CountryTableMap::BY_DEFAULT => 5, CountryTableMap::CREATED_AT => 6, CountryTableMap::UPDATED_AT => 7, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'AREA_ID' => 1, 'ISOCODE' => 2, 'ISOALPHA2' => 3, 'ISOALPHA3' => 4, 'BY_DEFAULT' => 5, 'CREATED_AT' => 6, 'UPDATED_AT' => 7, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'area_id' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'by_default' => 5, 'created_at' => 6, 'updated_at' => 7, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -169,6 +174,7 @@ class CountryTableMap extends TableMap
|
||||
$this->addColumn('ISOCODE', 'Isocode', 'VARCHAR', true, 4, null);
|
||||
$this->addColumn('ISOALPHA2', 'Isoalpha2', 'VARCHAR', false, 2, null);
|
||||
$this->addColumn('ISOALPHA3', 'Isoalpha3', 'VARCHAR', false, 4, null);
|
||||
$this->addColumn('BY_DEFAULT', 'ByDefault', 'TINYINT', false, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
} // initialize()
|
||||
@@ -351,6 +357,7 @@ class CountryTableMap extends TableMap
|
||||
$criteria->addSelectColumn(CountryTableMap::ISOCODE);
|
||||
$criteria->addSelectColumn(CountryTableMap::ISOALPHA2);
|
||||
$criteria->addSelectColumn(CountryTableMap::ISOALPHA3);
|
||||
$criteria->addSelectColumn(CountryTableMap::BY_DEFAULT);
|
||||
$criteria->addSelectColumn(CountryTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(CountryTableMap::UPDATED_AT);
|
||||
} else {
|
||||
@@ -359,6 +366,7 @@ class CountryTableMap extends TableMap
|
||||
$criteria->addSelectColumn($alias . '.ISOCODE');
|
||||
$criteria->addSelectColumn($alias . '.ISOALPHA2');
|
||||
$criteria->addSelectColumn($alias . '.ISOALPHA3');
|
||||
$criteria->addSelectColumn($alias . '.BY_DEFAULT');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
}
|
||||
|
||||
@@ -59,271 +59,271 @@ VALUES
|
||||
(3, 'en_US', 'UK Pound');
|
||||
|
||||
|
||||
INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `created_at`, `updated_at`) VALUES
|
||||
(1, NULL, '4', 'AF', 'AFG', NOW(), NOW()),
|
||||
(2, NULL, '710', 'ZA', 'ZAF', NOW(), NOW()),
|
||||
(3, NULL, '8', 'AL', 'ALB', NOW(), NOW()),
|
||||
(4, NULL, '12', 'DZ', 'DZA', NOW(), NOW()),
|
||||
(5, NULL, '276', 'DE', 'DEU', NOW(), NOW()),
|
||||
(6, NULL, '20', 'AD', 'AND', NOW(), NOW()),
|
||||
(7, NULL, '24', 'AO', 'AGO', NOW(), NOW()),
|
||||
(8, NULL, '28', 'AG', 'ATG', NOW(), NOW()),
|
||||
(9, NULL, '682', 'SA', 'SAU', NOW(), NOW()),
|
||||
(10, NULL, '32', 'AR', 'ARG', NOW(), NOW()),
|
||||
(11, NULL, '51', 'AM', 'ARM', NOW(), NOW()),
|
||||
(12, NULL, '36', 'AU', 'AUS', NOW(), NOW()),
|
||||
(13, NULL, '40', 'AT', 'AUT', NOW(), NOW()),
|
||||
(14, NULL, '31', 'AZ', 'AZE', NOW(), NOW()),
|
||||
(15, NULL, '44', 'BS', 'BHS', NOW(), NOW()),
|
||||
(16, NULL, '48', 'BR', 'BHR', NOW(), NOW()),
|
||||
(17, NULL, '50', 'BD', 'BGD', NOW(), NOW()),
|
||||
(18, NULL, '52', 'BB', 'BRB', NOW(), NOW()),
|
||||
(19, NULL, '585', 'PW', 'PLW', NOW(), NOW()),
|
||||
(20, NULL, '56', 'BE', 'BEL', NOW(), NOW()),
|
||||
(21, NULL, '84', 'BL', 'BLZ', NOW(), NOW()),
|
||||
(22, NULL, '204', 'BJ', 'BEN', NOW(), NOW()),
|
||||
(23, NULL, '64', 'BT', 'BTN', NOW(), NOW()),
|
||||
(24, NULL, '112', 'BY', 'BLR', NOW(), NOW()),
|
||||
(25, NULL, '104', 'MM', 'MMR', NOW(), NOW()),
|
||||
(26, NULL, '68', 'BO', 'BOL', NOW(), NOW()),
|
||||
(27, NULL, '70', 'BA', 'BIH', NOW(), NOW()),
|
||||
(28, NULL, '72', 'BW', 'BWA', NOW(), NOW()),
|
||||
(29, NULL, '76', 'BR', 'BRA', NOW(), NOW()),
|
||||
(30, NULL, '96', 'BN', 'BRN', NOW(), NOW()),
|
||||
(31, NULL, '100', 'BG', 'BGR', NOW(), NOW()),
|
||||
(32, NULL, '854', 'BF', 'BFA', NOW(), NOW()),
|
||||
(33, NULL, '108', 'BI', 'BDI', NOW(), NOW()),
|
||||
(34, NULL, '116', 'KH', 'KHM', NOW(), NOW()),
|
||||
(35, NULL, '120', 'CM', 'CMR', NOW(), NOW()),
|
||||
(37, NULL, '132', 'CV', 'CPV', NOW(), NOW()),
|
||||
(38, NULL, '152', 'CL', 'CHL', NOW(), NOW()),
|
||||
(39, NULL, '156', 'CN', 'CHN', NOW(), NOW()),
|
||||
(40, NULL, '196', 'CY', 'CYP', NOW(), NOW()),
|
||||
(41, NULL, '170', 'CO', 'COL', NOW(), NOW()),
|
||||
(42, NULL, '174', 'KM', 'COM', NOW(), NOW()),
|
||||
(43, NULL, '178', 'CG', 'COG', NOW(), NOW()),
|
||||
(44, NULL, '184', 'CK', 'COK', NOW(), NOW()),
|
||||
(45, NULL, '408', 'KP', 'PRK', NOW(), NOW()),
|
||||
(46, NULL, '410', 'KR', 'KOR', NOW(), NOW()),
|
||||
(47, NULL, '188', 'CR', 'CRI', NOW(), NOW()),
|
||||
(48, NULL, '384', 'CI', 'CIV', NOW(), NOW()),
|
||||
(49, NULL, '191', 'HR', 'HRV', NOW(), NOW()),
|
||||
(50, NULL, '192', 'CU', 'CUB', NOW(), NOW()),
|
||||
(51, NULL, '208', 'DK', 'DNK', NOW(), NOW()),
|
||||
(52, NULL, '262', 'DJ', 'DJI', NOW(), NOW()),
|
||||
(53, NULL, '212', 'DM', 'DMA', NOW(), NOW()),
|
||||
(54, NULL, '818', 'EG', 'EGY', NOW(), NOW()),
|
||||
(55, NULL, '784', 'AE', 'ARE', NOW(), NOW()),
|
||||
(56, NULL, '218', 'EC', 'ECU', NOW(), NOW()),
|
||||
(57, NULL, '232', 'ER', 'ERI', NOW(), NOW()),
|
||||
(58, NULL, '724', 'ES', 'ESP', NOW(), NOW()),
|
||||
(59, NULL, '233', 'EE', 'EST', NOW(), NOW()),
|
||||
(61, NULL, '231', 'ET', 'ETH', NOW(), NOW()),
|
||||
(62, NULL, '242', 'FJ', 'FJI', NOW(), NOW()),
|
||||
(63, NULL, '246', 'FI', 'FIN', NOW(), NOW()),
|
||||
(64, NULL, '250', 'FR', 'FRA', NOW(), NOW()),
|
||||
(65, NULL, '266', 'GA', 'GAB', NOW(), NOW()),
|
||||
(66, NULL, '270', 'GM', 'GMB', NOW(), NOW()),
|
||||
(67, NULL, '268', 'GE', 'GEO', NOW(), NOW()),
|
||||
(68, NULL, '288', 'GH', 'GHA', NOW(), NOW()),
|
||||
(69, NULL, '300', 'GR', 'GRC', NOW(), NOW()),
|
||||
(70, NULL, '308', 'GD', 'GRD', NOW(), NOW()),
|
||||
(71, NULL, '320', 'GT', 'GTM', NOW(), NOW()),
|
||||
(72, NULL, '324', 'GN', 'GIN', NOW(), NOW()),
|
||||
(73, NULL, '624', 'GW', 'GNB', NOW(), NOW()),
|
||||
(74, NULL, '226', 'GQ', 'GNQ', NOW(), NOW()),
|
||||
(75, NULL, '328', 'GY', 'GUY', NOW(), NOW()),
|
||||
(76, NULL, '332', 'HT', 'HTI', NOW(), NOW()),
|
||||
(77, NULL, '340', 'HN', 'HND', NOW(), NOW()),
|
||||
(78, NULL, '348', 'HU', 'HUN', NOW(), NOW()),
|
||||
(79, NULL, '356', 'IN', 'IND', NOW(), NOW()),
|
||||
(80, NULL, '360', 'ID', 'IDN', NOW(), NOW()),
|
||||
(81, NULL, '364', 'IR', 'IRN', NOW(), NOW()),
|
||||
(82, NULL, '368', 'IQ', 'IRQ', NOW(), NOW()),
|
||||
(83, NULL, '372', 'IE', 'IRL', NOW(), NOW()),
|
||||
(84, NULL, '352', 'IS', 'ISL', NOW(), NOW()),
|
||||
(85, NULL, '376', 'IL', 'ISR', NOW(), NOW()),
|
||||
(86, NULL, '380', 'IT', 'ITA', NOW(), NOW()),
|
||||
(87, NULL, '388', 'JM', 'JAM', NOW(), NOW()),
|
||||
(88, NULL, '392', 'JP', 'JPN', NOW(), NOW()),
|
||||
(89, NULL, '400', 'JO', 'JOR', NOW(), NOW()),
|
||||
(90, NULL, '398', 'KZ', 'KAZ', NOW(), NOW()),
|
||||
(91, NULL, '404', 'KE', 'KEN', NOW(), NOW()),
|
||||
(92, NULL, '417', 'KG', 'KGZ', NOW(), NOW()),
|
||||
(93, NULL, '296', 'KI', 'KIR', NOW(), NOW()),
|
||||
(94, NULL, '414', 'KW', 'KWT', NOW(), NOW()),
|
||||
(95, NULL, '418', 'LA', 'LAO', NOW(), NOW()),
|
||||
(96, NULL, '426', 'LS', 'LSO', NOW(), NOW()),
|
||||
(97, NULL, '428', 'LV', 'LVA', NOW(), NOW()),
|
||||
(98, NULL, '422', 'LB', 'LBN', NOW(), NOW()),
|
||||
(99, NULL, '430', 'LR', 'LBR', NOW(), NOW()),
|
||||
(100, NULL, '343', 'LY', 'LBY', NOW(), NOW()),
|
||||
(101, NULL, '438', 'LI', 'LIE', NOW(), NOW()),
|
||||
(102, NULL, '440', 'LT', 'LTU', NOW(), NOW()),
|
||||
(103, NULL, '442', 'LU', 'LUX', NOW(), NOW()),
|
||||
(104, NULL, '807', 'MK', 'MKD', NOW(), NOW()),
|
||||
(105, NULL, '450', 'MD', 'MDG', NOW(), NOW()),
|
||||
(106, NULL, '458', 'MY', 'MYS', NOW(), NOW()),
|
||||
(107, NULL, '454', 'MW', 'MWI', NOW(), NOW()),
|
||||
(108, NULL, '462', 'MV', 'MDV', NOW(), NOW()),
|
||||
(109, NULL, '466', 'ML', 'MLI', NOW(), NOW()),
|
||||
(110, NULL, '470', 'MT', 'MLT', NOW(), NOW()),
|
||||
(111, NULL, '504', 'MA', 'MAR', NOW(), NOW()),
|
||||
(112, NULL, '584', 'MH', 'MHL', NOW(), NOW()),
|
||||
(113, NULL, '480', 'MU', 'MUS', NOW(), NOW()),
|
||||
(114, NULL, '478', 'MR', 'MRT', NOW(), NOW()),
|
||||
(115, NULL, '484', 'MX', 'MEX', NOW(), NOW()),
|
||||
(116, NULL, '583', 'FM', 'FSM', NOW(), NOW()),
|
||||
(117, NULL, '498', 'MD', 'MDA', NOW(), NOW()),
|
||||
(118, NULL, '492', 'MC', 'MCO', NOW(), NOW()),
|
||||
(119, NULL, '496', 'MN', 'MNG', NOW(), NOW()),
|
||||
(120, NULL, '508', 'MZ', 'MOZ', NOW(), NOW()),
|
||||
(121, NULL, '516', 'NA', 'NAM', NOW(), NOW()),
|
||||
(122, NULL, '520', 'NR', 'NRU', NOW(), NOW()),
|
||||
(123, NULL, '524', 'NP', 'NPL', NOW(), NOW()),
|
||||
(124, NULL, '558', 'NI', 'NIC', NOW(), NOW()),
|
||||
(125, NULL, '562', 'NE', 'NER', NOW(), NOW()),
|
||||
(126, NULL, '566', 'NG', 'NGA', NOW(), NOW()),
|
||||
(127, NULL, '570', 'NU', 'NIU', NOW(), NOW()),
|
||||
(128, NULL, '578', 'NO', 'NOR', NOW(), NOW()),
|
||||
(129, NULL, '554', 'NZ', 'NZL', NOW(), NOW()),
|
||||
(130, NULL, '512', 'OM', 'OMN', NOW(), NOW()),
|
||||
(131, NULL, '800', 'UG', 'UGA', NOW(), NOW()),
|
||||
(132, NULL, '860', 'UZ', 'UZB', NOW(), NOW()),
|
||||
(133, NULL, '586', 'PK', 'PAK', NOW(), NOW()),
|
||||
(134, NULL, '591', 'PA', 'PAN', NOW(), NOW()),
|
||||
(135, NULL, '598', 'PG', 'PNG', NOW(), NOW()),
|
||||
(136, NULL, '600', 'PY', 'PRY', NOW(), NOW()),
|
||||
(137, NULL, '528', 'NL', 'NLD', NOW(), NOW()),
|
||||
(138, NULL, '604', 'PE', 'PER', NOW(), NOW()),
|
||||
(139, NULL, '608', 'PH', 'PHL', NOW(), NOW()),
|
||||
(140, NULL, '616', 'PL', 'POL', NOW(), NOW()),
|
||||
(141, NULL, '620', 'PT', 'PRT', NOW(), NOW()),
|
||||
(142, NULL, '634', 'QA', 'QAT', NOW(), NOW()),
|
||||
(143, NULL, '140', 'CF', 'CAF', NOW(), NOW()),
|
||||
(144, NULL, '214', 'DO', 'DOM', NOW(), NOW()),
|
||||
(145, NULL, '203', 'CZ', 'CZE', NOW(), NOW()),
|
||||
(146, NULL, '642', 'RO', 'ROU', NOW(), NOW()),
|
||||
(147, NULL, '826', 'GB', 'GBR', NOW(), NOW()),
|
||||
(148, NULL, '643', 'RU', 'RUS', NOW(), NOW()),
|
||||
(149, NULL, '646', 'RW', 'RWA', NOW(), NOW()),
|
||||
(150, NULL, '659', 'KN', 'KNA', NOW(), NOW()),
|
||||
(151, NULL, '662', 'LC', 'LCA', NOW(), NOW()),
|
||||
(152, NULL, '674', 'SM', 'SMR', NOW(), NOW()),
|
||||
(153, NULL, '670', 'VC', 'VCT', NOW(), NOW()),
|
||||
(154, NULL, '90', 'SB', 'SLB', NOW(), NOW()),
|
||||
(155, NULL, '222', 'SV', 'SLV', NOW(), NOW()),
|
||||
(156, NULL, '882', 'WS', 'WSM', NOW(), NOW()),
|
||||
(157, NULL, '678', 'ST', 'STP', NOW(), NOW()),
|
||||
(158, NULL, '686', 'SN', 'SEN', NOW(), NOW()),
|
||||
(159, NULL, '690', 'SC', 'SYC', NOW(), NOW()),
|
||||
(160, NULL, '694', 'SL', 'SLE', NOW(), NOW()),
|
||||
(161, NULL, '702', 'SG', 'SGP', NOW(), NOW()),
|
||||
(162, NULL, '703', 'SK', 'SVK', NOW(), NOW()),
|
||||
(163, NULL, '705', 'SI', 'SVN', NOW(), NOW()),
|
||||
(164, NULL, '706', 'SO', 'SOM', NOW(), NOW()),
|
||||
(165, NULL, '729', 'SD', 'SDN', NOW(), NOW()),
|
||||
(166, NULL, '144', 'LK', 'LKA', NOW(), NOW()),
|
||||
(167, NULL, '752', 'SE', 'SWE', NOW(), NOW()),
|
||||
(168, NULL, '756', 'CH', 'CHE', NOW(), NOW()),
|
||||
(169, NULL, '740', 'SR', 'SUR', NOW(), NOW()),
|
||||
(170, NULL, '748', 'SZ', 'SWZ', NOW(), NOW()),
|
||||
(171, NULL, '760', 'SY', 'SYR', NOW(), NOW()),
|
||||
(172, NULL, '762', 'TJ', 'TJK', NOW(), NOW()),
|
||||
(173, NULL, '834', 'TZ', 'TZA', NOW(), NOW()),
|
||||
(174, NULL, '148', 'TD', 'TCD', NOW(), NOW()),
|
||||
(175, NULL, '764', 'TH', 'THA', NOW(), NOW()),
|
||||
(176, NULL, '768', 'TG', 'TGO', NOW(), NOW()),
|
||||
(177, NULL, '776', 'TO', 'TON', NOW(), NOW()),
|
||||
(178, NULL, '780', 'TT', 'TTO', NOW(), NOW()),
|
||||
(179, NULL, '788', 'TN', 'TUN', NOW(), NOW()),
|
||||
(180, NULL, '795', 'TM', 'TKM', NOW(), NOW()),
|
||||
(181, NULL, '792', 'TR', 'TUR', NOW(), NOW()),
|
||||
(182, NULL, '798', 'TV', 'TUV', NOW(), NOW()),
|
||||
(183, NULL, '804', 'UA', 'UKR', NOW(), NOW()),
|
||||
(184, NULL, '858', 'UY', 'URY', NOW(), NOW()),
|
||||
(185, NULL, '336', 'VA', 'VAT', NOW(), NOW()),
|
||||
(186, NULL, '548', 'VU', 'VUT', NOW(), NOW()),
|
||||
(187, NULL, '862', 'VE', 'VEN', NOW(), NOW()),
|
||||
(188, NULL, '704', 'VN', 'VNM', NOW(), NOW()),
|
||||
(189, NULL, '887', 'YE', 'YEM', NOW(), NOW()),
|
||||
(190, NULL, '807', 'MK', 'MKD', NOW(), NOW()),
|
||||
(191, NULL, '180', 'CD', 'COD', NOW(), NOW()),
|
||||
(192, NULL, '894', 'ZM', 'ZMB', NOW(), NOW()),
|
||||
(193, NULL, '716', 'ZW', 'ZWE', NOW(), NOW()),
|
||||
(196, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(197, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(198, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(199, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(200, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(201, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(202, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(203, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(204, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(205, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(206, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(207, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(208, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(209, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(210, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(211, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(212, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(213, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(214, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(215, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(216, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(217, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(218, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(219, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(220, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(221, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(222, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(223, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(224, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(225, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(226, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(227, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(228, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(229, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(230, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(231, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(232, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(233, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(234, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(235, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(236, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(237, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(238, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(239, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(240, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(241, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(242, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(243, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(244, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(245, NULL, '840', 'US', 'USA', NOW(), NOW()),
|
||||
(246, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(247, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(248, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(249, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(250, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(251, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(252, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(253, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(254, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(255, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(256, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(257, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(258, NULL, '124', 'CA', 'CAN', NOW(), NOW()),
|
||||
(259, NULL, '312', 'GP', 'GLP', NOW(), NOW()),
|
||||
(260, NULL, '254', 'GF', 'GUF', NOW(), NOW()),
|
||||
(261, NULL, '474', 'MQ', 'MTQ', NOW(), NOW()),
|
||||
(262, NULL, '175', 'YT', 'MYT', NOW(), NOW()),
|
||||
(263, NULL, '638', 'RE', 'REU', NOW(), NOW()),
|
||||
(264, NULL, '666', 'PM', 'SPM', NOW(), NOW()),
|
||||
(265, NULL, '540', 'NC', 'NCL', NOW(), NOW()),
|
||||
(266, NULL, '258', 'PF', 'PYF', NOW(), NOW()),
|
||||
(267, NULL, '876', 'WF', 'WLF', NOW(), NOW()),
|
||||
(268, NULL, '840', 'US', 'USA', NOW(), NOW());
|
||||
INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `by_default`, `created_at`, `updated_at`) VALUES
|
||||
(1, NULL, '4', 'AF', 'AFG', 0, NOW(), NOW()),
|
||||
(2, NULL, '710', 'ZA', 'ZAF', 0, NOW(), NOW()),
|
||||
(3, NULL, '8', 'AL', 'ALB', 0, NOW(), NOW()),
|
||||
(4, NULL, '12', 'DZ', 'DZA', 0, NOW(), NOW()),
|
||||
(5, NULL, '276', 'DE', 'DEU', 0, NOW(), NOW()),
|
||||
(6, NULL, '20', 'AD', 'AND', 0, NOW(), NOW()),
|
||||
(7, NULL, '24', 'AO', 'AGO', 0, NOW(), NOW()),
|
||||
(8, NULL, '28', 'AG', 'ATG', 0, NOW(), NOW()),
|
||||
(9, NULL, '682', 'SA', 'SAU', 0, NOW(), NOW()),
|
||||
(10, NULL, '32', 'AR', 'ARG', 0, NOW(), NOW()),
|
||||
(11, NULL, '51', 'AM', 'ARM', 0, NOW(), NOW()),
|
||||
(12, NULL, '36', 'AU', 'AUS', 0, NOW(), NOW()),
|
||||
(13, NULL, '40', 'AT', 'AUT', 0, NOW(), NOW()),
|
||||
(14, NULL, '31', 'AZ', 'AZE', 0, NOW(), NOW()),
|
||||
(15, NULL, '44', 'BS', 'BHS', 0, NOW(), NOW()),
|
||||
(16, NULL, '48', 'BR', 'BHR', 0, NOW(), NOW()),
|
||||
(17, NULL, '50', 'BD', 'BGD', 0, NOW(), NOW()),
|
||||
(18, NULL, '52', 'BB', 'BRB', 0, NOW(), NOW()),
|
||||
(19, NULL, '585', 'PW', 'PLW', 0, NOW(), NOW()),
|
||||
(20, NULL, '56', 'BE', 'BEL', 0, NOW(), NOW()),
|
||||
(21, NULL, '84', 'BL', 'BLZ', 0, NOW(), NOW()),
|
||||
(22, NULL, '204', 'BJ', 'BEN', 0, NOW(), NOW()),
|
||||
(23, NULL, '64', 'BT', 'BTN', 0, NOW(), NOW()),
|
||||
(24, NULL, '112', 'BY', 'BLR', 0, NOW(), NOW()),
|
||||
(25, NULL, '104', 'MM', 'MMR', 0, NOW(), NOW()),
|
||||
(26, NULL, '68', 'BO', 'BOL', 0, NOW(), NOW()),
|
||||
(27, NULL, '70', 'BA', 'BIH', 0, NOW(), NOW()),
|
||||
(28, NULL, '72', 'BW', 'BWA', 0, NOW(), NOW()),
|
||||
(29, NULL, '76', 'BR', 'BRA', 0, NOW(), NOW()),
|
||||
(30, NULL, '96', 'BN', 'BRN', 0, NOW(), NOW()),
|
||||
(31, NULL, '100', 'BG', 'BGR', 0, NOW(), NOW()),
|
||||
(32, NULL, '854', 'BF', 'BFA', 0, NOW(), NOW()),
|
||||
(33, NULL, '108', 'BI', 'BDI', 0, NOW(), NOW()),
|
||||
(34, NULL, '116', 'KH', 'KHM', 0, NOW(), NOW()),
|
||||
(35, NULL, '120', 'CM', 'CMR', 0, NOW(), NOW()),
|
||||
(37, NULL, '132', 'CV', 'CPV', 0, NOW(), NOW()),
|
||||
(38, NULL, '152', 'CL', 'CHL', 0, NOW(), NOW()),
|
||||
(39, NULL, '156', 'CN', 'CHN', 0, NOW(), NOW()),
|
||||
(40, NULL, '196', 'CY', 'CYP', 0, NOW(), NOW()),
|
||||
(41, NULL, '170', 'CO', 'COL', 0, NOW(), NOW()),
|
||||
(42, NULL, '174', 'KM', 'COM', 0, NOW(), NOW()),
|
||||
(43, NULL, '178', 'CG', 'COG', 0, NOW(), NOW()),
|
||||
(44, NULL, '184', 'CK', 'COK', 0, NOW(), NOW()),
|
||||
(45, NULL, '408', 'KP', 'PRK', 0, NOW(), NOW()),
|
||||
(46, NULL, '410', 'KR', 'KOR', 0, NOW(), NOW()),
|
||||
(47, NULL, '188', 'CR', 'CRI', 0, NOW(), NOW()),
|
||||
(48, NULL, '384', 'CI', 'CIV', 0, NOW(), NOW()),
|
||||
(49, NULL, '191', 'HR', 'HRV', 0, NOW(), NOW()),
|
||||
(50, NULL, '192', 'CU', 'CUB', 0, NOW(), NOW()),
|
||||
(51, NULL, '208', 'DK', 'DNK', 0, NOW(), NOW()),
|
||||
(52, NULL, '262', 'DJ', 'DJI', 0, NOW(), NOW()),
|
||||
(53, NULL, '212', 'DM', 'DMA', 0, NOW(), NOW()),
|
||||
(54, NULL, '818', 'EG', 'EGY', 0, NOW(), NOW()),
|
||||
(55, NULL, '784', 'AE', 'ARE', 0, NOW(), NOW()),
|
||||
(56, NULL, '218', 'EC', 'ECU', 0, NOW(), NOW()),
|
||||
(57, NULL, '232', 'ER', 'ERI', 0, NOW(), NOW()),
|
||||
(58, NULL, '724', 'ES', 'ESP', 0, NOW(), NOW()),
|
||||
(59, NULL, '233', 'EE', 'EST', 0, NOW(), NOW()),
|
||||
(61, NULL, '231', 'ET', 'ETH', 0, NOW(), NOW()),
|
||||
(62, NULL, '242', 'FJ', 'FJI', 0, NOW(), NOW()),
|
||||
(63, NULL, '246', 'FI', 'FIN', 0, NOW(), NOW()),
|
||||
(64, NULL, '250', 'FR', 'FRA', 1, NOW(), NOW()),
|
||||
(65, NULL, '266', 'GA', 'GAB', 0, NOW(), NOW()),
|
||||
(66, NULL, '270', 'GM', 'GMB', 0, NOW(), NOW()),
|
||||
(67, NULL, '268', 'GE', 'GEO', 0, NOW(), NOW()),
|
||||
(68, NULL, '288', 'GH', 'GHA', 0, NOW(), NOW()),
|
||||
(69, NULL, '300', 'GR', 'GRC', 0, NOW(), NOW()),
|
||||
(70, NULL, '308', 'GD', 'GRD', 0, NOW(), NOW()),
|
||||
(71, NULL, '320', 'GT', 'GTM', 0, NOW(), NOW()),
|
||||
(72, NULL, '324', 'GN', 'GIN', 0, NOW(), NOW()),
|
||||
(73, NULL, '624', 'GW', 'GNB', 0, NOW(), NOW()),
|
||||
(74, NULL, '226', 'GQ', 'GNQ', 0, NOW(), NOW()),
|
||||
(75, NULL, '328', 'GY', 'GUY', 0, NOW(), NOW()),
|
||||
(76, NULL, '332', 'HT', 'HTI', 0, NOW(), NOW()),
|
||||
(77, NULL, '340', 'HN', 'HND', 0, NOW(), NOW()),
|
||||
(78, NULL, '348', 'HU', 'HUN', 0, NOW(), NOW()),
|
||||
(79, NULL, '356', 'IN', 'IND', 0, NOW(), NOW()),
|
||||
(80, NULL, '360', 'ID', 'IDN', 0, NOW(), NOW()),
|
||||
(81, NULL, '364', 'IR', 'IRN', 0, NOW(), NOW()),
|
||||
(82, NULL, '368', 'IQ', 'IRQ', 0, NOW(), NOW()),
|
||||
(83, NULL, '372', 'IE', 'IRL', 0, NOW(), NOW()),
|
||||
(84, NULL, '352', 'IS', 'ISL', 0, NOW(), NOW()),
|
||||
(85, NULL, '376', 'IL', 'ISR', 0, NOW(), NOW()),
|
||||
(86, NULL, '380', 'IT', 'ITA', 0, NOW(), NOW()),
|
||||
(87, NULL, '388', 'JM', 'JAM', 0, NOW(), NOW()),
|
||||
(88, NULL, '392', 'JP', 'JPN', 0, NOW(), NOW()),
|
||||
(89, NULL, '400', 'JO', 'JOR', 0, NOW(), NOW()),
|
||||
(90, NULL, '398', 'KZ', 'KAZ', 0, NOW(), NOW()),
|
||||
(91, NULL, '404', 'KE', 'KEN', 0, NOW(), NOW()),
|
||||
(92, NULL, '417', 'KG', 'KGZ', 0, NOW(), NOW()),
|
||||
(93, NULL, '296', 'KI', 'KIR', 0, NOW(), NOW()),
|
||||
(94, NULL, '414', 'KW', 'KWT', 0, NOW(), NOW()),
|
||||
(95, NULL, '418', 'LA', 'LAO', 0, NOW(), NOW()),
|
||||
(96, NULL, '426', 'LS', 'LSO', 0, NOW(), NOW()),
|
||||
(97, NULL, '428', 'LV', 'LVA', 0, NOW(), NOW()),
|
||||
(98, NULL, '422', 'LB', 'LBN', 0, NOW(), NOW()),
|
||||
(99, NULL, '430', 'LR', 'LBR', 0, NOW(), NOW()),
|
||||
(100, NULL, '343', 'LY', 'LBY', 0, NOW(), NOW()),
|
||||
(101, NULL, '438', 'LI', 'LIE', 0, NOW(), NOW()),
|
||||
(102, NULL, '440', 'LT', 'LTU', 0, NOW(), NOW()),
|
||||
(103, NULL, '442', 'LU', 'LUX', 0, NOW(), NOW()),
|
||||
(104, NULL, '807', 'MK', 'MKD', 0, NOW(), NOW()),
|
||||
(105, NULL, '450', 'MD', 'MDG', 0, NOW(), NOW()),
|
||||
(106, NULL, '458', 'MY', 'MYS', 0, NOW(), NOW()),
|
||||
(107, NULL, '454', 'MW', 'MWI', 0, NOW(), NOW()),
|
||||
(108, NULL, '462', 'MV', 'MDV', 0, NOW(), NOW()),
|
||||
(109, NULL, '466', 'ML', 'MLI', 0, NOW(), NOW()),
|
||||
(110, NULL, '470', 'MT', 'MLT', 0, NOW(), NOW()),
|
||||
(111, NULL, '504', 'MA', 'MAR', 0, NOW(), NOW()),
|
||||
(112, NULL, '584', 'MH', 'MHL', 0, NOW(), NOW()),
|
||||
(113, NULL, '480', 'MU', 'MUS', 0, NOW(), NOW()),
|
||||
(114, NULL, '478', 'MR', 'MRT', 0, NOW(), NOW()),
|
||||
(115, NULL, '484', 'MX', 'MEX', 0, NOW(), NOW()),
|
||||
(116, NULL, '583', 'FM', 'FSM', 0, NOW(), NOW()),
|
||||
(117, NULL, '498', 'MD', 'MDA', 0, NOW(), NOW()),
|
||||
(118, NULL, '492', 'MC', 'MCO', 0, NOW(), NOW()),
|
||||
(119, NULL, '496', 'MN', 'MNG', 0, NOW(), NOW()),
|
||||
(120, NULL, '508', 'MZ', 'MOZ', 0, NOW(), NOW()),
|
||||
(121, NULL, '516', 'NA', 'NAM', 0, NOW(), NOW()),
|
||||
(122, NULL, '520', 'NR', 'NRU', 0, NOW(), NOW()),
|
||||
(123, NULL, '524', 'NP', 'NPL', 0, NOW(), NOW()),
|
||||
(124, NULL, '558', 'NI', 'NIC', 0, NOW(), NOW()),
|
||||
(125, NULL, '562', 'NE', 'NER', 0, NOW(), NOW()),
|
||||
(126, NULL, '566', 'NG', 'NGA', 0, NOW(), NOW()),
|
||||
(127, NULL, '570', 'NU', 'NIU', 0, NOW(), NOW()),
|
||||
(128, NULL, '578', 'NO', 'NOR', 0, NOW(), NOW()),
|
||||
(129, NULL, '554', 'NZ', 'NZL', 0, NOW(), NOW()),
|
||||
(130, NULL, '512', 'OM', 'OMN', 0, NOW(), NOW()),
|
||||
(131, NULL, '800', 'UG', 'UGA', 0, NOW(), NOW()),
|
||||
(132, NULL, '860', 'UZ', 'UZB', 0, NOW(), NOW()),
|
||||
(133, NULL, '586', 'PK', 'PAK', 0, NOW(), NOW()),
|
||||
(134, NULL, '591', 'PA', 'PAN', 0, NOW(), NOW()),
|
||||
(135, NULL, '598', 'PG', 'PNG', 0, NOW(), NOW()),
|
||||
(136, NULL, '600', 'PY', 'PRY', 0, NOW(), NOW()),
|
||||
(137, NULL, '528', 'NL', 'NLD', 0, NOW(), NOW()),
|
||||
(138, NULL, '604', 'PE', 'PER', 0, NOW(), NOW()),
|
||||
(139, NULL, '608', 'PH', 'PHL', 0, NOW(), NOW()),
|
||||
(140, NULL, '616', 'PL', 'POL', 0, NOW(), NOW()),
|
||||
(141, NULL, '620', 'PT', 'PRT', 0, NOW(), NOW()),
|
||||
(142, NULL, '634', 'QA', 'QAT', 0, NOW(), NOW()),
|
||||
(143, NULL, '140', 'CF', 'CAF', 0, NOW(), NOW()),
|
||||
(144, NULL, '214', 'DO', 'DOM', 0, NOW(), NOW()),
|
||||
(145, NULL, '203', 'CZ', 'CZE', 0, NOW(), NOW()),
|
||||
(146, NULL, '642', 'RO', 'ROU', 0, NOW(), NOW()),
|
||||
(147, NULL, '826', 'GB', 'GBR', 0, NOW(), NOW()),
|
||||
(148, NULL, '643', 'RU', 'RUS', 0, NOW(), NOW()),
|
||||
(149, NULL, '646', 'RW', 'RWA', 0, NOW(), NOW()),
|
||||
(150, NULL, '659', 'KN', 'KNA', 0, NOW(), NOW()),
|
||||
(151, NULL, '662', 'LC', 'LCA', 0, NOW(), NOW()),
|
||||
(152, NULL, '674', 'SM', 'SMR', 0, NOW(), NOW()),
|
||||
(153, NULL, '670', 'VC', 'VCT', 0, NOW(), NOW()),
|
||||
(154, NULL, '90', 'SB', 'SLB', 0, NOW(), NOW()),
|
||||
(155, NULL, '222', 'SV', 'SLV', 0, NOW(), NOW()),
|
||||
(156, NULL, '882', 'WS', 'WSM', 0, NOW(), NOW()),
|
||||
(157, NULL, '678', 'ST', 'STP', 0, NOW(), NOW()),
|
||||
(158, NULL, '686', 'SN', 'SEN', 0, NOW(), NOW()),
|
||||
(159, NULL, '690', 'SC', 'SYC', 0, NOW(), NOW()),
|
||||
(160, NULL, '694', 'SL', 'SLE', 0, NOW(), NOW()),
|
||||
(161, NULL, '702', 'SG', 'SGP', 0, NOW(), NOW()),
|
||||
(162, NULL, '703', 'SK', 'SVK', 0, NOW(), NOW()),
|
||||
(163, NULL, '705', 'SI', 'SVN', 0, NOW(), NOW()),
|
||||
(164, NULL, '706', 'SO', 'SOM', 0, NOW(), NOW()),
|
||||
(165, NULL, '729', 'SD', 'SDN', 0, NOW(), NOW()),
|
||||
(166, NULL, '144', 'LK', 'LKA', 0, NOW(), NOW()),
|
||||
(167, NULL, '752', 'SE', 'SWE', 0, NOW(), NOW()),
|
||||
(168, NULL, '756', 'CH', 'CHE', 0, NOW(), NOW()),
|
||||
(169, NULL, '740', 'SR', 'SUR', 0, NOW(), NOW()),
|
||||
(170, NULL, '748', 'SZ', 'SWZ', 0, NOW(), NOW()),
|
||||
(171, NULL, '760', 'SY', 'SYR', 0, NOW(), NOW()),
|
||||
(172, NULL, '762', 'TJ', 'TJK', 0, NOW(), NOW()),
|
||||
(173, NULL, '834', 'TZ', 'TZA', 0, NOW(), NOW()),
|
||||
(174, NULL, '148', 'TD', 'TCD', 0, NOW(), NOW()),
|
||||
(175, NULL, '764', 'TH', 'THA', 0, NOW(), NOW()),
|
||||
(176, NULL, '768', 'TG', 'TGO', 0, NOW(), NOW()),
|
||||
(177, NULL, '776', 'TO', 'TON', 0, NOW(), NOW()),
|
||||
(178, NULL, '780', 'TT', 'TTO', 0, NOW(), NOW()),
|
||||
(179, NULL, '788', 'TN', 'TUN', 0, NOW(), NOW()),
|
||||
(180, NULL, '795', 'TM', 'TKM', 0, NOW(), NOW()),
|
||||
(181, NULL, '792', 'TR', 'TUR', 0, NOW(), NOW()),
|
||||
(182, NULL, '798', 'TV', 'TUV', 0, NOW(), NOW()),
|
||||
(183, NULL, '804', 'UA', 'UKR', 0, NOW(), NOW()),
|
||||
(184, NULL, '858', 'UY', 'URY', 0, NOW(), NOW()),
|
||||
(185, NULL, '336', 'VA', 'VAT', 0, NOW(), NOW()),
|
||||
(186, NULL, '548', 'VU', 'VUT', 0, NOW(), NOW()),
|
||||
(187, NULL, '862', 'VE', 'VEN', 0, NOW(), NOW()),
|
||||
(188, NULL, '704', 'VN', 'VNM', 0, NOW(), NOW()),
|
||||
(189, NULL, '887', 'YE', 'YEM', 0, NOW(), NOW()),
|
||||
(190, NULL, '807', 'MK', 'MKD', 0, NOW(), NOW()),
|
||||
(191, NULL, '180', 'CD', 'COD', 0, NOW(), NOW()),
|
||||
(192, NULL, '894', 'ZM', 'ZMB', 0, NOW(), NOW()),
|
||||
(193, NULL, '716', 'ZW', 'ZWE', 0, NOW(), NOW()),
|
||||
(196, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(197, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(198, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(199, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(200, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(201, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(202, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(203, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(204, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(205, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(206, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(207, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(208, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(209, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(210, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(211, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(212, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(213, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(214, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(215, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(216, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(217, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(218, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(219, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(220, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(221, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(222, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(223, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(224, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(225, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(226, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(227, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(228, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(229, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(230, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(231, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(232, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(233, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(234, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(235, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(236, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(237, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(238, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(239, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(240, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(241, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(242, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(243, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(244, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(245, NULL, '840', 'US', 'USA', 0, NOW(), NOW()),
|
||||
(246, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(247, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(248, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(249, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(250, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(251, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(252, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(253, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(254, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(255, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(256, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(257, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(258, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()),
|
||||
(259, NULL, '312', 'GP', 'GLP', 0, NOW(), NOW()),
|
||||
(260, NULL, '254', 'GF', 'GUF', 0, NOW(), NOW()),
|
||||
(261, NULL, '474', 'MQ', 'MTQ', 0, NOW(), NOW()),
|
||||
(262, NULL, '175', 'YT', 'MYT', 0, NOW(), NOW()),
|
||||
(263, NULL, '638', 'RE', 'REU', 0, NOW(), NOW()),
|
||||
(264, NULL, '666', 'PM', 'SPM', 0, NOW(), NOW()),
|
||||
(265, NULL, '540', 'NC', 'NCL', 0, NOW(), NOW()),
|
||||
(266, NULL, '258', 'PF', 'PYF', 0, NOW(), NOW()),
|
||||
(267, NULL, '876', 'WF', 'WLF', 0, NOW(), NOW()),
|
||||
(268, NULL, '840', 'US', 'USA', 0, NOW(), NOW());
|
||||
|
||||
INSERT INTO `country_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(1, 'en_US', 'Afghanistan', '', '', ''),
|
||||
|
||||
@@ -21,7 +21,7 @@ CREATE TABLE `category`
|
||||
`version_created_at` DATETIME,
|
||||
`version_created_by` VARCHAR(100),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product
|
||||
@@ -54,7 +54,7 @@ CREATE TABLE `product`
|
||||
CONSTRAINT `fk_product_template1`
|
||||
FOREIGN KEY (`template_id`)
|
||||
REFERENCES `template` (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_category
|
||||
@@ -81,7 +81,7 @@ CREATE TABLE `product_category`
|
||||
REFERENCES `category` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- country
|
||||
@@ -96,6 +96,7 @@ CREATE TABLE `country`
|
||||
`isocode` VARCHAR(4) NOT NULL,
|
||||
`isoalpha2` VARCHAR(2),
|
||||
`isoalpha3` VARCHAR(4),
|
||||
`by_default` TINYINT,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -105,7 +106,7 @@ CREATE TABLE `country`
|
||||
REFERENCES `area` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE SET NULL
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- tax
|
||||
@@ -121,7 +122,7 @@ CREATE TABLE `tax`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- tax_rule
|
||||
@@ -135,7 +136,7 @@ CREATE TABLE `tax_rule`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- tax_rule_country
|
||||
@@ -170,7 +171,7 @@ CREATE TABLE `tax_rule_country`
|
||||
REFERENCES `country` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- feature
|
||||
@@ -186,7 +187,7 @@ CREATE TABLE `feature`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- feature_av
|
||||
@@ -208,7 +209,7 @@ CREATE TABLE `feature_av`
|
||||
REFERENCES `feature` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- feature_product
|
||||
@@ -245,7 +246,7 @@ CREATE TABLE `feature_product`
|
||||
REFERENCES `feature_av` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- feature_template
|
||||
@@ -271,7 +272,7 @@ CREATE TABLE `feature_template`
|
||||
CONSTRAINT `fk_feature_template`
|
||||
FOREIGN KEY (`template_id`)
|
||||
REFERENCES `template` (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- attribute
|
||||
@@ -286,7 +287,7 @@ CREATE TABLE `attribute`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- attribute_av
|
||||
@@ -308,7 +309,7 @@ CREATE TABLE `attribute_av`
|
||||
REFERENCES `attribute` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- attribute_combination
|
||||
@@ -340,7 +341,7 @@ CREATE TABLE `attribute_combination`
|
||||
CONSTRAINT `fk_attribute_combination_product_sale_elements_id`
|
||||
FOREIGN KEY (`product_sale_elements_id`)
|
||||
REFERENCES `product_sale_elements` (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_sale_elements
|
||||
@@ -367,7 +368,7 @@ CREATE TABLE `product_sale_elements`
|
||||
REFERENCES `product` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- attribute_template
|
||||
@@ -393,7 +394,7 @@ CREATE TABLE `attribute_template`
|
||||
CONSTRAINT `fk_attribute_template`
|
||||
FOREIGN KEY (`template_id`)
|
||||
REFERENCES `template` (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- config
|
||||
@@ -412,7 +413,7 @@ CREATE TABLE `config`
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `name_UNIQUE` (`name`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- customer
|
||||
@@ -446,7 +447,7 @@ CREATE TABLE `customer`
|
||||
REFERENCES `customer_title` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- address
|
||||
@@ -493,7 +494,7 @@ CREATE TABLE `address`
|
||||
REFERENCES `country` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- customer_title
|
||||
@@ -509,7 +510,7 @@ CREATE TABLE `customer_title`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- lang
|
||||
@@ -535,7 +536,7 @@ CREATE TABLE `lang`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- folder
|
||||
@@ -555,7 +556,7 @@ CREATE TABLE `folder`
|
||||
`version_created_at` DATETIME,
|
||||
`version_created_by` VARCHAR(100),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content
|
||||
@@ -574,7 +575,7 @@ CREATE TABLE `content`
|
||||
`version_created_at` DATETIME,
|
||||
`version_created_by` VARCHAR(100),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_image
|
||||
@@ -597,7 +598,7 @@ CREATE TABLE `product_image`
|
||||
REFERENCES `product` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_document
|
||||
@@ -620,7 +621,7 @@ CREATE TABLE `product_document`
|
||||
REFERENCES `product` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order
|
||||
@@ -679,7 +680,7 @@ CREATE TABLE `order`
|
||||
REFERENCES `order_status` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE SET NULL
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- currency
|
||||
@@ -698,7 +699,7 @@ CREATE TABLE `currency`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order_address
|
||||
@@ -723,7 +724,7 @@ CREATE TABLE `order_address`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order_product
|
||||
@@ -752,7 +753,7 @@ CREATE TABLE `order_product`
|
||||
REFERENCES `order` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order_status
|
||||
@@ -767,7 +768,7 @@ CREATE TABLE `order_status`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order_feature
|
||||
@@ -790,7 +791,7 @@ CREATE TABLE `order_feature`
|
||||
REFERENCES `order_product` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- module
|
||||
@@ -810,7 +811,7 @@ CREATE TABLE `module`
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `code_UNIQUE` (`code`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- accessory
|
||||
@@ -839,7 +840,7 @@ CREATE TABLE `accessory`
|
||||
REFERENCES `product` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- area
|
||||
@@ -855,7 +856,7 @@ CREATE TABLE `area`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- delivzone
|
||||
@@ -877,7 +878,7 @@ CREATE TABLE `delivzone`
|
||||
REFERENCES `area` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE SET NULL
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- group
|
||||
@@ -893,7 +894,7 @@ CREATE TABLE `group`
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `code_UNIQUE` (`code`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- resource
|
||||
@@ -909,7 +910,7 @@ CREATE TABLE `resource`
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `code_UNIQUE` (`code`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- admin
|
||||
@@ -931,7 +932,7 @@ CREATE TABLE `admin`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- admin_group
|
||||
@@ -959,7 +960,7 @@ CREATE TABLE `admin_group`
|
||||
REFERENCES `admin` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- group_resource
|
||||
@@ -989,7 +990,7 @@ CREATE TABLE `group_resource`
|
||||
REFERENCES `resource` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- group_module
|
||||
@@ -1018,7 +1019,7 @@ CREATE TABLE `group_module`
|
||||
REFERENCES `module` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- message
|
||||
@@ -1038,7 +1039,7 @@ CREATE TABLE `message`
|
||||
`version_created_by` VARCHAR(100),
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `name_UNIQUE` (`name`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- coupon
|
||||
@@ -1074,7 +1075,7 @@ CREATE TABLE `coupon`
|
||||
INDEX `idx_is_removing_postage` (`is_removing_postage`),
|
||||
INDEX `idx_max_usage` (`max_usage`),
|
||||
INDEX `idx_is_available_on_special_offers` (`is_available_on_special_offers`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- coupon_order
|
||||
@@ -1096,7 +1097,7 @@ CREATE TABLE `coupon_order`
|
||||
REFERENCES `order` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- admin_log
|
||||
@@ -1115,7 +1116,7 @@ CREATE TABLE `admin_log`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content_folder
|
||||
@@ -1142,7 +1143,7 @@ CREATE TABLE `content_folder`
|
||||
REFERENCES `folder` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- cart
|
||||
@@ -1179,7 +1180,7 @@ CREATE TABLE `cart`
|
||||
CONSTRAINT `fk_cart_currency_id`
|
||||
FOREIGN KEY (`currency_id`)
|
||||
REFERENCES `currency` (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- cart_item
|
||||
@@ -1214,7 +1215,7 @@ CREATE TABLE `cart_item`
|
||||
CONSTRAINT `fk_cart_item_product_sale_elements_id`
|
||||
FOREIGN KEY (`product_sale_elements_id`)
|
||||
REFERENCES `product_sale_elements` (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_price
|
||||
@@ -1241,7 +1242,7 @@ CREATE TABLE `product_price`
|
||||
FOREIGN KEY (`currency_id`)
|
||||
REFERENCES `currency` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_image
|
||||
@@ -1264,7 +1265,7 @@ CREATE TABLE `category_image`
|
||||
REFERENCES `category` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- folder_image
|
||||
@@ -1287,7 +1288,7 @@ CREATE TABLE `folder_image`
|
||||
REFERENCES `folder` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content_image
|
||||
@@ -1310,7 +1311,7 @@ CREATE TABLE `content_image`
|
||||
REFERENCES `content` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_document
|
||||
@@ -1333,7 +1334,7 @@ CREATE TABLE `category_document`
|
||||
REFERENCES `category` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content_document
|
||||
@@ -1356,7 +1357,7 @@ CREATE TABLE `content_document`
|
||||
REFERENCES `content` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- folder_document
|
||||
@@ -1379,7 +1380,7 @@ CREATE TABLE `folder_document`
|
||||
REFERENCES `folder` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_associated_content
|
||||
@@ -1408,7 +1409,7 @@ CREATE TABLE `product_associated_content`
|
||||
REFERENCES `content` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_associated_content
|
||||
@@ -1437,7 +1438,7 @@ CREATE TABLE `category_associated_content`
|
||||
REFERENCES `content` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- rewriting_url
|
||||
@@ -1464,7 +1465,7 @@ CREATE TABLE `rewriting_url`
|
||||
REFERENCES `rewriting_url` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- rewriting_argument
|
||||
@@ -1486,7 +1487,7 @@ CREATE TABLE `rewriting_argument`
|
||||
REFERENCES `rewriting_url` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- template
|
||||
@@ -1500,7 +1501,7 @@ CREATE TABLE `template`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_i18n
|
||||
@@ -1521,7 +1522,7 @@ CREATE TABLE `category_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `category` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_i18n
|
||||
@@ -1542,7 +1543,7 @@ CREATE TABLE `product_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `product` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- country_i18n
|
||||
@@ -1563,7 +1564,7 @@ CREATE TABLE `country_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `country` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- tax_i18n
|
||||
@@ -1582,7 +1583,7 @@ CREATE TABLE `tax_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `tax` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- tax_rule_i18n
|
||||
@@ -1601,7 +1602,7 @@ CREATE TABLE `tax_rule_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `tax_rule` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- feature_i18n
|
||||
@@ -1622,7 +1623,7 @@ CREATE TABLE `feature_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `feature` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- feature_av_i18n
|
||||
@@ -1643,7 +1644,7 @@ CREATE TABLE `feature_av_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `feature_av` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- attribute_i18n
|
||||
@@ -1664,7 +1665,7 @@ CREATE TABLE `attribute_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `attribute` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- attribute_av_i18n
|
||||
@@ -1685,7 +1686,7 @@ CREATE TABLE `attribute_av_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `attribute_av` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- config_i18n
|
||||
@@ -1706,7 +1707,7 @@ CREATE TABLE `config_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `config` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- customer_title_i18n
|
||||
@@ -1725,7 +1726,7 @@ CREATE TABLE `customer_title_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `customer_title` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- folder_i18n
|
||||
@@ -1746,7 +1747,7 @@ CREATE TABLE `folder_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `folder` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content_i18n
|
||||
@@ -1767,7 +1768,7 @@ CREATE TABLE `content_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `content` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_image_i18n
|
||||
@@ -1788,7 +1789,7 @@ CREATE TABLE `product_image_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `product_image` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_document_i18n
|
||||
@@ -1809,7 +1810,7 @@ CREATE TABLE `product_document_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `product_document` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- currency_i18n
|
||||
@@ -1827,7 +1828,7 @@ CREATE TABLE `currency_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `currency` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order_status_i18n
|
||||
@@ -1848,7 +1849,7 @@ CREATE TABLE `order_status_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `order_status` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- module_i18n
|
||||
@@ -1869,7 +1870,7 @@ CREATE TABLE `module_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `module` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- group_i18n
|
||||
@@ -1890,7 +1891,7 @@ CREATE TABLE `group_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `group` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- resource_i18n
|
||||
@@ -1911,7 +1912,7 @@ CREATE TABLE `resource_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `resource` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- message_i18n
|
||||
@@ -1932,7 +1933,7 @@ CREATE TABLE `message_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `message` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- coupon_i18n
|
||||
@@ -1952,7 +1953,7 @@ CREATE TABLE `coupon_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `coupon` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_image_i18n
|
||||
@@ -1973,7 +1974,7 @@ CREATE TABLE `category_image_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `category_image` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- folder_image_i18n
|
||||
@@ -1994,7 +1995,7 @@ CREATE TABLE `folder_image_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `folder_image` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content_image_i18n
|
||||
@@ -2015,7 +2016,7 @@ CREATE TABLE `content_image_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `content_image` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_document_i18n
|
||||
@@ -2036,7 +2037,7 @@ CREATE TABLE `category_document_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `category_document` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content_document_i18n
|
||||
@@ -2057,7 +2058,7 @@ CREATE TABLE `content_document_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `content_document` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- folder_document_i18n
|
||||
@@ -2078,7 +2079,7 @@ CREATE TABLE `folder_document_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `folder_document` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- template_i18n
|
||||
@@ -2096,7 +2097,7 @@ CREATE TABLE `template_i18n`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `template` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_version
|
||||
@@ -2120,7 +2121,7 @@ CREATE TABLE `category_version`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `category` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- product_version
|
||||
@@ -2146,7 +2147,7 @@ CREATE TABLE `product_version`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `product` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- folder_version
|
||||
@@ -2170,7 +2171,7 @@ CREATE TABLE `folder_version`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `folder` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- content_version
|
||||
@@ -2193,7 +2194,7 @@ CREATE TABLE `content_version`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `content` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- message_version
|
||||
@@ -2216,7 +2217,7 @@ CREATE TABLE `message_version`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `message` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- coupon_version
|
||||
@@ -2246,7 +2247,7 @@ CREATE TABLE `coupon_version`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `coupon` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database defaultIdMethod="native" name="thelia">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Charset" value="utf8"/>
|
||||
</vendor>
|
||||
<table name="category" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="parent" type="INTEGER" />
|
||||
@@ -84,6 +80,7 @@
|
||||
<column name="description" type="CLOB" />
|
||||
<column name="chapo" type="LONGVARCHAR" />
|
||||
<column name="postscriptum" type="LONGVARCHAR" />
|
||||
<column name="by_default" type="TINYINT" />
|
||||
<foreign-key foreignTable="area" name="fk_country_area_id" onDelete="SET NULL" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="area_id" />
|
||||
</foreign-key>
|
||||
|
||||
@@ -206,7 +206,6 @@
|
||||
- <a href="http://www.openstudio.fr/" target="_blank">{intl l='Édité par OpenStudio'}</a>
|
||||
- <a href="http://forum.thelia.net/" target="_blank">{intl l='Forum Thelia'}</a>
|
||||
- <a href="http://contrib.thelia.net/" target="_blank">{intl l='Contributions Thelia'}</a>
|
||||
<span class="pull-right">{intl l='interface par <a target="_blank" href="http://www.steaw-webdesign.com/">Steaw-Webdesign</a>'}</span>
|
||||
</p>
|
||||
|
||||
{module_include location='in_footer'}
|
||||
|
||||
@@ -1,15 +1,102 @@
|
||||
<div class="form-group">
|
||||
{ifloop rel="free_attributes"}
|
||||
<select name="free_attributes" id="free_attributes" class="form-control">
|
||||
<option value="">Select an attribute...</option>
|
||||
{loop name="free_attributes" type="attribute" template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="help-block">{intl l='Select an attribute and click (+) to add it to this template'}</span>
|
||||
<form action="{url path='/admin/configuration/templates/attributes/add'}">
|
||||
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
|
||||
<div class="input-group">
|
||||
<select required="required" name="attribute_id" id="attribute_id" class="form-control">
|
||||
<option value="">Select an attribute...</option>
|
||||
{loop name="free_attributes" type="attribute" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<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 an attribute and click (+) to add it to this template'}</span>
|
||||
</form>
|
||||
|
||||
{/ifloop}
|
||||
{elseloop rel="free_attributes"}
|
||||
<div class="alert alert-info">There is currently no available attributes.</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Attribute title'}</th>
|
||||
|
||||
{module_include location='template_attributes_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_attributes" type="attribute" template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='template_attributes_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.attribute.delete"}
|
||||
<a class="btn btn-default btn-xs delete-attribute" title="{intl l='Delete this attribute'}" href="#delete_attribute_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_attributes"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no attributes"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{* Delete value confirmation dialog *}
|
||||
|
||||
{capture "delete_attribute_dialog"}
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
<input type="hidden" name="attribute_id" id="attribute_delete_id" value="" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_attribute_dialog"
|
||||
dialog_title = {intl l="Remove attribute"}
|
||||
dialog_message = {intl l="Do you really want to remove this attribute from the template ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/templates/attributes/delete'}
|
||||
form_content = {$smarty.capture.delete_attribute_dialog nofilter}
|
||||
}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper attribute ID in delete attribute from
|
||||
$('a.delete-attribute').click(function(ev) {
|
||||
$('#attribute_delete_id').val($(this).data('id'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
102
templates/admin/default/ajax/template-feature-list.html
Normal file
102
templates/admin/default/ajax/template-feature-list.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<div class="form-group">
|
||||
{ifloop rel="free_features"}
|
||||
<form action="{url path='/admin/configuration/templates/features/add'}">
|
||||
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
|
||||
<div class="input-group">
|
||||
<select required="required" name="feature_id" id="feature_id" class="form-control">
|
||||
<option value="">Select an feature...</option>
|
||||
{loop name="free_features" type="feature" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<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 an feature and click (+) to add it to this template'}</span>
|
||||
</form>
|
||||
|
||||
{/ifloop}
|
||||
{elseloop rel="free_features"}
|
||||
<div class="alert alert-info">There is currently no available features.</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Feature title'}</th>
|
||||
|
||||
{module_include location='template_features_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_features" type="feature" template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='template_features_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.feature.delete"}
|
||||
<a class="btn btn-default btn-xs delete-feature" title="{intl l='Delete this feature'}" href="#delete_feature_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_features"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{* Delete value confirmation dialog *}
|
||||
|
||||
{capture "delete_feature_dialog"}
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
<input type="hidden" name="feature_id" id="feature_delete_id" value="" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_feature_dialog"
|
||||
dialog_title = {intl l="Remove feature"}
|
||||
dialog_message = {intl l="Do you really want to remove this feature from the template ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/templates/features/delete'}
|
||||
form_content = {$smarty.capture.delete_feature_dialog nofilter}
|
||||
}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper feature ID in delete feature from
|
||||
$('a.delete-feature').click(function(ev) {
|
||||
$('#feature_delete_id').val($(this).data('id'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -1,11 +1,26 @@
|
||||
{* this temlate is loaded via Ajax in the login page, to prevent login page slowdown *}
|
||||
|
||||
{loop type="feed" name="thelia_feeds" url="http://thelia.net/Flux-rss.html?id_rubrique=8" limit="3"}
|
||||
<div class="span4 feed-list-item">
|
||||
<h3>{$DATE}</h3>
|
||||
<h2><a href="{$URL}" target="_blank" title="{intl l='Lire la suite'}">{$TITLE|strip_tags nofilter}</a></h2>
|
||||
{* we use unescape:"htmlall" to unescape var before truncate, to prevent a cut in the middel of an HTML entity, eg &ea... *}
|
||||
<p>{$DESCRIPTION|strip_tags|unescape:"htmlall"|truncate:250:"...":true nofilter}</p>
|
||||
<p><a class="btn" href="{$URL}" target="_blank">{intl l='Lire la suite »'}</a></p>
|
||||
</div>
|
||||
{/loop}
|
||||
<div class="panel-group" id="accordion">
|
||||
{loop type="feed" name="thelia_feeds" url="http://thelia.net/Flux-rss.html?id_rubrique=8" limit="3"}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse-{$LOOP_COUNT}">
|
||||
{$TITLE|strip_tags nofilter} - {$DATE}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="collapse-{$LOOP_COUNT}" class="panel-collapse collapse {if $LOOP_COUNT == 1}in{/if}">
|
||||
<div class="panel-body">
|
||||
{* we use unescape:"htmlall" to unescape var before truncate, to prevent a cut in the middel of an HTML entity, eg &ea... *}
|
||||
<p>{$DESCRIPTION|strip_tags|unescape:"htmlall"|truncate:250:"...":true nofilter}</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="{$URL}" target="_blank" class="btn btn-defaut btn-primary"><span class="glyphicon glyphicon-book"></span> {intl l='Lire la suite'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
</div>
|
||||
220
templates/admin/default/countries.html
Normal file
220
templates/admin/default/countries.html
Normal file
@@ -0,0 +1,220 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Countries'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.countries.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="countries">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/countries'}">{intl l="Countries"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='countries_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption class="clearfix">
|
||||
{intl l='Countries'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new country'}" href="#add_country_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Default</th>
|
||||
<th>Shop</th>
|
||||
<th>N° ISO</th>
|
||||
<th>ISO Code</th>
|
||||
|
||||
{module_include location='countries_table_header'}
|
||||
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<td>{$TITLE}</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
|
||||
</div>
|
||||
</td>
|
||||
<td>{$ISOCODE}</td>
|
||||
<td>{$ISOALPHA3}</td>
|
||||
|
||||
{module_include location='countries_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
|
||||
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"}
|
||||
<a class="btn btn-default btn-xs country-delete" title="{intl l='Delete this country'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{elseloop rel="countries"}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No country has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{module_include location='countries_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Adding a new Country *}
|
||||
|
||||
{form name="thelia.admin.country.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "country_creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/country/update' country_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='area'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isocode'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha2'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 2'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha3'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='country_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "add_country_dialog"
|
||||
dialog_title = {intl l="Create a new country"}
|
||||
dialog_body = {$smarty.capture.country_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this country"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path='/admin/configuration/countries/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="country_id" id="country_delete_id" value="" />
|
||||
|
||||
{module_include location='country_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_dialog"
|
||||
dialog_title = {intl l="Delete country"}
|
||||
dialog_message = {intl l="Do you really want to delete this country ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/countries/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
|
||||
<script>
|
||||
// Toogle switch on input radio
|
||||
$('.switch-radio').on('switch-change', function () {
|
||||
$('.switch-radio').bootstrapSwitch('toggleRadioState');
|
||||
});
|
||||
</script>
|
||||
{/javascripts}
|
||||
|
||||
{/block}
|
||||
147
templates/admin/default/country-edit.html
Normal file
147
templates/admin/default/country-edit.html
Normal file
@@ -0,0 +1,147 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Edit a country'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.countries.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="countries edit-country">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop name="country_edit" type="country" id="$country_id" backend_context="1" lang="$edit_language_id"}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/countries'}">{intl l="Countries"}</a></li>
|
||||
<li>{intl l='Editing country "%name"' name="{$TITLE}"}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Edit country $TITLE"}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="thelia.admin.country.modification"}
|
||||
<form method="POST" action="{url path='/admin/configuration/countries/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{* Be sure to get the country ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="country_id" value="{$country_id}" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/countries'}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_field form=$form field='area'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isocode'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha2'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 2'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha3'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Translations"}
|
||||
</div>
|
||||
|
||||
{loop type="lang" name="lang"}
|
||||
<div class="col-md-3">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}"> {$TITLE}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{form_field form=$form field='title'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='short-description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country short description'}"></textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country description'}"></textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
<div class="col-md-12 text-right">
|
||||
<button type="submit" class="btn btn-default btn-primary" title="{intl l='Add a new country'}">
|
||||
{intl l="Save"}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="country_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, country ID=$country_id was not found."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -10,11 +10,13 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>{intl l="Oops! An Error Occurred"}</h1>
|
||||
<div class="general-block-decorator text-center">
|
||||
<h1>{intl l="Oops! An Error Occurred"}</h1>
|
||||
|
||||
{block name="error-message"}<div class="alert alert-error">{$error_message}</div>{/block}
|
||||
|
||||
<p><i class="glyphicon glyphicon-backward"></i> <a href="{url path='/admin/home'}">{intl l="Go to administration home"}</a></p>
|
||||
{block name="error-message"}<p>{$error_message}</p>{/block}
|
||||
|
||||
<a href="{url path='/admin/home'}" class="btn btn-default btn-info btn-lg"><span class="glyphicon glyphicon-home"></span> {intl l="Go to administration home"}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,52 +6,74 @@
|
||||
{block name="page-title"}{intl l='Welcome'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="loginpage">
|
||||
<div class="loginpage">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator clearfix">
|
||||
|
||||
<h1 class="title title-without-tabs">{intl l='Thelia Back Office'}</h1>
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
<div class="col-md-6">
|
||||
{module_include location='index_top'}
|
||||
|
||||
{form name="thelia.admin.login"}
|
||||
<form action="{url path='/admin/checklogin'}" method="post" {form_enctype form=$form}>
|
||||
|
||||
{module_include location='index_top'}
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>{intl l='Thelia Back Office'}</h1>
|
||||
<fieldset>
|
||||
<legend>{intl l='Login'}</legend>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form name="thelia.admin.login"}
|
||||
<form action="{url path='/admin/checklogin'}" method="post" class="well form-inline" {form_enctype form=$form}>
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin'}" /> {* on success, redirect to /admin *}
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='username'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Username'}" autofocus>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='password'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
|
||||
<input type="password" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Password'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
{form_field form=$form field='remember_me'}
|
||||
<div class="checkbox">
|
||||
<label for="{$label_attr.for}">
|
||||
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="{$value}" {$attr} {if $options.checked}checked="checked"{/if}/> {intl l="{$label}"}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-off"></span> {intl l='Login'}</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin'}" /> {* on success, redirect to /admin *}
|
||||
{/form_field}
|
||||
{module_include location='index_middle'}
|
||||
</div>
|
||||
|
||||
{form_field form=$form field='username'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" id="username" class="input" placeholder="{intl l='User name'}" name="{$name}" value="{$value}" {$attr} />
|
||||
</span>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="password" id="password" class="input" placeholder="{intl l='Password'}" name="{$name}" {$attr} />
|
||||
</span>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='remember_me'}
|
||||
<label class="checkbox"> <input type="checkbox" name="{$name}" value="{$value}" {$attr} {if $options.checked}checked="checked"{/if}/> {intl l='Remember me'}</label>
|
||||
{/form_field}
|
||||
|
||||
<span class="pull-right"><button type="submit" class="btn btn-default btn-primary">{intl l='Login'} <span class="glyphicon glyphicon-play"></span></button></span>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
|
||||
{module_include location='index_middle'}
|
||||
|
||||
<div class="row feed-list">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="alert alert-info">{intl l="Loading Thelia lastest news..."}</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row feed-list">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="alert alert-info">{intl l="Loading Thelia lastest news..."}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,6 +81,7 @@
|
||||
{module_include location='index_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
@@ -108,8 +108,8 @@
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#attribute_list_management').load("{admin_viewurl view='ajax/template-attribute-list' template_id=$template_id}");
|
||||
$('#feature_list_management').load("{admin_viewurl view='ajax/template-feature-list' template_id=$template_id}");
|
||||
$('#feature_list_management').load("{url path='/admin/configuration/templates/features/list' template_id=$template_id}");
|
||||
$('#attribute_list_management').load("{url path='/admin/configuration/templates/attributes/list' template_id=$template_id}");
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user