Merge branch 'master' into modules
Conflicts: core/lib/Thelia/Core/Template/Assets/AsseticAssetManager.php core/lib/Thelia/Core/Template/Smarty/SmartyParser.php
This commit is contained in:
@@ -21,7 +21,7 @@ if (!file_exists(THELIA_CONF_DIR . 'database.yml') && !defined('THELIA_INSTALL_M
|
|||||||
define('THELIA_INSTALL_MODE', true);
|
define('THELIA_INSTALL_MODE', true);
|
||||||
} else {
|
} else {
|
||||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||||
header('location: '.$request->getSchemeAndHttpHost() . '/install');
|
header('location: '.$request->getUriForPath() . '/install');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,9 +82,15 @@ class Message extends BaseAction implements EventSubscriberInterface
|
|||||||
|
|
||||||
->setTitle($event->getTitle())
|
->setTitle($event->getTitle())
|
||||||
->setSubject($event->getSubject())
|
->setSubject($event->getSubject())
|
||||||
|
|
||||||
->setHtmlMessage($event->getHtmlMessage())
|
->setHtmlMessage($event->getHtmlMessage())
|
||||||
->setTextMessage($event->getTextMessage())
|
->setTextMessage($event->getTextMessage())
|
||||||
|
|
||||||
|
->setHtmlLayoutFileName($event->getHtmlLayoutFileName())
|
||||||
|
->setHtmlTemplateFileName($event->getHtmlTemplateFileName())
|
||||||
|
->setTextLayoutFileName($event->getTextLayoutFileName())
|
||||||
|
->setTextTemplateFileName($event->getTextTemplateFileName())
|
||||||
|
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
$event->setMessage($message);
|
$event->setMessage($message);
|
||||||
|
|||||||
@@ -289,7 +289,17 @@ class Order extends BaseAction implements EventSubscriberInterface
|
|||||||
public function sendOrderEmail(OrderEvent $event)
|
public function sendOrderEmail(OrderEvent $event)
|
||||||
{
|
{
|
||||||
$contact_email = ConfigQuery::read('contact_email');
|
$contact_email = ConfigQuery::read('contact_email');
|
||||||
|
|
||||||
if($contact_email) {
|
if($contact_email) {
|
||||||
|
|
||||||
|
$message = MessageQuery::create()
|
||||||
|
->filterByName('order_confirmation')
|
||||||
|
->findOne();
|
||||||
|
|
||||||
|
if (false === $message) {
|
||||||
|
throw new \Exception("Failed to load message 'order_confirmation'.");
|
||||||
|
}
|
||||||
|
|
||||||
$order = $event->getOrder();
|
$order = $event->getOrder();
|
||||||
$customer = $order->getCustomer();
|
$customer = $order->getCustomer();
|
||||||
|
|
||||||
@@ -298,24 +308,16 @@ class Order extends BaseAction implements EventSubscriberInterface
|
|||||||
$parser->assign('order_id', $order->getId());
|
$parser->assign('order_id', $order->getId());
|
||||||
$parser->assign('order_ref', $order->getRef());
|
$parser->assign('order_ref', $order->getRef());
|
||||||
|
|
||||||
$message = MessageQuery::create()
|
|
||||||
->filterByName('order_confirmation')
|
|
||||||
->findOne();
|
|
||||||
|
|
||||||
$message
|
$message
|
||||||
->setLocale($order->getLang()->getLocale());
|
->setLocale($order->getLang()->getLocale());
|
||||||
|
|
||||||
$subject = $parser->fetch(sprintf("string:%s", $message->getSubject()));
|
$instance = \Swift_Message::newInstance()
|
||||||
$htmlMessage = $parser->fetch(sprintf("string:%s", $message->getHtmlMessage()));
|
|
||||||
$textMessage = $parser->fetch(sprintf("string:%s", $message->getTextMessage()));
|
|
||||||
|
|
||||||
$instance = \Swift_Message::newInstance($subject)
|
|
||||||
->addTo($customer->getEmail(), $customer->getFirstname()." ".$customer->getLastname())
|
->addTo($customer->getEmail(), $customer->getFirstname()." ".$customer->getLastname())
|
||||||
->addFrom(ConfigQuery::read('contact_email'), ConfigQuery::read('company_name'))
|
->addFrom(ConfigQuery::read('contact_email'), ConfigQuery::read('company_name'))
|
||||||
;
|
;
|
||||||
$instance
|
|
||||||
->setBody($htmlMessage, 'text/html')
|
// Build subject and body
|
||||||
->addPart($textMessage, 'text/plain');
|
$message->build($parser, $instance);
|
||||||
|
|
||||||
$mail = $this->getMailer()->send($instance);
|
$mail = $this->getMailer()->send($instance);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,7 @@
|
|||||||
<form name="thelia.lang.defaultBehavior" class="Thelia\Form\Lang\LangDefaultBehaviorForm"/>
|
<form name="thelia.lang.defaultBehavior" class="Thelia\Form\Lang\LangDefaultBehaviorForm"/>
|
||||||
<form name="thelia.lang.url" class="Thelia\Form\Lang\LangUrlForm"/>
|
<form name="thelia.lang.url" class="Thelia\Form\Lang\LangUrlForm"/>
|
||||||
|
|
||||||
|
<form name="thelia.configuration.store" class="Thelia\Form\ConfigStoreForm"/>
|
||||||
<form name="thelia.system-logs.configuration" class="Thelia\Form\SystemLogConfigurationForm"/>
|
<form name="thelia.system-logs.configuration" class="Thelia\Form\SystemLogConfigurationForm"/>
|
||||||
|
|
||||||
<form name="thelia.admin.module.modification" class="Thelia\Form\ModuleModificationForm"/>
|
<form name="thelia.admin.module.modification" class="Thelia\Form\ModuleModificationForm"/>
|
||||||
|
|||||||
@@ -512,6 +512,17 @@
|
|||||||
<default key="_controller">Thelia\Controller\Admin\ConfigController::deleteAction</default>
|
<default key="_controller">Thelia\Controller\Admin\ConfigController::deleteAction</default>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
|
<!-- Routes to the ConfigStore controller -->
|
||||||
|
|
||||||
|
<route id="admin.configuration.store.default" path="/admin/configuration/store">
|
||||||
|
<default key="_controller">Thelia\Controller\Admin\ConfigStoreController::defaultAction</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<route id="admin.configuration.store.save" path="/admin/configuration/store/save">
|
||||||
|
<default key="_controller">Thelia\Controller\Admin\ConfigStoreController::saveAction</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
|
||||||
<!-- Routes to the SystemLog controller -->
|
<!-- Routes to the SystemLog controller -->
|
||||||
|
|
||||||
<route id="admin.configuration.system-logs.default" path="/admin/configuration/system-logs">
|
<route id="admin.configuration.system-logs.default" path="/admin/configuration/system-logs">
|
||||||
|
|||||||
@@ -411,9 +411,9 @@ abstract class AbstractCrudController extends BaseAdminController
|
|||||||
} catch (FormValidationException $ex) {
|
} catch (FormValidationException $ex) {
|
||||||
// Form cannot be validated
|
// Form cannot be validated
|
||||||
$error_msg = $this->createStandardFormValidationErrorMessage($ex);
|
$error_msg = $this->createStandardFormValidationErrorMessage($ex);
|
||||||
} catch (\Exception $ex) {
|
/*} catch (\Exception $ex) {
|
||||||
// Any other error
|
// Any other error
|
||||||
$error_msg = $ex->getMessage();
|
$error_msg = $ex->getMessage();*/
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setupFormErrorContext(
|
$this->setupFormErrorContext(
|
||||||
|
|||||||
105
core/lib/Thelia/Controller/Admin/ConfigStoreController.php
Normal file
105
core/lib/Thelia/Controller/Admin/ConfigStoreController.php
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?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;
|
||||||
|
|
||||||
|
|
||||||
|
use Thelia\Core\Security\Resource\AdminResources;
|
||||||
|
use Thelia\Core\Security\AccessManager;
|
||||||
|
use Thelia\Form\ConfigStoreForm;
|
||||||
|
use Thelia\Log\Tlog;
|
||||||
|
use Thelia\Model\ConfigQuery;
|
||||||
|
/**
|
||||||
|
* Class ConfigStoreController
|
||||||
|
* @package Thelia\Controller\Admin
|
||||||
|
* @author Christophe Laffont <claffont@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class ConfigStoreController extends BaseAdminController
|
||||||
|
{
|
||||||
|
|
||||||
|
protected function renderTemplate()
|
||||||
|
{
|
||||||
|
return $this->render('config-store');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function defaultAction()
|
||||||
|
{
|
||||||
|
if (null !== $response = $this->checkAuth(AdminResources::STORE, array(), AccessManager::VIEW)) return $response;
|
||||||
|
|
||||||
|
// Hydrate the store configuration form
|
||||||
|
$configStoreForm = new ConfigStoreForm($this->getRequest(), 'form', array(
|
||||||
|
'store_name' => ConfigQuery::read("store_name"),
|
||||||
|
'store_email' => ConfigQuery::read("store_email"),
|
||||||
|
'store_business_id' => ConfigQuery::read("store_business_id"),
|
||||||
|
'store_phone' => ConfigQuery::read("store_phone"),
|
||||||
|
'store_fax' => ConfigQuery::read("store_fax"),
|
||||||
|
'store_address1' => ConfigQuery::read("store_address1"),
|
||||||
|
'store_address2' => ConfigQuery::read("store_address2"),
|
||||||
|
'store_address3' => ConfigQuery::read("store_address3"),
|
||||||
|
'store_zipcode' => ConfigQuery::read("store_zipcode"),
|
||||||
|
'store_city' => ConfigQuery::read("store_city"),
|
||||||
|
'store_country' => ConfigQuery::read("store_country")
|
||||||
|
));
|
||||||
|
|
||||||
|
$this->getParserContext()->addForm($configStoreForm);
|
||||||
|
|
||||||
|
return $this->renderTemplate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function saveAction()
|
||||||
|
{
|
||||||
|
if (null !== $response = $this->checkAuth(AdminResources::STORE, array(), AccessManager::UPDATE)) return $response;
|
||||||
|
|
||||||
|
$error_msg = false;
|
||||||
|
|
||||||
|
$configStoreForm = new ConfigStoreForm($this->getRequest());
|
||||||
|
|
||||||
|
try {
|
||||||
|
$form = $this->validateForm($configStoreForm);
|
||||||
|
|
||||||
|
$data = $form->getData();
|
||||||
|
|
||||||
|
// Update store
|
||||||
|
foreach($data as $name => $value) {
|
||||||
|
if(! in_array($name , array('success_url', 'error_message')))
|
||||||
|
ConfigQuery::write($name, $value, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->adminLogAppend(AdminResources::STORE, AccessManager::UPDATE, "Store configuration changed");
|
||||||
|
|
||||||
|
$this->redirectToRoute('admin.configuration.store.default');
|
||||||
|
|
||||||
|
} catch (\Exception $ex) {
|
||||||
|
$error_msg = $ex->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setupFormErrorContext(
|
||||||
|
$this->getTranslator()->trans("Store configuration failed."),
|
||||||
|
$error_msg,
|
||||||
|
$configStoreForm,
|
||||||
|
$ex
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this->renderTemplate();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,6 +30,9 @@ use Thelia\Core\Event\Message\MessageCreateEvent;
|
|||||||
use Thelia\Model\MessageQuery;
|
use Thelia\Model\MessageQuery;
|
||||||
use Thelia\Form\MessageModificationForm;
|
use Thelia\Form\MessageModificationForm;
|
||||||
use Thelia\Form\MessageCreationForm;
|
use Thelia\Form\MessageCreationForm;
|
||||||
|
use Symfony\Component\Finder\Finder;
|
||||||
|
use Thelia\Model\ConfigQuery;
|
||||||
|
use Thelia\Core\Template\TemplateHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages messages sent by mail
|
* Manages messages sent by mail
|
||||||
@@ -90,6 +93,10 @@ class MessageController extends AbstractCrudController
|
|||||||
->setLocale($formData["locale"])
|
->setLocale($formData["locale"])
|
||||||
->setTitle($formData['title'])
|
->setTitle($formData['title'])
|
||||||
->setSubject($formData['subject'])
|
->setSubject($formData['subject'])
|
||||||
|
->setHtmlLayoutFileName($formData['html_layout_file_name'])
|
||||||
|
->setHtmlTemplateFileName($formData['html_template_file_name'])
|
||||||
|
->setTextLayoutFileName($formData['text_layout_file_name'])
|
||||||
|
->setTextTemplateFileName($formData['text_template_file_name'])
|
||||||
->setHtmlMessage($formData['html_message'])
|
->setHtmlMessage($formData['html_message'])
|
||||||
->setTextMessage($formData['text_message'])
|
->setTextMessage($formData['text_message'])
|
||||||
;
|
;
|
||||||
@@ -111,14 +118,19 @@ class MessageController extends AbstractCrudController
|
|||||||
{
|
{
|
||||||
// Prepare the data that will hydrate the form
|
// Prepare the data that will hydrate the form
|
||||||
$data = array(
|
$data = array(
|
||||||
'id' => $object->getId(),
|
'id' => $object->getId(),
|
||||||
'name' => $object->getName(),
|
'name' => $object->getName(),
|
||||||
'secured' => $object->getSecured(),
|
'secured' => $object->getSecured(),
|
||||||
'locale' => $object->getLocale(),
|
'locale' => $object->getLocale(),
|
||||||
'title' => $object->getTitle(),
|
'title' => $object->getTitle(),
|
||||||
'subject' => $object->getSubject(),
|
'subject' => $object->getSubject(),
|
||||||
'html_message' => $object->getHtmlMessage(),
|
'html_message' => $object->getHtmlMessage(),
|
||||||
'text_message' => $object->getTextMessage()
|
'text_message' => $object->getTextMessage(),
|
||||||
|
|
||||||
|
'html_layout_file_name' => $object->getHtmlLayoutFileName(),
|
||||||
|
'html_template_file_name' => $object->getHtmlTemplateFileName(),
|
||||||
|
'text_layout_file_name' => $object->getTextLayoutFileName(),
|
||||||
|
'text_template_file_name' => $object->getTextTemplateFileName(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Setup the object form
|
// Setup the object form
|
||||||
@@ -152,17 +164,36 @@ class MessageController extends AbstractCrudController
|
|||||||
return $this->render('messages');
|
return $this->render('messages');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function listDirectoryContent($requiredExtension) {
|
||||||
|
|
||||||
|
$list = array();
|
||||||
|
|
||||||
|
$dir = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
$finder = Finder::create()->files()->in($dir)->ignoreDotFiles(true)->sortByName()->name("*.$requiredExtension");
|
||||||
|
|
||||||
|
foreach ($finder as $file) {
|
||||||
|
$list[] = $file->getBasename();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $list;
|
||||||
|
}
|
||||||
|
|
||||||
protected function renderEditionTemplate()
|
protected function renderEditionTemplate()
|
||||||
{
|
{
|
||||||
return $this->render('message-edit', array('message_id' => $this->getRequest()->get('message_id')));
|
return $this->render('message-edit', array(
|
||||||
|
'message_id' => $this->getRequest()->get('message_id'),
|
||||||
|
'layout_list' => $this->listDirectoryContent('tpl'),
|
||||||
|
'html_template_list' => $this->listDirectoryContent('html'),
|
||||||
|
'text_template_list' => $this->listDirectoryContent('txt'),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function redirectToEditionTemplate()
|
protected function redirectToEditionTemplate()
|
||||||
{
|
{
|
||||||
$this->redirectToRoute(
|
$this->redirectToRoute("admin.configuration.messages.update", array(
|
||||||
"admin.configuration.messages.update",
|
'message_id' => $this->getRequest()->get('message_id')
|
||||||
array('message_id' => $this->getRequest()->get('message_id'))
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function redirectToListTemplate()
|
protected function redirectToListTemplate()
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class SystemLogController extends BaseAdminController
|
|||||||
|
|
||||||
public function saveAction()
|
public function saveAction()
|
||||||
{
|
{
|
||||||
if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, array(), AccessManager::UPDATE)) return $response;
|
if (null !== $response = $this->checkAuth(AdminResources::SYSTEM_LOG, array(), AccessManager::UPDATE)) return $response;
|
||||||
|
|
||||||
$error_msg = false;
|
$error_msg = false;
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ class TranslationsController extends BaseAdminController
|
|||||||
|
|
||||||
case 'mo' :
|
case 'mo' :
|
||||||
if (null !== $module = ModuleQuery::create()->findPk($item_id)) {
|
if (null !== $module = ModuleQuery::create()->findPk($item_id)) {
|
||||||
$directory = THELIA_MODULE_DIR . $module->getBaseDir();
|
$directory = $module->getAbsoluteBaseDir();
|
||||||
$i18n_directory = THELIA_TEMPLATE_DIR . $module->getI18nPath();
|
$i18n_directory = $module->getAbsoluteI18nPath();
|
||||||
$walkMode = TemplateHelper::WALK_MODE_PHP;
|
$walkMode = TemplateHelper::WALK_MODE_PHP;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -97,8 +97,8 @@ class TranslationsController extends BaseAdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($template) {
|
if ($template) {
|
||||||
$directory = THELIA_TEMPLATE_DIR . $template->getPath();
|
$directory = $template->getAbsolutePath();
|
||||||
$i18n_directory = THELIA_TEMPLATE_DIR . $template->getI18nPath();
|
$i18n_directory = $template->getAbsoluteI18nPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load strings to translate
|
// Load strings to translate
|
||||||
|
|||||||
@@ -68,12 +68,14 @@ class RegisterRouterPass implements CompilerPassInterface
|
|||||||
|
|
||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
$moduleBaseDir = $module->getBaseDir();
|
$moduleBaseDir = $module->getBaseDir();
|
||||||
if (file_exists(THELIA_MODULE_DIR . "/" . $moduleBaseDir . "/Config/routing.xml")) {
|
$routingConfigFilePath = $module->getAbsoluteBaseDir() . DS . "Config" . DS . "routing.xml";
|
||||||
|
|
||||||
|
if (file_exists($routingConfigFilePath)) {
|
||||||
$definition = new Definition(
|
$definition = new Definition(
|
||||||
$container->getParameter("router.class"),
|
$container->getParameter("router.class"),
|
||||||
array(
|
array(
|
||||||
new Reference("router.module.xmlLoader"),
|
new Reference("router.module.xmlLoader"),
|
||||||
$moduleBaseDir . "/Config/routing.xml",
|
$routingConfigFilePath,
|
||||||
array(
|
array(
|
||||||
"cache_dir" => $container->getParameter("kernel.cache_dir"),
|
"cache_dir" => $container->getParameter("kernel.cache_dir"),
|
||||||
"debug" => $container->getParameter("kernel.debug"),
|
"debug" => $container->getParameter("kernel.debug"),
|
||||||
|
|||||||
@@ -22,13 +22,18 @@
|
|||||||
/*************************************************************************************/
|
/*************************************************************************************/
|
||||||
|
|
||||||
namespace Thelia\Core\Event\Message;
|
namespace Thelia\Core\Event\Message;
|
||||||
|
|
||||||
use Thelia\Core\Event\Message\MessageCreateEvent;
|
use Thelia\Core\Event\Message\MessageCreateEvent;
|
||||||
|
|
||||||
class MessageUpdateEvent extends MessageCreateEvent
|
class MessageUpdateEvent extends MessageCreateEvent
|
||||||
{
|
{
|
||||||
protected $message_id;
|
protected $message_id;
|
||||||
|
|
||||||
|
protected $html_layout_file_name;
|
||||||
|
protected $html_template_file_name;
|
||||||
|
|
||||||
|
protected $text_layout_file_name;
|
||||||
|
protected $text_template_file_name;
|
||||||
|
|
||||||
protected $text_message;
|
protected $text_message;
|
||||||
protected $html_message;
|
protected $html_message;
|
||||||
protected $subject;
|
protected $subject;
|
||||||
@@ -85,4 +90,52 @@ class MessageUpdateEvent extends MessageCreateEvent
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public function getHtmlLayoutFileName()
|
||||||
|
{
|
||||||
|
return $this->html_layout_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHtmlLayoutFileName($html_layout_file_name)
|
||||||
|
{
|
||||||
|
$this->html_layout_file_name = $html_layout_file_name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHtmlTemplateFileName()
|
||||||
|
{
|
||||||
|
return $this->html_template_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHtmlTemplateFileName($html_template_file_name)
|
||||||
|
{
|
||||||
|
$this->html_template_file_name = $html_template_file_name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTextLayoutFileName()
|
||||||
|
{
|
||||||
|
return $this->text_layout_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTextLayoutFileName($text_layout_file_name)
|
||||||
|
{
|
||||||
|
$this->text_layout_file_name = $text_layout_file_name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTextTemplateFileName()
|
||||||
|
{
|
||||||
|
return $this->text_template_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTextTemplateFileName($text_template_file_name)
|
||||||
|
{
|
||||||
|
$this->text_template_file_name = $text_template_file_name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -100,5 +100,7 @@ final class AdminResources
|
|||||||
|
|
||||||
const SYSTEM_LOG = "admin.configuration.system-log";
|
const SYSTEM_LOG = "admin.configuration.system-log";
|
||||||
|
|
||||||
|
const STORE = "admin.configuration.store";
|
||||||
|
|
||||||
const TRANSLATIONS = "admin.configuration.translations";
|
const TRANSLATIONS = "admin.configuration.translations";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class Content extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
Argument::createBooleanTypeArgument('current_folder'),
|
Argument::createBooleanTypeArgument('current_folder'),
|
||||||
Argument::createIntTypeArgument('depth', 1),
|
Argument::createIntTypeArgument('depth', 1),
|
||||||
Argument::createBooleanOrBothTypeArgument('visible', 1),
|
Argument::createBooleanOrBothTypeArgument('visible', 1),
|
||||||
|
Argument::createAnyTypeArgument('title'),
|
||||||
new Argument(
|
new Argument(
|
||||||
'order',
|
'order',
|
||||||
new TypeCollection(
|
new TypeCollection(
|
||||||
@@ -148,6 +149,11 @@ class Content extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
|
|
||||||
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);
|
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);
|
||||||
|
|
||||||
|
$title = $this->getTitle();
|
||||||
|
|
||||||
|
if (!is_null($title)) {
|
||||||
|
$search->where("CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END ".Criteria::LIKE." ?", "%".$title."%", \PDO::PARAM_STR);
|
||||||
|
}
|
||||||
|
|
||||||
$orders = $this->getOrder();
|
$orders = $this->getOrder();
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
Argument::createBooleanTypeArgument('current'),
|
Argument::createBooleanTypeArgument('current'),
|
||||||
Argument::createBooleanTypeArgument('not_empty', 0),
|
Argument::createBooleanTypeArgument('not_empty', 0),
|
||||||
Argument::createBooleanOrBothTypeArgument('visible', 1),
|
Argument::createBooleanOrBothTypeArgument('visible', 1),
|
||||||
|
Argument::createAnyTypeArgument('title'),
|
||||||
new Argument(
|
new Argument(
|
||||||
'order',
|
'order',
|
||||||
new TypeCollection(
|
new TypeCollection(
|
||||||
@@ -115,6 +116,12 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$title = $this->getTitle();
|
||||||
|
|
||||||
|
if (!is_null($title)) {
|
||||||
|
$search->where("CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END ".Criteria::LIKE." ?", "%".$title."%", \PDO::PARAM_STR);
|
||||||
|
}
|
||||||
|
|
||||||
$visible = $this->getVisible();
|
$visible = $this->getVisible();
|
||||||
|
|
||||||
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);
|
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
|
|||||||
|
|
||||||
/* if not ; test if it uses admin inclusion : module_configuration.html */
|
/* if not ; test if it uses admin inclusion : module_configuration.html */
|
||||||
if(false === $hasConfigurationInterface) {
|
if(false === $hasConfigurationInterface) {
|
||||||
if(file_exists( sprintf("%s/%s/AdminIncludes/%s.html", THELIA_MODULE_DIR, $module->getBaseDir(), "module_configuration"))) {
|
if(file_exists( sprintf("%s/AdminIncludes/%s.html", $module->getAbsoluteBaseDir(), "module_configuration"))) {
|
||||||
$hasConfigurationInterface = true;
|
$hasConfigurationInterface = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
->set("IS_NEW" , $PSEValue->getNewness() === 1 ? 1 : 0)
|
->set("IS_NEW" , $PSEValue->getNewness() === 1 ? 1 : 0)
|
||||||
->set("IS_DEFAULT" , $PSEValue->getIsDefault() === 1 ? 1 : 0)
|
->set("IS_DEFAULT" , $PSEValue->getIsDefault() === 1 ? 1 : 0)
|
||||||
->set("WEIGHT" , $PSEValue->getWeight())
|
->set("WEIGHT" , $PSEValue->getWeight())
|
||||||
|
->set("REF" , $PSEValue->getRef())
|
||||||
->set("EAN_CODE" , $PSEValue->getEanCode())
|
->set("EAN_CODE" , $PSEValue->getEanCode())
|
||||||
->set("PRICE" , $price)
|
->set("PRICE" , $price)
|
||||||
->set("PRICE_TAX" , $taxedPrice - $price)
|
->set("PRICE_TAX" , $taxedPrice - $price)
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class Template extends BaseLoop implements ArraySearchLoopInterface
|
|||||||
$loopResultRow
|
$loopResultRow
|
||||||
->set("NAME" , $template->getName())
|
->set("NAME" , $template->getName())
|
||||||
->set("RELATIVE_PATH" , $template->getPath())
|
->set("RELATIVE_PATH" , $template->getPath())
|
||||||
->set("ABSOLUTE_PATH" , THELIA_TEMPLATE_DIR . $template->getPath())
|
->set("ABSOLUTE_PATH" , $template->getAbsolutePath())
|
||||||
;
|
;
|
||||||
|
|
||||||
$loopResult->addRow($loopResultRow);
|
$loopResult->addRow($loopResultRow);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class Module extends AbstractSmartyPlugin
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = sprintf("%s/%s/AdminIncludes/%s.html", THELIA_MODULE_DIR, $module->getBaseDir(), $location);
|
$file = sprintf("%s/AdminIncludes/%s.html", $module->getAbsoluteBaseDir(), $location);
|
||||||
|
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
$content .= file_get_contents($file);
|
$content .= file_get_contents($file);
|
||||||
|
|||||||
@@ -28,10 +28,12 @@ class TemplateDefinition
|
|||||||
const FRONT_OFFICE = 1;
|
const FRONT_OFFICE = 1;
|
||||||
const BACK_OFFICE = 2;
|
const BACK_OFFICE = 2;
|
||||||
const PDF = 3;
|
const PDF = 3;
|
||||||
|
const EMAIL = 4;
|
||||||
|
|
||||||
const FRONT_OFFICE_SUBDIR = 'frontOffice/';
|
const FRONT_OFFICE_SUBDIR = 'frontOffice/';
|
||||||
const BACK_OFFICE_SUBDIR = 'backOffice/';
|
const BACK_OFFICE_SUBDIR = 'backOffice/';
|
||||||
const PDF_SUBDIR = 'pdf/';
|
const PDF_SUBDIR = 'pdf/';
|
||||||
|
const EMAIL_SUBDIR = 'email/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var the template directory name (e.g. 'default')
|
* @var the template directory name (e.g. 'default')
|
||||||
@@ -64,6 +66,9 @@ class TemplateDefinition
|
|||||||
case TemplateDefinition::PDF:
|
case TemplateDefinition::PDF:
|
||||||
$this->path = self::PDF_SUBDIR . $name;
|
$this->path = self::PDF_SUBDIR . $name;
|
||||||
break;
|
break;
|
||||||
|
case TemplateDefinition::EMAIL:
|
||||||
|
$this->path = self::EMAIL_SUBDIR . $name;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$this->path = $name;
|
$this->path = $name;
|
||||||
break;
|
break;
|
||||||
@@ -85,11 +90,28 @@ class TemplateDefinition
|
|||||||
return $this->getPath() . DS . 'I18n';
|
return $this->getPath() . DS . 'I18n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAbsoluteI18nPath() {
|
||||||
|
return THELIA_TEMPLATE_DIR . $this->getI18nPath();
|
||||||
|
}
|
||||||
|
|
||||||
public function getPath()
|
public function getPath()
|
||||||
{
|
{
|
||||||
return $this->path;
|
return $this->path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAbsolutePath() {
|
||||||
|
return THELIA_TEMPLATE_DIR . $this->getPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getConfigPath()
|
||||||
|
{
|
||||||
|
return $this->getPath() . DS . 'configs';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAbsoluteConfigPath() {
|
||||||
|
return THELIA_TEMPLATE_DIR . $this->getConfigPath();
|
||||||
|
}
|
||||||
|
|
||||||
public function setPath($path)
|
public function setPath($path)
|
||||||
{
|
{
|
||||||
$this->path = $path;
|
$this->path = $path;
|
||||||
@@ -106,5 +128,4 @@ class TemplateDefinition
|
|||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -46,6 +46,16 @@ class TemplateHelper
|
|||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return TemplateDefinition
|
||||||
|
*/
|
||||||
|
public function getActiveMailTemplate() {
|
||||||
|
return new TemplateDefinition(
|
||||||
|
ConfigQuery::read('active-mail-template', 'default'),
|
||||||
|
TemplateDefinition::EMAIL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return TemplateDefinition
|
* @return TemplateDefinition
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -145,15 +145,15 @@ class Thelia extends Kernel
|
|||||||
|
|
||||||
$code = ucfirst($module->getCode());
|
$code = ucfirst($module->getCode());
|
||||||
|
|
||||||
$loader = new XmlFileLoader($container, new FileLocator(THELIA_MODULE_DIR . "/" . $code . "/Config"));
|
$loader = new XmlFileLoader($container, new FileLocator($module->getAbsoluteConfigPath()));
|
||||||
$loader->load("config.xml");
|
$loader->load("config.xml");
|
||||||
|
|
||||||
if (is_dir($dir = THELIA_MODULE_DIR . "/" . $code . "/I18n")) {
|
if (is_dir($dir = $module->getAbsoluteI18nPath())) {
|
||||||
$translationDirs[] = $dir;
|
$translationDirs[] = $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is there a front-office template directory ? */
|
/* is there a front-office template directory ? */
|
||||||
$frontOfficeModuleTemplateDirectory = sprintf("%s%s%stemplates%s%s", THELIA_MODULE_DIR, $code, DS, DS, TemplateDefinition::FRONT_OFFICE_SUBDIR);
|
$frontOfficeModuleTemplateDirectory = sprintf("%s%stemplates%s%s", $module->getAbsoluteBaseDir(), DS, DS, TemplateDefinition::FRONT_OFFICE_SUBDIR);
|
||||||
if (is_dir($frontOfficeModuleTemplateDirectory)) {
|
if (is_dir($frontOfficeModuleTemplateDirectory)) {
|
||||||
try {
|
try {
|
||||||
$moduleFrontOfficeTemplateBrowser = new \DirectoryIterator($frontOfficeModuleTemplateDirectory);
|
$moduleFrontOfficeTemplateBrowser = new \DirectoryIterator($frontOfficeModuleTemplateDirectory);
|
||||||
@@ -178,7 +178,7 @@ class Thelia extends Kernel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* is there a back-office template directory ? */
|
/* is there a back-office template directory ? */
|
||||||
$backOfficeModuleTemplateDirectory = sprintf("%s%s%stemplates%s%s", THELIA_MODULE_DIR, $code, DS, DS, TemplateDefinition::BACK_OFFICE_SUBDIR);
|
$backOfficeModuleTemplateDirectory = sprintf("%s%stemplates%s%s", $module->getAbsoluteBaseDir(), DS, DS, TemplateDefinition::BACK_OFFICE_SUBDIR);
|
||||||
if (is_dir($backOfficeModuleTemplateDirectory)) {
|
if (is_dir($backOfficeModuleTemplateDirectory)) {
|
||||||
try {
|
try {
|
||||||
$moduleBackOfficeTemplateBrowser = new \DirectoryIterator($backOfficeModuleTemplateDirectory);
|
$moduleBackOfficeTemplateBrowser = new \DirectoryIterator($backOfficeModuleTemplateDirectory);
|
||||||
@@ -210,18 +210,20 @@ class Thelia extends Kernel
|
|||||||
//core translation
|
//core translation
|
||||||
$translationDirs[] = THELIA_ROOT . "core/lib/Thelia/Config/I18n";
|
$translationDirs[] = THELIA_ROOT . "core/lib/Thelia/Config/I18n";
|
||||||
|
|
||||||
|
$th = TemplateHelper::getInstance();
|
||||||
|
|
||||||
// admin template
|
// admin template
|
||||||
if (is_dir($dir = THELIA_TEMPLATE_DIR . TemplateHelper::getInstance()->getActiveAdminTemplate()->getI18nPath())) {
|
if (is_dir($dir = $th->getActiveAdminTemplate()->getAbsoluteI18nPath())) {
|
||||||
$translationDirs[] = $dir;
|
$translationDirs[] = $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
// front template
|
// front template
|
||||||
if (is_dir($dir = THELIA_TEMPLATE_DIR . TemplateHelper::getInstance()->getActiveFrontTemplate()->getI18nPath())) {
|
if (is_dir($dir = $th->getActiveFrontTemplate()->getAbsoluteI18nPath())) {
|
||||||
$translationDirs[] = $dir;
|
$translationDirs[] = $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PDF template
|
// PDF template
|
||||||
if (is_dir($dir = THELIA_TEMPLATE_DIR . TemplateHelper::getInstance()->getActivePdfTemplate()->getI18nPath())) {
|
if (is_dir($dir = $th->getActivePdfTemplate()->getAbsoluteI18nPath())) {
|
||||||
$translationDirs[] = $dir;
|
$translationDirs[] = $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
130
core/lib/Thelia/Form/ConfigStoreForm.php
Normal file
130
core/lib/Thelia/Form/ConfigStoreForm.php
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<?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;
|
||||||
|
use Thelia\Core\Translation\Translator;
|
||||||
|
|
||||||
|
class ConfigStoreForm extends BaseForm
|
||||||
|
{
|
||||||
|
protected function buildForm()
|
||||||
|
{
|
||||||
|
$this->formBuilder
|
||||||
|
->add("store_name", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans('Store name'),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_name"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("store_email", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank(),
|
||||||
|
new Constraints\Email()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans('Store email address'),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_email"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("store_business_id", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans('Business ID'),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_business_id"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("store_phone", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Phone"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_phone"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("store_fax", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Fax"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_fax"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("store_address1", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Street Address"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_address1"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("store_address2", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Address Line 2"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_address2"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("store_address3", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Address Line 3"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_address3"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("store_zipcode", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Zip code"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_zipcode"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("store_city", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("City"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_city"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("store_country", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Country"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "store_country"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return "thelia_configuration_store";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,10 +34,11 @@ class MessageModificationForm extends BaseForm
|
|||||||
->add("id" , "hidden", array("constraints" => array(new GreaterThan(array('value' => 0)))))
|
->add("id" , "hidden", array("constraints" => array(new GreaterThan(array('value' => 0)))))
|
||||||
->add("name" , "text" , array(
|
->add("name" , "text" , array(
|
||||||
"constraints" => array(new NotBlank()),
|
"constraints" => array(new NotBlank()),
|
||||||
"label" => Translator::getInstance()->trans('Name *'),
|
"label" => Translator::getInstance()->trans('Name'),
|
||||||
"label_attr" => array(
|
"label_attr" => array(
|
||||||
"for" => "name"
|
"for" => "name"
|
||||||
)
|
),
|
||||||
|
"required" => true
|
||||||
))
|
))
|
||||||
->add("secured" , "text" , array(
|
->add("secured" , "text" , array(
|
||||||
"label" => Translator::getInstance()->trans('Prevent mailing template modification or deletion, except for super-admin')
|
"label" => Translator::getInstance()->trans('Prevent mailing template modification or deletion, except for super-admin')
|
||||||
@@ -45,29 +46,61 @@ class MessageModificationForm extends BaseForm
|
|||||||
->add("locale" , "text" , array())
|
->add("locale" , "text" , array())
|
||||||
->add("title" , "text" , array(
|
->add("title" , "text" , array(
|
||||||
"constraints" => array(new NotBlank()),
|
"constraints" => array(new NotBlank()),
|
||||||
"label" => Translator::getInstance()->trans('Title *'),
|
"label" => Translator::getInstance()->trans('Title'),
|
||||||
"label_attr" => array(
|
"label_attr" => array(
|
||||||
"for" => "title"
|
"for" => "title"
|
||||||
)
|
),
|
||||||
|
"required" => true
|
||||||
))
|
))
|
||||||
->add("subject" , "text" , array(
|
->add("subject" , "text" , array(
|
||||||
"constraints" => array(new NotBlank()),
|
"constraints" => array(new NotBlank()),
|
||||||
"label" => Translator::getInstance()->trans('Message subject *'),
|
"label" => Translator::getInstance()->trans('Message subject'),
|
||||||
"label_attr" => array(
|
"label_attr" => array(
|
||||||
"for" => "subject"
|
"for" => "subject"
|
||||||
)
|
),
|
||||||
|
"required" => true
|
||||||
))
|
))
|
||||||
->add("html_message" , "text" , array(
|
->add("html_message" , "text" , array(
|
||||||
"label" => Translator::getInstance()->trans('HTML Message'),
|
"label" => Translator::getInstance()->trans('HTML Message'),
|
||||||
"label_attr" => array(
|
"label_attr" => array(
|
||||||
"for" => "html_message"
|
"for" => "html_message"
|
||||||
)
|
),
|
||||||
|
"required" => false
|
||||||
))
|
))
|
||||||
->add("text_message" , "text" , array(
|
->add("text_message" , "text" , array(
|
||||||
"label" => Translator::getInstance()->trans('Text Message'),
|
"label" => Translator::getInstance()->trans('Text Message'),
|
||||||
"label_attr" => array(
|
"label_attr" => array(
|
||||||
"for" => "text_message"
|
"for" => "text_message"
|
||||||
)
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("html_layout_file_name" , "text" , array(
|
||||||
|
"label" => Translator::getInstance()->trans('Name of the HTML layout file'),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "html_layout_file_name"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("html_template_file_name" , "text" , array(
|
||||||
|
"label" => Translator::getInstance()->trans('Name of the HTML template file'),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "html_template_file_name"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("text_layout_file_name" , "text" , array(
|
||||||
|
"label" => Translator::getInstance()->trans('Name of the text layout file'),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "text_layout_file_name"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
|
))
|
||||||
|
->add("text_template_file_name" , "text" , array(
|
||||||
|
"label" => Translator::getInstance()->trans('Name of the text template file'),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "text_template_file_name"
|
||||||
|
),
|
||||||
|
"required" => false
|
||||||
))
|
))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,30 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $secured;
|
protected $secured;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the text_layout_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $text_layout_file_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the text_template_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $text_template_file_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the html_layout_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $html_layout_file_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the html_template_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $html_template_file_name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the created_at field.
|
* The value for the created_at field.
|
||||||
* @var string
|
* @var string
|
||||||
@@ -467,6 +491,50 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
return $this->secured;
|
return $this->secured;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [text_layout_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTextLayoutFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->text_layout_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [text_template_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTextTemplateFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->text_template_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [html_layout_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHtmlLayoutFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->html_layout_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [html_template_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHtmlTemplateFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->html_template_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [optionally formatted] temporal [created_at] column value.
|
* Get the [optionally formatted] temporal [created_at] column value.
|
||||||
*
|
*
|
||||||
@@ -612,6 +680,90 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
return $this;
|
return $this;
|
||||||
} // setSecured()
|
} // setSecured()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [text_layout_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\Message The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setTextLayoutFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->text_layout_file_name !== $v) {
|
||||||
|
$this->text_layout_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageTableMap::TEXT_LAYOUT_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setTextLayoutFileName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [text_template_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\Message The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setTextTemplateFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->text_template_file_name !== $v) {
|
||||||
|
$this->text_template_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageTableMap::TEXT_TEMPLATE_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setTextTemplateFileName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [html_layout_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\Message The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setHtmlLayoutFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->html_layout_file_name !== $v) {
|
||||||
|
$this->html_layout_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageTableMap::HTML_LAYOUT_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setHtmlLayoutFileName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [html_template_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\Message The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setHtmlTemplateFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->html_template_file_name !== $v) {
|
||||||
|
$this->html_template_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageTableMap::HTML_TEMPLATE_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setHtmlTemplateFileName()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||||
*
|
*
|
||||||
@@ -767,28 +919,40 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->secured = (null !== $col) ? (int) $col : null;
|
$this->secured = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageTableMap::translateFieldName('TextLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->text_layout_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageTableMap::translateFieldName('TextTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->text_template_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageTableMap::translateFieldName('HtmlLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->html_layout_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageTableMap::translateFieldName('HtmlTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->html_template_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : MessageTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : MessageTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->version = (null !== $col) ? (int) $col : null;
|
$this->version = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : MessageTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : MessageTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
@@ -798,7 +962,7 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 8; // 8 = MessageTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 12; // 12 = MessageTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\Message object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\Message object", 0, $e);
|
||||||
@@ -1077,6 +1241,18 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(MessageTableMap::SECURED)) {
|
if ($this->isColumnModified(MessageTableMap::SECURED)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'SECURED';
|
$modifiedColumns[':p' . $index++] = 'SECURED';
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified(MessageTableMap::TEXT_LAYOUT_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'TEXT_LAYOUT_FILE_NAME';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(MessageTableMap::TEXT_TEMPLATE_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'TEXT_TEMPLATE_FILE_NAME';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(MessageTableMap::HTML_LAYOUT_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'HTML_LAYOUT_FILE_NAME';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(MessageTableMap::HTML_TEMPLATE_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'HTML_TEMPLATE_FILE_NAME';
|
||||||
|
}
|
||||||
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) {
|
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||||
}
|
}
|
||||||
@@ -1112,6 +1288,18 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
case 'SECURED':
|
case 'SECURED':
|
||||||
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
|
||||||
break;
|
break;
|
||||||
|
case 'TEXT_LAYOUT_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->text_layout_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'TEXT_TEMPLATE_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->text_template_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'HTML_LAYOUT_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->html_layout_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'HTML_TEMPLATE_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->html_template_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
case 'CREATED_AT':
|
case 'CREATED_AT':
|
||||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||||
break;
|
break;
|
||||||
@@ -1199,18 +1387,30 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
return $this->getSecured();
|
return $this->getSecured();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return $this->getCreatedAt();
|
return $this->getTextLayoutFileName();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
return $this->getUpdatedAt();
|
return $this->getTextTemplateFileName();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
return $this->getVersion();
|
return $this->getHtmlLayoutFileName();
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
return $this->getVersionCreatedAt();
|
return $this->getHtmlTemplateFileName();
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
|
return $this->getCreatedAt();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
return $this->getUpdatedAt();
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
return $this->getVersion();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
return $this->getVersionCreatedAt();
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
return $this->getVersionCreatedBy();
|
return $this->getVersionCreatedBy();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1245,11 +1445,15 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
$keys[0] => $this->getId(),
|
$keys[0] => $this->getId(),
|
||||||
$keys[1] => $this->getName(),
|
$keys[1] => $this->getName(),
|
||||||
$keys[2] => $this->getSecured(),
|
$keys[2] => $this->getSecured(),
|
||||||
$keys[3] => $this->getCreatedAt(),
|
$keys[3] => $this->getTextLayoutFileName(),
|
||||||
$keys[4] => $this->getUpdatedAt(),
|
$keys[4] => $this->getTextTemplateFileName(),
|
||||||
$keys[5] => $this->getVersion(),
|
$keys[5] => $this->getHtmlLayoutFileName(),
|
||||||
$keys[6] => $this->getVersionCreatedAt(),
|
$keys[6] => $this->getHtmlTemplateFileName(),
|
||||||
$keys[7] => $this->getVersionCreatedBy(),
|
$keys[7] => $this->getCreatedAt(),
|
||||||
|
$keys[8] => $this->getUpdatedAt(),
|
||||||
|
$keys[9] => $this->getVersion(),
|
||||||
|
$keys[10] => $this->getVersionCreatedAt(),
|
||||||
|
$keys[11] => $this->getVersionCreatedBy(),
|
||||||
);
|
);
|
||||||
$virtualColumns = $this->virtualColumns;
|
$virtualColumns = $this->virtualColumns;
|
||||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||||
@@ -1307,18 +1511,30 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
$this->setSecured($value);
|
$this->setSecured($value);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->setCreatedAt($value);
|
$this->setTextLayoutFileName($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$this->setUpdatedAt($value);
|
$this->setTextTemplateFileName($value);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
$this->setVersion($value);
|
$this->setHtmlLayoutFileName($value);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
$this->setVersionCreatedAt($value);
|
$this->setHtmlTemplateFileName($value);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
|
$this->setCreatedAt($value);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
$this->setUpdatedAt($value);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
$this->setVersion($value);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
$this->setVersionCreatedAt($value);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
$this->setVersionCreatedBy($value);
|
$this->setVersionCreatedBy($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
@@ -1348,11 +1564,15 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||||
if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setTextLayoutFileName($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setTextTemplateFileName($arr[$keys[4]]);
|
||||||
if (array_key_exists($keys[5], $arr)) $this->setVersion($arr[$keys[5]]);
|
if (array_key_exists($keys[5], $arr)) $this->setHtmlLayoutFileName($arr[$keys[5]]);
|
||||||
if (array_key_exists($keys[6], $arr)) $this->setVersionCreatedAt($arr[$keys[6]]);
|
if (array_key_exists($keys[6], $arr)) $this->setHtmlTemplateFileName($arr[$keys[6]]);
|
||||||
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedBy($arr[$keys[7]]);
|
if (array_key_exists($keys[7], $arr)) $this->setCreatedAt($arr[$keys[7]]);
|
||||||
|
if (array_key_exists($keys[8], $arr)) $this->setUpdatedAt($arr[$keys[8]]);
|
||||||
|
if (array_key_exists($keys[9], $arr)) $this->setVersion($arr[$keys[9]]);
|
||||||
|
if (array_key_exists($keys[10], $arr)) $this->setVersionCreatedAt($arr[$keys[10]]);
|
||||||
|
if (array_key_exists($keys[11], $arr)) $this->setVersionCreatedBy($arr[$keys[11]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1367,6 +1587,10 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(MessageTableMap::ID)) $criteria->add(MessageTableMap::ID, $this->id);
|
if ($this->isColumnModified(MessageTableMap::ID)) $criteria->add(MessageTableMap::ID, $this->id);
|
||||||
if ($this->isColumnModified(MessageTableMap::NAME)) $criteria->add(MessageTableMap::NAME, $this->name);
|
if ($this->isColumnModified(MessageTableMap::NAME)) $criteria->add(MessageTableMap::NAME, $this->name);
|
||||||
if ($this->isColumnModified(MessageTableMap::SECURED)) $criteria->add(MessageTableMap::SECURED, $this->secured);
|
if ($this->isColumnModified(MessageTableMap::SECURED)) $criteria->add(MessageTableMap::SECURED, $this->secured);
|
||||||
|
if ($this->isColumnModified(MessageTableMap::TEXT_LAYOUT_FILE_NAME)) $criteria->add(MessageTableMap::TEXT_LAYOUT_FILE_NAME, $this->text_layout_file_name);
|
||||||
|
if ($this->isColumnModified(MessageTableMap::TEXT_TEMPLATE_FILE_NAME)) $criteria->add(MessageTableMap::TEXT_TEMPLATE_FILE_NAME, $this->text_template_file_name);
|
||||||
|
if ($this->isColumnModified(MessageTableMap::HTML_LAYOUT_FILE_NAME)) $criteria->add(MessageTableMap::HTML_LAYOUT_FILE_NAME, $this->html_layout_file_name);
|
||||||
|
if ($this->isColumnModified(MessageTableMap::HTML_TEMPLATE_FILE_NAME)) $criteria->add(MessageTableMap::HTML_TEMPLATE_FILE_NAME, $this->html_template_file_name);
|
||||||
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) $criteria->add(MessageTableMap::CREATED_AT, $this->created_at);
|
if ($this->isColumnModified(MessageTableMap::CREATED_AT)) $criteria->add(MessageTableMap::CREATED_AT, $this->created_at);
|
||||||
if ($this->isColumnModified(MessageTableMap::UPDATED_AT)) $criteria->add(MessageTableMap::UPDATED_AT, $this->updated_at);
|
if ($this->isColumnModified(MessageTableMap::UPDATED_AT)) $criteria->add(MessageTableMap::UPDATED_AT, $this->updated_at);
|
||||||
if ($this->isColumnModified(MessageTableMap::VERSION)) $criteria->add(MessageTableMap::VERSION, $this->version);
|
if ($this->isColumnModified(MessageTableMap::VERSION)) $criteria->add(MessageTableMap::VERSION, $this->version);
|
||||||
@@ -1437,6 +1661,10 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
{
|
{
|
||||||
$copyObj->setName($this->getName());
|
$copyObj->setName($this->getName());
|
||||||
$copyObj->setSecured($this->getSecured());
|
$copyObj->setSecured($this->getSecured());
|
||||||
|
$copyObj->setTextLayoutFileName($this->getTextLayoutFileName());
|
||||||
|
$copyObj->setTextTemplateFileName($this->getTextTemplateFileName());
|
||||||
|
$copyObj->setHtmlLayoutFileName($this->getHtmlLayoutFileName());
|
||||||
|
$copyObj->setHtmlTemplateFileName($this->getHtmlTemplateFileName());
|
||||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||||
$copyObj->setVersion($this->getVersion());
|
$copyObj->setVersion($this->getVersion());
|
||||||
@@ -1963,6 +2191,10 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
$this->id = null;
|
$this->id = null;
|
||||||
$this->name = null;
|
$this->name = null;
|
||||||
$this->secured = null;
|
$this->secured = null;
|
||||||
|
$this->text_layout_file_name = null;
|
||||||
|
$this->text_template_file_name = null;
|
||||||
|
$this->html_layout_file_name = null;
|
||||||
|
$this->html_template_file_name = null;
|
||||||
$this->created_at = null;
|
$this->created_at = null;
|
||||||
$this->updated_at = null;
|
$this->updated_at = null;
|
||||||
$this->version = null;
|
$this->version = null;
|
||||||
@@ -2284,6 +2516,10 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
$version->setId($this->getId());
|
$version->setId($this->getId());
|
||||||
$version->setName($this->getName());
|
$version->setName($this->getName());
|
||||||
$version->setSecured($this->getSecured());
|
$version->setSecured($this->getSecured());
|
||||||
|
$version->setTextLayoutFileName($this->getTextLayoutFileName());
|
||||||
|
$version->setTextTemplateFileName($this->getTextTemplateFileName());
|
||||||
|
$version->setHtmlLayoutFileName($this->getHtmlLayoutFileName());
|
||||||
|
$version->setHtmlTemplateFileName($this->getHtmlTemplateFileName());
|
||||||
$version->setCreatedAt($this->getCreatedAt());
|
$version->setCreatedAt($this->getCreatedAt());
|
||||||
$version->setUpdatedAt($this->getUpdatedAt());
|
$version->setUpdatedAt($this->getUpdatedAt());
|
||||||
$version->setVersion($this->getVersion());
|
$version->setVersion($this->getVersion());
|
||||||
@@ -2329,6 +2565,10 @@ abstract class Message implements ActiveRecordInterface
|
|||||||
$this->setId($version->getId());
|
$this->setId($version->getId());
|
||||||
$this->setName($version->getName());
|
$this->setName($version->getName());
|
||||||
$this->setSecured($version->getSecured());
|
$this->setSecured($version->getSecured());
|
||||||
|
$this->setTextLayoutFileName($version->getTextLayoutFileName());
|
||||||
|
$this->setTextTemplateFileName($version->getTextTemplateFileName());
|
||||||
|
$this->setHtmlLayoutFileName($version->getHtmlLayoutFileName());
|
||||||
|
$this->setHtmlTemplateFileName($version->getHtmlTemplateFileName());
|
||||||
$this->setCreatedAt($version->getCreatedAt());
|
$this->setCreatedAt($version->getCreatedAt());
|
||||||
$this->setUpdatedAt($version->getUpdatedAt());
|
$this->setUpdatedAt($version->getUpdatedAt());
|
||||||
$this->setVersion($version->getVersion());
|
$this->setVersion($version->getVersion());
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ use Thelia\Model\Map\MessageTableMap;
|
|||||||
* @method ChildMessageQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildMessageQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildMessageQuery orderByName($order = Criteria::ASC) Order by the name column
|
* @method ChildMessageQuery orderByName($order = Criteria::ASC) Order by the name column
|
||||||
* @method ChildMessageQuery orderBySecured($order = Criteria::ASC) Order by the secured column
|
* @method ChildMessageQuery orderBySecured($order = Criteria::ASC) Order by the secured column
|
||||||
|
* @method ChildMessageQuery orderByTextLayoutFileName($order = Criteria::ASC) Order by the text_layout_file_name column
|
||||||
|
* @method ChildMessageQuery orderByTextTemplateFileName($order = Criteria::ASC) Order by the text_template_file_name column
|
||||||
|
* @method ChildMessageQuery orderByHtmlLayoutFileName($order = Criteria::ASC) Order by the html_layout_file_name column
|
||||||
|
* @method ChildMessageQuery orderByHtmlTemplateFileName($order = Criteria::ASC) Order by the html_template_file_name column
|
||||||
* @method ChildMessageQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildMessageQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildMessageQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildMessageQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
* @method ChildMessageQuery orderByVersion($order = Criteria::ASC) Order by the version column
|
* @method ChildMessageQuery orderByVersion($order = Criteria::ASC) Order by the version column
|
||||||
@@ -34,6 +38,10 @@ use Thelia\Model\Map\MessageTableMap;
|
|||||||
* @method ChildMessageQuery groupById() Group by the id column
|
* @method ChildMessageQuery groupById() Group by the id column
|
||||||
* @method ChildMessageQuery groupByName() Group by the name column
|
* @method ChildMessageQuery groupByName() Group by the name column
|
||||||
* @method ChildMessageQuery groupBySecured() Group by the secured column
|
* @method ChildMessageQuery groupBySecured() Group by the secured column
|
||||||
|
* @method ChildMessageQuery groupByTextLayoutFileName() Group by the text_layout_file_name column
|
||||||
|
* @method ChildMessageQuery groupByTextTemplateFileName() Group by the text_template_file_name column
|
||||||
|
* @method ChildMessageQuery groupByHtmlLayoutFileName() Group by the html_layout_file_name column
|
||||||
|
* @method ChildMessageQuery groupByHtmlTemplateFileName() Group by the html_template_file_name column
|
||||||
* @method ChildMessageQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildMessageQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildMessageQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildMessageQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
* @method ChildMessageQuery groupByVersion() Group by the version column
|
* @method ChildMessageQuery groupByVersion() Group by the version column
|
||||||
@@ -58,6 +66,10 @@ use Thelia\Model\Map\MessageTableMap;
|
|||||||
* @method ChildMessage findOneById(int $id) Return the first ChildMessage filtered by the id column
|
* @method ChildMessage findOneById(int $id) Return the first ChildMessage filtered by the id column
|
||||||
* @method ChildMessage findOneByName(string $name) Return the first ChildMessage filtered by the name column
|
* @method ChildMessage findOneByName(string $name) Return the first ChildMessage filtered by the name column
|
||||||
* @method ChildMessage findOneBySecured(int $secured) Return the first ChildMessage filtered by the secured column
|
* @method ChildMessage findOneBySecured(int $secured) Return the first ChildMessage filtered by the secured column
|
||||||
|
* @method ChildMessage findOneByTextLayoutFileName(string $text_layout_file_name) Return the first ChildMessage filtered by the text_layout_file_name column
|
||||||
|
* @method ChildMessage findOneByTextTemplateFileName(string $text_template_file_name) Return the first ChildMessage filtered by the text_template_file_name column
|
||||||
|
* @method ChildMessage findOneByHtmlLayoutFileName(string $html_layout_file_name) Return the first ChildMessage filtered by the html_layout_file_name column
|
||||||
|
* @method ChildMessage findOneByHtmlTemplateFileName(string $html_template_file_name) Return the first ChildMessage filtered by the html_template_file_name column
|
||||||
* @method ChildMessage findOneByCreatedAt(string $created_at) Return the first ChildMessage filtered by the created_at column
|
* @method ChildMessage findOneByCreatedAt(string $created_at) Return the first ChildMessage filtered by the created_at column
|
||||||
* @method ChildMessage findOneByUpdatedAt(string $updated_at) Return the first ChildMessage filtered by the updated_at column
|
* @method ChildMessage findOneByUpdatedAt(string $updated_at) Return the first ChildMessage filtered by the updated_at column
|
||||||
* @method ChildMessage findOneByVersion(int $version) Return the first ChildMessage filtered by the version column
|
* @method ChildMessage findOneByVersion(int $version) Return the first ChildMessage filtered by the version column
|
||||||
@@ -67,6 +79,10 @@ use Thelia\Model\Map\MessageTableMap;
|
|||||||
* @method array findById(int $id) Return ChildMessage objects filtered by the id column
|
* @method array findById(int $id) Return ChildMessage objects filtered by the id column
|
||||||
* @method array findByName(string $name) Return ChildMessage objects filtered by the name column
|
* @method array findByName(string $name) Return ChildMessage objects filtered by the name column
|
||||||
* @method array findBySecured(int $secured) Return ChildMessage objects filtered by the secured column
|
* @method array findBySecured(int $secured) Return ChildMessage objects filtered by the secured column
|
||||||
|
* @method array findByTextLayoutFileName(string $text_layout_file_name) Return ChildMessage objects filtered by the text_layout_file_name column
|
||||||
|
* @method array findByTextTemplateFileName(string $text_template_file_name) Return ChildMessage objects filtered by the text_template_file_name column
|
||||||
|
* @method array findByHtmlLayoutFileName(string $html_layout_file_name) Return ChildMessage objects filtered by the html_layout_file_name column
|
||||||
|
* @method array findByHtmlTemplateFileName(string $html_template_file_name) Return ChildMessage objects filtered by the html_template_file_name column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildMessage objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildMessage objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildMessage objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildMessage objects filtered by the updated_at column
|
||||||
* @method array findByVersion(int $version) Return ChildMessage objects filtered by the version column
|
* @method array findByVersion(int $version) Return ChildMessage objects filtered by the version column
|
||||||
@@ -167,7 +183,7 @@ abstract class MessageQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ID, NAME, SECURED, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message WHERE ID = :p0';
|
$sql = 'SELECT ID, NAME, SECURED, TEXT_LAYOUT_FILE_NAME, TEXT_TEMPLATE_FILE_NAME, HTML_LAYOUT_FILE_NAME, HTML_TEMPLATE_FILE_NAME, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message WHERE ID = :p0';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
@@ -367,6 +383,122 @@ abstract class MessageQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(MessageTableMap::SECURED, $secured, $comparison);
|
return $this->addUsingAlias(MessageTableMap::SECURED, $secured, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the text_layout_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTextLayoutFileName('fooValue'); // WHERE text_layout_file_name = 'fooValue'
|
||||||
|
* $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $textLayoutFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTextLayoutFileName($textLayoutFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($textLayoutFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $textLayoutFileName)) {
|
||||||
|
$textLayoutFileName = str_replace('*', '%', $textLayoutFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageTableMap::TEXT_LAYOUT_FILE_NAME, $textLayoutFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the text_template_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTextTemplateFileName('fooValue'); // WHERE text_template_file_name = 'fooValue'
|
||||||
|
* $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $textTemplateFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTextTemplateFileName($textTemplateFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($textTemplateFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $textTemplateFileName)) {
|
||||||
|
$textTemplateFileName = str_replace('*', '%', $textTemplateFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageTableMap::TEXT_TEMPLATE_FILE_NAME, $textTemplateFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the html_layout_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByHtmlLayoutFileName('fooValue'); // WHERE html_layout_file_name = 'fooValue'
|
||||||
|
* $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $htmlLayoutFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByHtmlLayoutFileName($htmlLayoutFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($htmlLayoutFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $htmlLayoutFileName)) {
|
||||||
|
$htmlLayoutFileName = str_replace('*', '%', $htmlLayoutFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageTableMap::HTML_LAYOUT_FILE_NAME, $htmlLayoutFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the html_template_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByHtmlTemplateFileName('fooValue'); // WHERE html_template_file_name = 'fooValue'
|
||||||
|
* $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $htmlTemplateFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByHtmlTemplateFileName($htmlTemplateFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($htmlTemplateFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $htmlTemplateFileName)) {
|
||||||
|
$htmlTemplateFileName = str_replace('*', '%', $htmlTemplateFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageTableMap::HTML_TEMPLATE_FILE_NAME, $htmlTemplateFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the created_at column
|
* Filter the query on the created_at column
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -73,6 +73,30 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $secured;
|
protected $secured;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the text_layout_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $text_layout_file_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the text_template_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $text_template_file_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the html_layout_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $html_layout_file_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the html_template_file_name field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $html_template_file_name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the created_at field.
|
* The value for the created_at field.
|
||||||
* @var string
|
* @var string
|
||||||
@@ -421,6 +445,50 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
return $this->secured;
|
return $this->secured;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [text_layout_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTextLayoutFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->text_layout_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [text_template_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTextTemplateFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->text_template_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [html_layout_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHtmlLayoutFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->html_layout_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [html_template_file_name] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getHtmlTemplateFileName()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->html_template_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [optionally formatted] temporal [created_at] column value.
|
* Get the [optionally formatted] temporal [created_at] column value.
|
||||||
*
|
*
|
||||||
@@ -570,6 +638,90 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
return $this;
|
return $this;
|
||||||
} // setSecured()
|
} // setSecured()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [text_layout_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setTextLayoutFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->text_layout_file_name !== $v) {
|
||||||
|
$this->text_layout_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setTextLayoutFileName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [text_template_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setTextTemplateFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->text_template_file_name !== $v) {
|
||||||
|
$this->text_template_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setTextTemplateFileName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [html_layout_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setHtmlLayoutFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->html_layout_file_name !== $v) {
|
||||||
|
$this->html_layout_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageVersionTableMap::HTML_LAYOUT_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setHtmlLayoutFileName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [html_template_file_name] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\MessageVersion The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setHtmlTemplateFileName($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->html_template_file_name !== $v) {
|
||||||
|
$this->html_template_file_name = $v;
|
||||||
|
$this->modifiedColumns[] = MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setHtmlTemplateFileName()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||||
*
|
*
|
||||||
@@ -725,28 +877,40 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageVersionTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : MessageVersionTableMap::translateFieldName('Secured', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->secured = (null !== $col) ? (int) $col : null;
|
$this->secured = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : MessageVersionTableMap::translateFieldName('TextLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->text_layout_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageVersionTableMap::translateFieldName('TextTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->text_template_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageVersionTableMap::translateFieldName('HtmlLayoutFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->html_layout_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageVersionTableMap::translateFieldName('HtmlTemplateFileName', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->html_template_file_name = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : MessageVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : MessageVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : MessageVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : MessageVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->version = (null !== $col) ? (int) $col : null;
|
$this->version = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
if ($col === '0000-00-00 00:00:00') {
|
if ($col === '0000-00-00 00:00:00') {
|
||||||
$col = null;
|
$col = null;
|
||||||
}
|
}
|
||||||
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : MessageVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
$this->version_created_by = (null !== $col) ? (string) $col : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
@@ -756,7 +920,7 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 8; // 8 = MessageVersionTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 12; // 12 = MessageVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\MessageVersion object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\MessageVersion object", 0, $e);
|
||||||
@@ -986,6 +1150,18 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) {
|
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'SECURED';
|
$modifiedColumns[':p' . $index++] = 'SECURED';
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'TEXT_LAYOUT_FILE_NAME';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'TEXT_TEMPLATE_FILE_NAME';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'HTML_LAYOUT_FILE_NAME';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'HTML_TEMPLATE_FILE_NAME';
|
||||||
|
}
|
||||||
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) {
|
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||||
}
|
}
|
||||||
@@ -1021,6 +1197,18 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
case 'SECURED':
|
case 'SECURED':
|
||||||
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
|
$stmt->bindValue($identifier, $this->secured, PDO::PARAM_INT);
|
||||||
break;
|
break;
|
||||||
|
case 'TEXT_LAYOUT_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->text_layout_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'TEXT_TEMPLATE_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->text_template_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'HTML_LAYOUT_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->html_layout_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'HTML_TEMPLATE_FILE_NAME':
|
||||||
|
$stmt->bindValue($identifier, $this->html_template_file_name, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
case 'CREATED_AT':
|
case 'CREATED_AT':
|
||||||
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
|
||||||
break;
|
break;
|
||||||
@@ -1101,18 +1289,30 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
return $this->getSecured();
|
return $this->getSecured();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return $this->getCreatedAt();
|
return $this->getTextLayoutFileName();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
return $this->getUpdatedAt();
|
return $this->getTextTemplateFileName();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
return $this->getVersion();
|
return $this->getHtmlLayoutFileName();
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
return $this->getVersionCreatedAt();
|
return $this->getHtmlTemplateFileName();
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
|
return $this->getCreatedAt();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
return $this->getUpdatedAt();
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
return $this->getVersion();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
return $this->getVersionCreatedAt();
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
return $this->getVersionCreatedBy();
|
return $this->getVersionCreatedBy();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1147,11 +1347,15 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
$keys[0] => $this->getId(),
|
$keys[0] => $this->getId(),
|
||||||
$keys[1] => $this->getName(),
|
$keys[1] => $this->getName(),
|
||||||
$keys[2] => $this->getSecured(),
|
$keys[2] => $this->getSecured(),
|
||||||
$keys[3] => $this->getCreatedAt(),
|
$keys[3] => $this->getTextLayoutFileName(),
|
||||||
$keys[4] => $this->getUpdatedAt(),
|
$keys[4] => $this->getTextTemplateFileName(),
|
||||||
$keys[5] => $this->getVersion(),
|
$keys[5] => $this->getHtmlLayoutFileName(),
|
||||||
$keys[6] => $this->getVersionCreatedAt(),
|
$keys[6] => $this->getHtmlTemplateFileName(),
|
||||||
$keys[7] => $this->getVersionCreatedBy(),
|
$keys[7] => $this->getCreatedAt(),
|
||||||
|
$keys[8] => $this->getUpdatedAt(),
|
||||||
|
$keys[9] => $this->getVersion(),
|
||||||
|
$keys[10] => $this->getVersionCreatedAt(),
|
||||||
|
$keys[11] => $this->getVersionCreatedBy(),
|
||||||
);
|
);
|
||||||
$virtualColumns = $this->virtualColumns;
|
$virtualColumns = $this->virtualColumns;
|
||||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||||
@@ -1206,18 +1410,30 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
$this->setSecured($value);
|
$this->setSecured($value);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->setCreatedAt($value);
|
$this->setTextLayoutFileName($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$this->setUpdatedAt($value);
|
$this->setTextTemplateFileName($value);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
$this->setVersion($value);
|
$this->setHtmlLayoutFileName($value);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
$this->setVersionCreatedAt($value);
|
$this->setHtmlTemplateFileName($value);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
|
$this->setCreatedAt($value);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
$this->setUpdatedAt($value);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
$this->setVersion($value);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
$this->setVersionCreatedAt($value);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
$this->setVersionCreatedBy($value);
|
$this->setVersionCreatedBy($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
@@ -1247,11 +1463,15 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||||
if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setSecured($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setTextLayoutFileName($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setTextTemplateFileName($arr[$keys[4]]);
|
||||||
if (array_key_exists($keys[5], $arr)) $this->setVersion($arr[$keys[5]]);
|
if (array_key_exists($keys[5], $arr)) $this->setHtmlLayoutFileName($arr[$keys[5]]);
|
||||||
if (array_key_exists($keys[6], $arr)) $this->setVersionCreatedAt($arr[$keys[6]]);
|
if (array_key_exists($keys[6], $arr)) $this->setHtmlTemplateFileName($arr[$keys[6]]);
|
||||||
if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedBy($arr[$keys[7]]);
|
if (array_key_exists($keys[7], $arr)) $this->setCreatedAt($arr[$keys[7]]);
|
||||||
|
if (array_key_exists($keys[8], $arr)) $this->setUpdatedAt($arr[$keys[8]]);
|
||||||
|
if (array_key_exists($keys[9], $arr)) $this->setVersion($arr[$keys[9]]);
|
||||||
|
if (array_key_exists($keys[10], $arr)) $this->setVersionCreatedAt($arr[$keys[10]]);
|
||||||
|
if (array_key_exists($keys[11], $arr)) $this->setVersionCreatedBy($arr[$keys[11]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1266,6 +1486,10 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(MessageVersionTableMap::ID)) $criteria->add(MessageVersionTableMap::ID, $this->id);
|
if ($this->isColumnModified(MessageVersionTableMap::ID)) $criteria->add(MessageVersionTableMap::ID, $this->id);
|
||||||
if ($this->isColumnModified(MessageVersionTableMap::NAME)) $criteria->add(MessageVersionTableMap::NAME, $this->name);
|
if ($this->isColumnModified(MessageVersionTableMap::NAME)) $criteria->add(MessageVersionTableMap::NAME, $this->name);
|
||||||
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) $criteria->add(MessageVersionTableMap::SECURED, $this->secured);
|
if ($this->isColumnModified(MessageVersionTableMap::SECURED)) $criteria->add(MessageVersionTableMap::SECURED, $this->secured);
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME)) $criteria->add(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME, $this->text_layout_file_name);
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME)) $criteria->add(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME, $this->text_template_file_name);
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME)) $criteria->add(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME, $this->html_layout_file_name);
|
||||||
|
if ($this->isColumnModified(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME)) $criteria->add(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME, $this->html_template_file_name);
|
||||||
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) $criteria->add(MessageVersionTableMap::CREATED_AT, $this->created_at);
|
if ($this->isColumnModified(MessageVersionTableMap::CREATED_AT)) $criteria->add(MessageVersionTableMap::CREATED_AT, $this->created_at);
|
||||||
if ($this->isColumnModified(MessageVersionTableMap::UPDATED_AT)) $criteria->add(MessageVersionTableMap::UPDATED_AT, $this->updated_at);
|
if ($this->isColumnModified(MessageVersionTableMap::UPDATED_AT)) $criteria->add(MessageVersionTableMap::UPDATED_AT, $this->updated_at);
|
||||||
if ($this->isColumnModified(MessageVersionTableMap::VERSION)) $criteria->add(MessageVersionTableMap::VERSION, $this->version);
|
if ($this->isColumnModified(MessageVersionTableMap::VERSION)) $criteria->add(MessageVersionTableMap::VERSION, $this->version);
|
||||||
@@ -1344,6 +1568,10 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
$copyObj->setId($this->getId());
|
$copyObj->setId($this->getId());
|
||||||
$copyObj->setName($this->getName());
|
$copyObj->setName($this->getName());
|
||||||
$copyObj->setSecured($this->getSecured());
|
$copyObj->setSecured($this->getSecured());
|
||||||
|
$copyObj->setTextLayoutFileName($this->getTextLayoutFileName());
|
||||||
|
$copyObj->setTextTemplateFileName($this->getTextTemplateFileName());
|
||||||
|
$copyObj->setHtmlLayoutFileName($this->getHtmlLayoutFileName());
|
||||||
|
$copyObj->setHtmlTemplateFileName($this->getHtmlTemplateFileName());
|
||||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||||
$copyObj->setVersion($this->getVersion());
|
$copyObj->setVersion($this->getVersion());
|
||||||
@@ -1435,6 +1663,10 @@ abstract class MessageVersion implements ActiveRecordInterface
|
|||||||
$this->id = null;
|
$this->id = null;
|
||||||
$this->name = null;
|
$this->name = null;
|
||||||
$this->secured = null;
|
$this->secured = null;
|
||||||
|
$this->text_layout_file_name = null;
|
||||||
|
$this->text_template_file_name = null;
|
||||||
|
$this->html_layout_file_name = null;
|
||||||
|
$this->html_template_file_name = null;
|
||||||
$this->created_at = null;
|
$this->created_at = null;
|
||||||
$this->updated_at = null;
|
$this->updated_at = null;
|
||||||
$this->version = null;
|
$this->version = null;
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
|
|||||||
* @method ChildMessageVersionQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildMessageVersionQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildMessageVersionQuery orderByName($order = Criteria::ASC) Order by the name column
|
* @method ChildMessageVersionQuery orderByName($order = Criteria::ASC) Order by the name column
|
||||||
* @method ChildMessageVersionQuery orderBySecured($order = Criteria::ASC) Order by the secured column
|
* @method ChildMessageVersionQuery orderBySecured($order = Criteria::ASC) Order by the secured column
|
||||||
|
* @method ChildMessageVersionQuery orderByTextLayoutFileName($order = Criteria::ASC) Order by the text_layout_file_name column
|
||||||
|
* @method ChildMessageVersionQuery orderByTextTemplateFileName($order = Criteria::ASC) Order by the text_template_file_name column
|
||||||
|
* @method ChildMessageVersionQuery orderByHtmlLayoutFileName($order = Criteria::ASC) Order by the html_layout_file_name column
|
||||||
|
* @method ChildMessageVersionQuery orderByHtmlTemplateFileName($order = Criteria::ASC) Order by the html_template_file_name column
|
||||||
* @method ChildMessageVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildMessageVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildMessageVersionQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildMessageVersionQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
* @method ChildMessageVersionQuery orderByVersion($order = Criteria::ASC) Order by the version column
|
* @method ChildMessageVersionQuery orderByVersion($order = Criteria::ASC) Order by the version column
|
||||||
@@ -33,6 +37,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
|
|||||||
* @method ChildMessageVersionQuery groupById() Group by the id column
|
* @method ChildMessageVersionQuery groupById() Group by the id column
|
||||||
* @method ChildMessageVersionQuery groupByName() Group by the name column
|
* @method ChildMessageVersionQuery groupByName() Group by the name column
|
||||||
* @method ChildMessageVersionQuery groupBySecured() Group by the secured column
|
* @method ChildMessageVersionQuery groupBySecured() Group by the secured column
|
||||||
|
* @method ChildMessageVersionQuery groupByTextLayoutFileName() Group by the text_layout_file_name column
|
||||||
|
* @method ChildMessageVersionQuery groupByTextTemplateFileName() Group by the text_template_file_name column
|
||||||
|
* @method ChildMessageVersionQuery groupByHtmlLayoutFileName() Group by the html_layout_file_name column
|
||||||
|
* @method ChildMessageVersionQuery groupByHtmlTemplateFileName() Group by the html_template_file_name column
|
||||||
* @method ChildMessageVersionQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildMessageVersionQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildMessageVersionQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildMessageVersionQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
* @method ChildMessageVersionQuery groupByVersion() Group by the version column
|
* @method ChildMessageVersionQuery groupByVersion() Group by the version column
|
||||||
@@ -53,6 +61,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
|
|||||||
* @method ChildMessageVersion findOneById(int $id) Return the first ChildMessageVersion filtered by the id column
|
* @method ChildMessageVersion findOneById(int $id) Return the first ChildMessageVersion filtered by the id column
|
||||||
* @method ChildMessageVersion findOneByName(string $name) Return the first ChildMessageVersion filtered by the name column
|
* @method ChildMessageVersion findOneByName(string $name) Return the first ChildMessageVersion filtered by the name column
|
||||||
* @method ChildMessageVersion findOneBySecured(int $secured) Return the first ChildMessageVersion filtered by the secured column
|
* @method ChildMessageVersion findOneBySecured(int $secured) Return the first ChildMessageVersion filtered by the secured column
|
||||||
|
* @method ChildMessageVersion findOneByTextLayoutFileName(string $text_layout_file_name) Return the first ChildMessageVersion filtered by the text_layout_file_name column
|
||||||
|
* @method ChildMessageVersion findOneByTextTemplateFileName(string $text_template_file_name) Return the first ChildMessageVersion filtered by the text_template_file_name column
|
||||||
|
* @method ChildMessageVersion findOneByHtmlLayoutFileName(string $html_layout_file_name) Return the first ChildMessageVersion filtered by the html_layout_file_name column
|
||||||
|
* @method ChildMessageVersion findOneByHtmlTemplateFileName(string $html_template_file_name) Return the first ChildMessageVersion filtered by the html_template_file_name column
|
||||||
* @method ChildMessageVersion findOneByCreatedAt(string $created_at) Return the first ChildMessageVersion filtered by the created_at column
|
* @method ChildMessageVersion findOneByCreatedAt(string $created_at) Return the first ChildMessageVersion filtered by the created_at column
|
||||||
* @method ChildMessageVersion findOneByUpdatedAt(string $updated_at) Return the first ChildMessageVersion filtered by the updated_at column
|
* @method ChildMessageVersion findOneByUpdatedAt(string $updated_at) Return the first ChildMessageVersion filtered by the updated_at column
|
||||||
* @method ChildMessageVersion findOneByVersion(int $version) Return the first ChildMessageVersion filtered by the version column
|
* @method ChildMessageVersion findOneByVersion(int $version) Return the first ChildMessageVersion filtered by the version column
|
||||||
@@ -62,6 +74,10 @@ use Thelia\Model\Map\MessageVersionTableMap;
|
|||||||
* @method array findById(int $id) Return ChildMessageVersion objects filtered by the id column
|
* @method array findById(int $id) Return ChildMessageVersion objects filtered by the id column
|
||||||
* @method array findByName(string $name) Return ChildMessageVersion objects filtered by the name column
|
* @method array findByName(string $name) Return ChildMessageVersion objects filtered by the name column
|
||||||
* @method array findBySecured(int $secured) Return ChildMessageVersion objects filtered by the secured column
|
* @method array findBySecured(int $secured) Return ChildMessageVersion objects filtered by the secured column
|
||||||
|
* @method array findByTextLayoutFileName(string $text_layout_file_name) Return ChildMessageVersion objects filtered by the text_layout_file_name column
|
||||||
|
* @method array findByTextTemplateFileName(string $text_template_file_name) Return ChildMessageVersion objects filtered by the text_template_file_name column
|
||||||
|
* @method array findByHtmlLayoutFileName(string $html_layout_file_name) Return ChildMessageVersion objects filtered by the html_layout_file_name column
|
||||||
|
* @method array findByHtmlTemplateFileName(string $html_template_file_name) Return ChildMessageVersion objects filtered by the html_template_file_name column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildMessageVersion objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildMessageVersion objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildMessageVersion objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildMessageVersion objects filtered by the updated_at column
|
||||||
* @method array findByVersion(int $version) Return ChildMessageVersion objects filtered by the version column
|
* @method array findByVersion(int $version) Return ChildMessageVersion objects filtered by the version column
|
||||||
@@ -155,7 +171,7 @@ abstract class MessageVersionQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ID, NAME, SECURED, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message_version WHERE ID = :p0 AND VERSION = :p1';
|
$sql = 'SELECT ID, NAME, SECURED, TEXT_LAYOUT_FILE_NAME, TEXT_TEMPLATE_FILE_NAME, HTML_LAYOUT_FILE_NAME, HTML_TEMPLATE_FILE_NAME, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM message_version WHERE ID = :p0 AND VERSION = :p1';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||||
@@ -369,6 +385,122 @@ abstract class MessageVersionQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(MessageVersionTableMap::SECURED, $secured, $comparison);
|
return $this->addUsingAlias(MessageVersionTableMap::SECURED, $secured, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the text_layout_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTextLayoutFileName('fooValue'); // WHERE text_layout_file_name = 'fooValue'
|
||||||
|
* $query->filterByTextLayoutFileName('%fooValue%'); // WHERE text_layout_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $textLayoutFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageVersionQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTextLayoutFileName($textLayoutFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($textLayoutFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $textLayoutFileName)) {
|
||||||
|
$textLayoutFileName = str_replace('*', '%', $textLayoutFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME, $textLayoutFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the text_template_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTextTemplateFileName('fooValue'); // WHERE text_template_file_name = 'fooValue'
|
||||||
|
* $query->filterByTextTemplateFileName('%fooValue%'); // WHERE text_template_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $textTemplateFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageVersionQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTextTemplateFileName($textTemplateFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($textTemplateFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $textTemplateFileName)) {
|
||||||
|
$textTemplateFileName = str_replace('*', '%', $textTemplateFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME, $textTemplateFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the html_layout_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByHtmlLayoutFileName('fooValue'); // WHERE html_layout_file_name = 'fooValue'
|
||||||
|
* $query->filterByHtmlLayoutFileName('%fooValue%'); // WHERE html_layout_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $htmlLayoutFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageVersionQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByHtmlLayoutFileName($htmlLayoutFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($htmlLayoutFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $htmlLayoutFileName)) {
|
||||||
|
$htmlLayoutFileName = str_replace('*', '%', $htmlLayoutFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME, $htmlLayoutFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the html_template_file_name column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByHtmlTemplateFileName('fooValue'); // WHERE html_template_file_name = 'fooValue'
|
||||||
|
* $query->filterByHtmlTemplateFileName('%fooValue%'); // WHERE html_template_file_name LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $htmlTemplateFileName The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildMessageVersionQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByHtmlTemplateFileName($htmlTemplateFileName = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($htmlTemplateFileName)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $htmlTemplateFileName)) {
|
||||||
|
$htmlTemplateFileName = str_replace('*', '%', $htmlTemplateFileName);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME, $htmlTemplateFileName, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the created_at column
|
* Filter the query on the created_at column
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -5866,6 +5866,78 @@ abstract class Product implements ActiveRecordInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [meta_title] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMetaTitle()
|
||||||
|
{
|
||||||
|
return $this->getCurrentTranslation()->getMetaTitle();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [meta_title] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setMetaTitle($v)
|
||||||
|
{ $this->getCurrentTranslation()->setMetaTitle($v);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [meta_description] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMetaDescription()
|
||||||
|
{
|
||||||
|
return $this->getCurrentTranslation()->getMetaDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [meta_description] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setMetaDescription($v)
|
||||||
|
{ $this->getCurrentTranslation()->setMetaDescription($v);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [meta_keyword] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMetaKeyword()
|
||||||
|
{
|
||||||
|
return $this->getCurrentTranslation()->getMetaKeyword();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [meta_keyword] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setMetaKeyword($v)
|
||||||
|
{ $this->getCurrentTranslation()->setMetaKeyword($v);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
// versionable behavior
|
// versionable behavior
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -90,6 +90,24 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $postscriptum;
|
protected $postscriptum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the meta_title field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $meta_title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the meta_description field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $meta_description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the meta_keyword field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $meta_keyword;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Product
|
* @var Product
|
||||||
*/
|
*/
|
||||||
@@ -440,6 +458,39 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
return $this->postscriptum;
|
return $this->postscriptum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [meta_title] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMetaTitle()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->meta_title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [meta_description] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMetaDescription()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->meta_description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [meta_keyword] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMetaKeyword()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->meta_keyword;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [id] column.
|
* Set the value of [id] column.
|
||||||
*
|
*
|
||||||
@@ -570,6 +621,69 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
return $this;
|
return $this;
|
||||||
} // setPostscriptum()
|
} // setPostscriptum()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [meta_title] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setMetaTitle($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->meta_title !== $v) {
|
||||||
|
$this->meta_title = $v;
|
||||||
|
$this->modifiedColumns[] = ProductI18nTableMap::META_TITLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setMetaTitle()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [meta_description] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setMetaDescription($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->meta_description !== $v) {
|
||||||
|
$this->meta_description = $v;
|
||||||
|
$this->modifiedColumns[] = ProductI18nTableMap::META_DESCRIPTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setMetaDescription()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [meta_keyword] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return \Thelia\Model\ProductI18n The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setMetaKeyword($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->meta_keyword !== $v) {
|
||||||
|
$this->meta_keyword = $v;
|
||||||
|
$this->modifiedColumns[] = ProductI18nTableMap::META_KEYWORD;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setMetaKeyword()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the columns in this object are only set to default values.
|
* Indicates whether the columns in this object are only set to default values.
|
||||||
*
|
*
|
||||||
@@ -628,6 +742,15 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->postscriptum = (null !== $col) ? (string) $col : null;
|
$this->postscriptum = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ProductI18nTableMap::translateFieldName('MetaTitle', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->meta_title = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ProductI18nTableMap::translateFieldName('MetaDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->meta_description = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ProductI18nTableMap::translateFieldName('MetaKeyword', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
$this->meta_keyword = (null !== $col) ? (string) $col : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
@@ -636,7 +759,7 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 6; // 6 = ProductI18nTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 9; // 9 = ProductI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\ProductI18n object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\ProductI18n object", 0, $e);
|
||||||
@@ -875,6 +998,15 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(ProductI18nTableMap::POSTSCRIPTUM)) {
|
if ($this->isColumnModified(ProductI18nTableMap::POSTSCRIPTUM)) {
|
||||||
$modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM';
|
$modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM';
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified(ProductI18nTableMap::META_TITLE)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'META_TITLE';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(ProductI18nTableMap::META_DESCRIPTION)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'META_DESCRIPTION';
|
||||||
|
}
|
||||||
|
if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORD)) {
|
||||||
|
$modifiedColumns[':p' . $index++] = 'META_KEYWORD';
|
||||||
|
}
|
||||||
|
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'INSERT INTO product_i18n (%s) VALUES (%s)',
|
'INSERT INTO product_i18n (%s) VALUES (%s)',
|
||||||
@@ -904,6 +1036,15 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
case 'POSTSCRIPTUM':
|
case 'POSTSCRIPTUM':
|
||||||
$stmt->bindValue($identifier, $this->postscriptum, PDO::PARAM_STR);
|
$stmt->bindValue($identifier, $this->postscriptum, PDO::PARAM_STR);
|
||||||
break;
|
break;
|
||||||
|
case 'META_TITLE':
|
||||||
|
$stmt->bindValue($identifier, $this->meta_title, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'META_DESCRIPTION':
|
||||||
|
$stmt->bindValue($identifier, $this->meta_description, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
|
case 'META_KEYWORD':
|
||||||
|
$stmt->bindValue($identifier, $this->meta_keyword, PDO::PARAM_STR);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
@@ -977,6 +1118,15 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
case 5:
|
case 5:
|
||||||
return $this->getPostscriptum();
|
return $this->getPostscriptum();
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
return $this->getMetaTitle();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
return $this->getMetaDescription();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
return $this->getMetaKeyword();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
break;
|
break;
|
||||||
@@ -1012,6 +1162,9 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
$keys[3] => $this->getDescription(),
|
$keys[3] => $this->getDescription(),
|
||||||
$keys[4] => $this->getChapo(),
|
$keys[4] => $this->getChapo(),
|
||||||
$keys[5] => $this->getPostscriptum(),
|
$keys[5] => $this->getPostscriptum(),
|
||||||
|
$keys[6] => $this->getMetaTitle(),
|
||||||
|
$keys[7] => $this->getMetaDescription(),
|
||||||
|
$keys[8] => $this->getMetaKeyword(),
|
||||||
);
|
);
|
||||||
$virtualColumns = $this->virtualColumns;
|
$virtualColumns = $this->virtualColumns;
|
||||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||||
@@ -1074,6 +1227,15 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
case 5:
|
case 5:
|
||||||
$this->setPostscriptum($value);
|
$this->setPostscriptum($value);
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
$this->setMetaTitle($value);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
$this->setMetaDescription($value);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
$this->setMetaKeyword($value);
|
||||||
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1104,6 +1266,9 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
if (array_key_exists($keys[3], $arr)) $this->setDescription($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setDescription($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setChapo($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setChapo($arr[$keys[4]]);
|
||||||
if (array_key_exists($keys[5], $arr)) $this->setPostscriptum($arr[$keys[5]]);
|
if (array_key_exists($keys[5], $arr)) $this->setPostscriptum($arr[$keys[5]]);
|
||||||
|
if (array_key_exists($keys[6], $arr)) $this->setMetaTitle($arr[$keys[6]]);
|
||||||
|
if (array_key_exists($keys[7], $arr)) $this->setMetaDescription($arr[$keys[7]]);
|
||||||
|
if (array_key_exists($keys[8], $arr)) $this->setMetaKeyword($arr[$keys[8]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1121,6 +1286,9 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
if ($this->isColumnModified(ProductI18nTableMap::DESCRIPTION)) $criteria->add(ProductI18nTableMap::DESCRIPTION, $this->description);
|
if ($this->isColumnModified(ProductI18nTableMap::DESCRIPTION)) $criteria->add(ProductI18nTableMap::DESCRIPTION, $this->description);
|
||||||
if ($this->isColumnModified(ProductI18nTableMap::CHAPO)) $criteria->add(ProductI18nTableMap::CHAPO, $this->chapo);
|
if ($this->isColumnModified(ProductI18nTableMap::CHAPO)) $criteria->add(ProductI18nTableMap::CHAPO, $this->chapo);
|
||||||
if ($this->isColumnModified(ProductI18nTableMap::POSTSCRIPTUM)) $criteria->add(ProductI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
|
if ($this->isColumnModified(ProductI18nTableMap::POSTSCRIPTUM)) $criteria->add(ProductI18nTableMap::POSTSCRIPTUM, $this->postscriptum);
|
||||||
|
if ($this->isColumnModified(ProductI18nTableMap::META_TITLE)) $criteria->add(ProductI18nTableMap::META_TITLE, $this->meta_title);
|
||||||
|
if ($this->isColumnModified(ProductI18nTableMap::META_DESCRIPTION)) $criteria->add(ProductI18nTableMap::META_DESCRIPTION, $this->meta_description);
|
||||||
|
if ($this->isColumnModified(ProductI18nTableMap::META_KEYWORD)) $criteria->add(ProductI18nTableMap::META_KEYWORD, $this->meta_keyword);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -1197,6 +1365,9 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
$copyObj->setDescription($this->getDescription());
|
$copyObj->setDescription($this->getDescription());
|
||||||
$copyObj->setChapo($this->getChapo());
|
$copyObj->setChapo($this->getChapo());
|
||||||
$copyObj->setPostscriptum($this->getPostscriptum());
|
$copyObj->setPostscriptum($this->getPostscriptum());
|
||||||
|
$copyObj->setMetaTitle($this->getMetaTitle());
|
||||||
|
$copyObj->setMetaDescription($this->getMetaDescription());
|
||||||
|
$copyObj->setMetaKeyword($this->getMetaKeyword());
|
||||||
if ($makeNew) {
|
if ($makeNew) {
|
||||||
$copyObj->setNew(true);
|
$copyObj->setNew(true);
|
||||||
}
|
}
|
||||||
@@ -1286,6 +1457,9 @@ abstract class ProductI18n implements ActiveRecordInterface
|
|||||||
$this->description = null;
|
$this->description = null;
|
||||||
$this->chapo = null;
|
$this->chapo = null;
|
||||||
$this->postscriptum = null;
|
$this->postscriptum = null;
|
||||||
|
$this->meta_title = null;
|
||||||
|
$this->meta_description = null;
|
||||||
|
$this->meta_keyword = null;
|
||||||
$this->alreadyInSave = false;
|
$this->alreadyInSave = false;
|
||||||
$this->clearAllReferences();
|
$this->clearAllReferences();
|
||||||
$this->applyDefaultValues();
|
$this->applyDefaultValues();
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
|||||||
* @method ChildProductI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
* @method ChildProductI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||||
* @method ChildProductI18nQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
|
* @method ChildProductI18nQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
|
||||||
* @method ChildProductI18nQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
|
* @method ChildProductI18nQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
|
||||||
|
* @method ChildProductI18nQuery orderByMetaTitle($order = Criteria::ASC) Order by the meta_title column
|
||||||
|
* @method ChildProductI18nQuery orderByMetaDescription($order = Criteria::ASC) Order by the meta_description column
|
||||||
|
* @method ChildProductI18nQuery orderByMetaKeyword($order = Criteria::ASC) Order by the meta_keyword column
|
||||||
*
|
*
|
||||||
* @method ChildProductI18nQuery groupById() Group by the id column
|
* @method ChildProductI18nQuery groupById() Group by the id column
|
||||||
* @method ChildProductI18nQuery groupByLocale() Group by the locale column
|
* @method ChildProductI18nQuery groupByLocale() Group by the locale column
|
||||||
@@ -34,6 +37,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
|||||||
* @method ChildProductI18nQuery groupByDescription() Group by the description column
|
* @method ChildProductI18nQuery groupByDescription() Group by the description column
|
||||||
* @method ChildProductI18nQuery groupByChapo() Group by the chapo column
|
* @method ChildProductI18nQuery groupByChapo() Group by the chapo column
|
||||||
* @method ChildProductI18nQuery groupByPostscriptum() Group by the postscriptum column
|
* @method ChildProductI18nQuery groupByPostscriptum() Group by the postscriptum column
|
||||||
|
* @method ChildProductI18nQuery groupByMetaTitle() Group by the meta_title column
|
||||||
|
* @method ChildProductI18nQuery groupByMetaDescription() Group by the meta_description column
|
||||||
|
* @method ChildProductI18nQuery groupByMetaKeyword() Group by the meta_keyword column
|
||||||
*
|
*
|
||||||
* @method ChildProductI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
* @method ChildProductI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
* @method ChildProductI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildProductI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
@@ -52,6 +58,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
|||||||
* @method ChildProductI18n findOneByDescription(string $description) Return the first ChildProductI18n filtered by the description column
|
* @method ChildProductI18n findOneByDescription(string $description) Return the first ChildProductI18n filtered by the description column
|
||||||
* @method ChildProductI18n findOneByChapo(string $chapo) Return the first ChildProductI18n filtered by the chapo column
|
* @method ChildProductI18n findOneByChapo(string $chapo) Return the first ChildProductI18n filtered by the chapo column
|
||||||
* @method ChildProductI18n findOneByPostscriptum(string $postscriptum) Return the first ChildProductI18n filtered by the postscriptum column
|
* @method ChildProductI18n findOneByPostscriptum(string $postscriptum) Return the first ChildProductI18n filtered by the postscriptum column
|
||||||
|
* @method ChildProductI18n findOneByMetaTitle(string $meta_title) Return the first ChildProductI18n filtered by the meta_title column
|
||||||
|
* @method ChildProductI18n findOneByMetaDescription(string $meta_description) Return the first ChildProductI18n filtered by the meta_description column
|
||||||
|
* @method ChildProductI18n findOneByMetaKeyword(string $meta_keyword) Return the first ChildProductI18n filtered by the meta_keyword column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildProductI18n objects filtered by the id column
|
* @method array findById(int $id) Return ChildProductI18n objects filtered by the id column
|
||||||
* @method array findByLocale(string $locale) Return ChildProductI18n objects filtered by the locale column
|
* @method array findByLocale(string $locale) Return ChildProductI18n objects filtered by the locale column
|
||||||
@@ -59,6 +68,9 @@ use Thelia\Model\Map\ProductI18nTableMap;
|
|||||||
* @method array findByDescription(string $description) Return ChildProductI18n objects filtered by the description column
|
* @method array findByDescription(string $description) Return ChildProductI18n objects filtered by the description column
|
||||||
* @method array findByChapo(string $chapo) Return ChildProductI18n objects filtered by the chapo column
|
* @method array findByChapo(string $chapo) Return ChildProductI18n objects filtered by the chapo column
|
||||||
* @method array findByPostscriptum(string $postscriptum) Return ChildProductI18n objects filtered by the postscriptum column
|
* @method array findByPostscriptum(string $postscriptum) Return ChildProductI18n objects filtered by the postscriptum column
|
||||||
|
* @method array findByMetaTitle(string $meta_title) Return ChildProductI18n objects filtered by the meta_title column
|
||||||
|
* @method array findByMetaDescription(string $meta_description) Return ChildProductI18n objects filtered by the meta_description column
|
||||||
|
* @method array findByMetaKeyword(string $meta_keyword) Return ChildProductI18n objects filtered by the meta_keyword column
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract class ProductI18nQuery extends ModelCriteria
|
abstract class ProductI18nQuery extends ModelCriteria
|
||||||
@@ -147,7 +159,7 @@ abstract class ProductI18nQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM FROM product_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
$sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM, META_TITLE, META_DESCRIPTION, META_KEYWORD FROM product_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||||
@@ -436,6 +448,93 @@ abstract class ProductI18nQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(ProductI18nTableMap::POSTSCRIPTUM, $postscriptum, $comparison);
|
return $this->addUsingAlias(ProductI18nTableMap::POSTSCRIPTUM, $postscriptum, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the meta_title column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByMetaTitle('fooValue'); // WHERE meta_title = 'fooValue'
|
||||||
|
* $query->filterByMetaTitle('%fooValue%'); // WHERE meta_title LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $metaTitle The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildProductI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByMetaTitle($metaTitle = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($metaTitle)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $metaTitle)) {
|
||||||
|
$metaTitle = str_replace('*', '%', $metaTitle);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ProductI18nTableMap::META_TITLE, $metaTitle, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the meta_description column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByMetaDescription('fooValue'); // WHERE meta_description = 'fooValue'
|
||||||
|
* $query->filterByMetaDescription('%fooValue%'); // WHERE meta_description LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $metaDescription The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildProductI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByMetaDescription($metaDescription = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($metaDescription)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $metaDescription)) {
|
||||||
|
$metaDescription = str_replace('*', '%', $metaDescription);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ProductI18nTableMap::META_DESCRIPTION, $metaDescription, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the meta_keyword column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByMetaKeyword('fooValue'); // WHERE meta_keyword = 'fooValue'
|
||||||
|
* $query->filterByMetaKeyword('%fooValue%'); // WHERE meta_keyword LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $metaKeyword The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildProductI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByMetaKeyword($metaKeyword = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($metaKeyword)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $metaKeyword)) {
|
||||||
|
$metaKeyword = str_replace('*', '%', $metaKeyword);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ProductI18nTableMap::META_KEYWORD, $metaKeyword, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\Product object
|
* Filter the query by a related \Thelia\Model\Product object
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class MessageTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 8;
|
const NUM_COLUMNS = 12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -67,7 +67,7 @@ class MessageTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
*/
|
*/
|
||||||
const NUM_HYDRATE_COLUMNS = 8;
|
const NUM_HYDRATE_COLUMNS = 12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
@@ -84,6 +84,26 @@ class MessageTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
const SECURED = 'message.SECURED';
|
const SECURED = 'message.SECURED';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TEXT_LAYOUT_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const TEXT_LAYOUT_FILE_NAME = 'message.TEXT_LAYOUT_FILE_NAME';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TEXT_TEMPLATE_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const TEXT_TEMPLATE_FILE_NAME = 'message.TEXT_TEMPLATE_FILE_NAME';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the HTML_LAYOUT_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const HTML_LAYOUT_FILE_NAME = 'message.HTML_LAYOUT_FILE_NAME';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the HTML_TEMPLATE_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const HTML_TEMPLATE_FILE_NAME = 'message.HTML_TEMPLATE_FILE_NAME';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
*/
|
*/
|
||||||
@@ -130,12 +150,12 @@ class MessageTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
|
self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'TextLayoutFileName', 'TextTemplateFileName', 'HtmlLayoutFileName', 'HtmlTemplateFileName', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'textLayoutFileName', 'textTemplateFileName', 'htmlLayoutFileName', 'htmlTemplateFileName', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
|
||||||
self::TYPE_COLNAME => array(MessageTableMap::ID, MessageTableMap::NAME, MessageTableMap::SECURED, MessageTableMap::CREATED_AT, MessageTableMap::UPDATED_AT, MessageTableMap::VERSION, MessageTableMap::VERSION_CREATED_AT, MessageTableMap::VERSION_CREATED_BY, ),
|
self::TYPE_COLNAME => array(MessageTableMap::ID, MessageTableMap::NAME, MessageTableMap::SECURED, MessageTableMap::TEXT_LAYOUT_FILE_NAME, MessageTableMap::TEXT_TEMPLATE_FILE_NAME, MessageTableMap::HTML_LAYOUT_FILE_NAME, MessageTableMap::HTML_TEMPLATE_FILE_NAME, MessageTableMap::CREATED_AT, MessageTableMap::UPDATED_AT, MessageTableMap::VERSION, MessageTableMap::VERSION_CREATED_AT, MessageTableMap::VERSION_CREATED_BY, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'TEXT_LAYOUT_FILE_NAME', 'TEXT_TEMPLATE_FILE_NAME', 'HTML_LAYOUT_FILE_NAME', 'HTML_TEMPLATE_FILE_NAME', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
|
self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'text_layout_file_name', 'text_template_file_name', 'html_layout_file_name', 'html_template_file_name', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,12 +165,12 @@ class MessageTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, 'Version' => 5, 'VersionCreatedAt' => 6, 'VersionCreatedBy' => 7, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'TextLayoutFileName' => 3, 'TextTemplateFileName' => 4, 'HtmlLayoutFileName' => 5, 'HtmlTemplateFileName' => 6, 'CreatedAt' => 7, 'UpdatedAt' => 8, 'Version' => 9, 'VersionCreatedAt' => 10, 'VersionCreatedBy' => 11, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'createdAt' => 3, 'updatedAt' => 4, 'version' => 5, 'versionCreatedAt' => 6, 'versionCreatedBy' => 7, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'textLayoutFileName' => 3, 'textTemplateFileName' => 4, 'htmlLayoutFileName' => 5, 'htmlTemplateFileName' => 6, 'createdAt' => 7, 'updatedAt' => 8, 'version' => 9, 'versionCreatedAt' => 10, 'versionCreatedBy' => 11, ),
|
||||||
self::TYPE_COLNAME => array(MessageTableMap::ID => 0, MessageTableMap::NAME => 1, MessageTableMap::SECURED => 2, MessageTableMap::CREATED_AT => 3, MessageTableMap::UPDATED_AT => 4, MessageTableMap::VERSION => 5, MessageTableMap::VERSION_CREATED_AT => 6, MessageTableMap::VERSION_CREATED_BY => 7, ),
|
self::TYPE_COLNAME => array(MessageTableMap::ID => 0, MessageTableMap::NAME => 1, MessageTableMap::SECURED => 2, MessageTableMap::TEXT_LAYOUT_FILE_NAME => 3, MessageTableMap::TEXT_TEMPLATE_FILE_NAME => 4, MessageTableMap::HTML_LAYOUT_FILE_NAME => 5, MessageTableMap::HTML_TEMPLATE_FILE_NAME => 6, MessageTableMap::CREATED_AT => 7, MessageTableMap::UPDATED_AT => 8, MessageTableMap::VERSION => 9, MessageTableMap::VERSION_CREATED_AT => 10, MessageTableMap::VERSION_CREATED_BY => 11, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, 'VERSION' => 5, 'VERSION_CREATED_AT' => 6, 'VERSION_CREATED_BY' => 7, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'TEXT_LAYOUT_FILE_NAME' => 3, 'TEXT_TEMPLATE_FILE_NAME' => 4, 'HTML_LAYOUT_FILE_NAME' => 5, 'HTML_TEMPLATE_FILE_NAME' => 6, 'CREATED_AT' => 7, 'UPDATED_AT' => 8, 'VERSION' => 9, 'VERSION_CREATED_AT' => 10, 'VERSION_CREATED_BY' => 11, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'created_at' => 3, 'updated_at' => 4, 'version' => 5, 'version_created_at' => 6, 'version_created_by' => 7, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'text_layout_file_name' => 3, 'text_template_file_name' => 4, 'html_layout_file_name' => 5, 'html_template_file_name' => 6, 'created_at' => 7, 'updated_at' => 8, 'version' => 9, 'version_created_at' => 10, 'version_created_by' => 11, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -172,6 +192,10 @@ class MessageTableMap extends TableMap
|
|||||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
|
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
|
||||||
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
|
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
|
||||||
|
$this->addColumn('TEXT_LAYOUT_FILE_NAME', 'TextLayoutFileName', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('TEXT_TEMPLATE_FILE_NAME', 'TextTemplateFileName', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('HTML_LAYOUT_FILE_NAME', 'HtmlLayoutFileName', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('HTML_TEMPLATE_FILE_NAME', 'HtmlTemplateFileName', 'VARCHAR', false, 255, null);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
|
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
|
||||||
@@ -354,6 +378,10 @@ class MessageTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(MessageTableMap::ID);
|
$criteria->addSelectColumn(MessageTableMap::ID);
|
||||||
$criteria->addSelectColumn(MessageTableMap::NAME);
|
$criteria->addSelectColumn(MessageTableMap::NAME);
|
||||||
$criteria->addSelectColumn(MessageTableMap::SECURED);
|
$criteria->addSelectColumn(MessageTableMap::SECURED);
|
||||||
|
$criteria->addSelectColumn(MessageTableMap::TEXT_LAYOUT_FILE_NAME);
|
||||||
|
$criteria->addSelectColumn(MessageTableMap::TEXT_TEMPLATE_FILE_NAME);
|
||||||
|
$criteria->addSelectColumn(MessageTableMap::HTML_LAYOUT_FILE_NAME);
|
||||||
|
$criteria->addSelectColumn(MessageTableMap::HTML_TEMPLATE_FILE_NAME);
|
||||||
$criteria->addSelectColumn(MessageTableMap::CREATED_AT);
|
$criteria->addSelectColumn(MessageTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(MessageTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(MessageTableMap::UPDATED_AT);
|
||||||
$criteria->addSelectColumn(MessageTableMap::VERSION);
|
$criteria->addSelectColumn(MessageTableMap::VERSION);
|
||||||
@@ -363,6 +391,10 @@ class MessageTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.NAME');
|
$criteria->addSelectColumn($alias . '.NAME');
|
||||||
$criteria->addSelectColumn($alias . '.SECURED');
|
$criteria->addSelectColumn($alias . '.SECURED');
|
||||||
|
$criteria->addSelectColumn($alias . '.TEXT_LAYOUT_FILE_NAME');
|
||||||
|
$criteria->addSelectColumn($alias . '.TEXT_TEMPLATE_FILE_NAME');
|
||||||
|
$criteria->addSelectColumn($alias . '.HTML_LAYOUT_FILE_NAME');
|
||||||
|
$criteria->addSelectColumn($alias . '.HTML_TEMPLATE_FILE_NAME');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.VERSION');
|
$criteria->addSelectColumn($alias . '.VERSION');
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class MessageVersionTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 8;
|
const NUM_COLUMNS = 12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -67,7 +67,7 @@ class MessageVersionTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
*/
|
*/
|
||||||
const NUM_HYDRATE_COLUMNS = 8;
|
const NUM_HYDRATE_COLUMNS = 12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
@@ -84,6 +84,26 @@ class MessageVersionTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
const SECURED = 'message_version.SECURED';
|
const SECURED = 'message_version.SECURED';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TEXT_LAYOUT_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const TEXT_LAYOUT_FILE_NAME = 'message_version.TEXT_LAYOUT_FILE_NAME';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TEXT_TEMPLATE_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const TEXT_TEMPLATE_FILE_NAME = 'message_version.TEXT_TEMPLATE_FILE_NAME';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the HTML_LAYOUT_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const HTML_LAYOUT_FILE_NAME = 'message_version.HTML_LAYOUT_FILE_NAME';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the HTML_TEMPLATE_FILE_NAME field
|
||||||
|
*/
|
||||||
|
const HTML_TEMPLATE_FILE_NAME = 'message_version.HTML_TEMPLATE_FILE_NAME';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
*/
|
*/
|
||||||
@@ -121,12 +141,12 @@ class MessageVersionTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
|
self::TYPE_PHPNAME => array('Id', 'Name', 'Secured', 'TextLayoutFileName', 'TextTemplateFileName', 'HtmlLayoutFileName', 'HtmlTemplateFileName', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'name', 'secured', 'textLayoutFileName', 'textTemplateFileName', 'htmlLayoutFileName', 'htmlTemplateFileName', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
|
||||||
self::TYPE_COLNAME => array(MessageVersionTableMap::ID, MessageVersionTableMap::NAME, MessageVersionTableMap::SECURED, MessageVersionTableMap::CREATED_AT, MessageVersionTableMap::UPDATED_AT, MessageVersionTableMap::VERSION, MessageVersionTableMap::VERSION_CREATED_AT, MessageVersionTableMap::VERSION_CREATED_BY, ),
|
self::TYPE_COLNAME => array(MessageVersionTableMap::ID, MessageVersionTableMap::NAME, MessageVersionTableMap::SECURED, MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME, MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME, MessageVersionTableMap::HTML_LAYOUT_FILE_NAME, MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME, MessageVersionTableMap::CREATED_AT, MessageVersionTableMap::UPDATED_AT, MessageVersionTableMap::VERSION, MessageVersionTableMap::VERSION_CREATED_AT, MessageVersionTableMap::VERSION_CREATED_BY, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'SECURED', 'TEXT_LAYOUT_FILE_NAME', 'TEXT_TEMPLATE_FILE_NAME', 'HTML_LAYOUT_FILE_NAME', 'HTML_TEMPLATE_FILE_NAME', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
|
self::TYPE_FIELDNAME => array('id', 'name', 'secured', 'text_layout_file_name', 'text_template_file_name', 'html_layout_file_name', 'html_template_file_name', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -136,12 +156,12 @@ class MessageVersionTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, 'Version' => 5, 'VersionCreatedAt' => 6, 'VersionCreatedBy' => 7, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Secured' => 2, 'TextLayoutFileName' => 3, 'TextTemplateFileName' => 4, 'HtmlLayoutFileName' => 5, 'HtmlTemplateFileName' => 6, 'CreatedAt' => 7, 'UpdatedAt' => 8, 'Version' => 9, 'VersionCreatedAt' => 10, 'VersionCreatedBy' => 11, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'createdAt' => 3, 'updatedAt' => 4, 'version' => 5, 'versionCreatedAt' => 6, 'versionCreatedBy' => 7, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'textLayoutFileName' => 3, 'textTemplateFileName' => 4, 'htmlLayoutFileName' => 5, 'htmlTemplateFileName' => 6, 'createdAt' => 7, 'updatedAt' => 8, 'version' => 9, 'versionCreatedAt' => 10, 'versionCreatedBy' => 11, ),
|
||||||
self::TYPE_COLNAME => array(MessageVersionTableMap::ID => 0, MessageVersionTableMap::NAME => 1, MessageVersionTableMap::SECURED => 2, MessageVersionTableMap::CREATED_AT => 3, MessageVersionTableMap::UPDATED_AT => 4, MessageVersionTableMap::VERSION => 5, MessageVersionTableMap::VERSION_CREATED_AT => 6, MessageVersionTableMap::VERSION_CREATED_BY => 7, ),
|
self::TYPE_COLNAME => array(MessageVersionTableMap::ID => 0, MessageVersionTableMap::NAME => 1, MessageVersionTableMap::SECURED => 2, MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME => 3, MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME => 4, MessageVersionTableMap::HTML_LAYOUT_FILE_NAME => 5, MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME => 6, MessageVersionTableMap::CREATED_AT => 7, MessageVersionTableMap::UPDATED_AT => 8, MessageVersionTableMap::VERSION => 9, MessageVersionTableMap::VERSION_CREATED_AT => 10, MessageVersionTableMap::VERSION_CREATED_BY => 11, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, 'VERSION' => 5, 'VERSION_CREATED_AT' => 6, 'VERSION_CREATED_BY' => 7, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'SECURED' => 2, 'TEXT_LAYOUT_FILE_NAME' => 3, 'TEXT_TEMPLATE_FILE_NAME' => 4, 'HTML_LAYOUT_FILE_NAME' => 5, 'HTML_TEMPLATE_FILE_NAME' => 6, 'CREATED_AT' => 7, 'UPDATED_AT' => 8, 'VERSION' => 9, 'VERSION_CREATED_AT' => 10, 'VERSION_CREATED_BY' => 11, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'created_at' => 3, 'updated_at' => 4, 'version' => 5, 'version_created_at' => 6, 'version_created_by' => 7, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'secured' => 2, 'text_layout_file_name' => 3, 'text_template_file_name' => 4, 'html_layout_file_name' => 5, 'html_template_file_name' => 6, 'created_at' => 7, 'updated_at' => 8, 'version' => 9, 'version_created_at' => 10, 'version_created_by' => 11, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -163,6 +183,10 @@ class MessageVersionTableMap extends TableMap
|
|||||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'message', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'message', 'ID', true, null, null);
|
||||||
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
|
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
|
||||||
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
|
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
|
||||||
|
$this->addColumn('TEXT_LAYOUT_FILE_NAME', 'TextLayoutFileName', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('TEXT_TEMPLATE_FILE_NAME', 'TextTemplateFileName', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('HTML_LAYOUT_FILE_NAME', 'HtmlLayoutFileName', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('HTML_TEMPLATE_FILE_NAME', 'HtmlTemplateFileName', 'VARCHAR', false, 255, null);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
|
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
|
||||||
@@ -245,11 +269,11 @@ class MessageVersionTableMap extends TableMap
|
|||||||
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
{
|
{
|
||||||
// If the PK cannot be derived from the row, return NULL.
|
// If the PK cannot be derived from the row, return NULL.
|
||||||
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 5 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 9 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 5 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
|
return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 9 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -368,6 +392,10 @@ class MessageVersionTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(MessageVersionTableMap::ID);
|
$criteria->addSelectColumn(MessageVersionTableMap::ID);
|
||||||
$criteria->addSelectColumn(MessageVersionTableMap::NAME);
|
$criteria->addSelectColumn(MessageVersionTableMap::NAME);
|
||||||
$criteria->addSelectColumn(MessageVersionTableMap::SECURED);
|
$criteria->addSelectColumn(MessageVersionTableMap::SECURED);
|
||||||
|
$criteria->addSelectColumn(MessageVersionTableMap::TEXT_LAYOUT_FILE_NAME);
|
||||||
|
$criteria->addSelectColumn(MessageVersionTableMap::TEXT_TEMPLATE_FILE_NAME);
|
||||||
|
$criteria->addSelectColumn(MessageVersionTableMap::HTML_LAYOUT_FILE_NAME);
|
||||||
|
$criteria->addSelectColumn(MessageVersionTableMap::HTML_TEMPLATE_FILE_NAME);
|
||||||
$criteria->addSelectColumn(MessageVersionTableMap::CREATED_AT);
|
$criteria->addSelectColumn(MessageVersionTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(MessageVersionTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(MessageVersionTableMap::UPDATED_AT);
|
||||||
$criteria->addSelectColumn(MessageVersionTableMap::VERSION);
|
$criteria->addSelectColumn(MessageVersionTableMap::VERSION);
|
||||||
@@ -377,6 +405,10 @@ class MessageVersionTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.NAME');
|
$criteria->addSelectColumn($alias . '.NAME');
|
||||||
$criteria->addSelectColumn($alias . '.SECURED');
|
$criteria->addSelectColumn($alias . '.SECURED');
|
||||||
|
$criteria->addSelectColumn($alias . '.TEXT_LAYOUT_FILE_NAME');
|
||||||
|
$criteria->addSelectColumn($alias . '.TEXT_TEMPLATE_FILE_NAME');
|
||||||
|
$criteria->addSelectColumn($alias . '.HTML_LAYOUT_FILE_NAME');
|
||||||
|
$criteria->addSelectColumn($alias . '.HTML_TEMPLATE_FILE_NAME');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.VERSION');
|
$criteria->addSelectColumn($alias . '.VERSION');
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class ProductI18nTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 6;
|
const NUM_COLUMNS = 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -67,7 +67,7 @@ class ProductI18nTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
*/
|
*/
|
||||||
const NUM_HYDRATE_COLUMNS = 6;
|
const NUM_HYDRATE_COLUMNS = 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
@@ -99,6 +99,21 @@ class ProductI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
const POSTSCRIPTUM = 'product_i18n.POSTSCRIPTUM';
|
const POSTSCRIPTUM = 'product_i18n.POSTSCRIPTUM';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the META_TITLE field
|
||||||
|
*/
|
||||||
|
const META_TITLE = 'product_i18n.META_TITLE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the META_DESCRIPTION field
|
||||||
|
*/
|
||||||
|
const META_DESCRIPTION = 'product_i18n.META_DESCRIPTION';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the META_KEYWORD field
|
||||||
|
*/
|
||||||
|
const META_KEYWORD = 'product_i18n.META_KEYWORD';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default string format for model objects of the related table
|
* The default string format for model objects of the related table
|
||||||
*/
|
*/
|
||||||
@@ -111,12 +126,12 @@ class ProductI18nTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', 'Chapo', 'Postscriptum', ),
|
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', 'Chapo', 'Postscriptum', 'MetaTitle', 'MetaDescription', 'MetaKeyword', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'metaTitle', 'metaDescription', 'metaKeyword', ),
|
||||||
self::TYPE_COLNAME => array(ProductI18nTableMap::ID, ProductI18nTableMap::LOCALE, ProductI18nTableMap::TITLE, ProductI18nTableMap::DESCRIPTION, ProductI18nTableMap::CHAPO, ProductI18nTableMap::POSTSCRIPTUM, ),
|
self::TYPE_COLNAME => array(ProductI18nTableMap::ID, ProductI18nTableMap::LOCALE, ProductI18nTableMap::TITLE, ProductI18nTableMap::DESCRIPTION, ProductI18nTableMap::CHAPO, ProductI18nTableMap::POSTSCRIPTUM, ProductI18nTableMap::META_TITLE, ProductI18nTableMap::META_DESCRIPTION, ProductI18nTableMap::META_KEYWORD, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', 'META_TITLE', 'META_DESCRIPTION', 'META_KEYWORD', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ),
|
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', 'meta_title', 'meta_description', 'meta_keyword', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,12 +141,12 @@ class ProductI18nTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, 'MetaTitle' => 6, 'MetaDescription' => 7, 'MetaKeyword' => 8, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'metaTitle' => 6, 'metaDescription' => 7, 'metaKeyword' => 8, ),
|
||||||
self::TYPE_COLNAME => array(ProductI18nTableMap::ID => 0, ProductI18nTableMap::LOCALE => 1, ProductI18nTableMap::TITLE => 2, ProductI18nTableMap::DESCRIPTION => 3, ProductI18nTableMap::CHAPO => 4, ProductI18nTableMap::POSTSCRIPTUM => 5, ),
|
self::TYPE_COLNAME => array(ProductI18nTableMap::ID => 0, ProductI18nTableMap::LOCALE => 1, ProductI18nTableMap::TITLE => 2, ProductI18nTableMap::DESCRIPTION => 3, ProductI18nTableMap::CHAPO => 4, ProductI18nTableMap::POSTSCRIPTUM => 5, ProductI18nTableMap::META_TITLE => 6, ProductI18nTableMap::META_DESCRIPTION => 7, ProductI18nTableMap::META_KEYWORD => 8, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'CHAPO' => 4, 'POSTSCRIPTUM' => 5, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'CHAPO' => 4, 'POSTSCRIPTUM' => 5, 'META_TITLE' => 6, 'META_DESCRIPTION' => 7, 'META_KEYWORD' => 8, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, 'meta_title' => 6, 'meta_description' => 7, 'meta_keyword' => 8, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -156,6 +171,9 @@ class ProductI18nTableMap extends TableMap
|
|||||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||||
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
|
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
|
||||||
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
|
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
|
||||||
|
$this->addColumn('META_TITLE', 'MetaTitle', 'VARCHAR', false, 255, null);
|
||||||
|
$this->addColumn('META_DESCRIPTION', 'MetaDescription', 'LONGVARCHAR', false, null, null);
|
||||||
|
$this->addColumn('META_KEYWORD', 'MetaKeyword', 'LONGVARCHAR', false, null, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -359,6 +377,9 @@ class ProductI18nTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(ProductI18nTableMap::DESCRIPTION);
|
$criteria->addSelectColumn(ProductI18nTableMap::DESCRIPTION);
|
||||||
$criteria->addSelectColumn(ProductI18nTableMap::CHAPO);
|
$criteria->addSelectColumn(ProductI18nTableMap::CHAPO);
|
||||||
$criteria->addSelectColumn(ProductI18nTableMap::POSTSCRIPTUM);
|
$criteria->addSelectColumn(ProductI18nTableMap::POSTSCRIPTUM);
|
||||||
|
$criteria->addSelectColumn(ProductI18nTableMap::META_TITLE);
|
||||||
|
$criteria->addSelectColumn(ProductI18nTableMap::META_DESCRIPTION);
|
||||||
|
$criteria->addSelectColumn(ProductI18nTableMap::META_KEYWORD);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||||
@@ -366,6 +387,9 @@ class ProductI18nTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||||
$criteria->addSelectColumn($alias . '.CHAPO');
|
$criteria->addSelectColumn($alias . '.CHAPO');
|
||||||
$criteria->addSelectColumn($alias . '.POSTSCRIPTUM');
|
$criteria->addSelectColumn($alias . '.POSTSCRIPTUM');
|
||||||
|
$criteria->addSelectColumn($alias . '.META_TITLE');
|
||||||
|
$criteria->addSelectColumn($alias . '.META_DESCRIPTION');
|
||||||
|
$criteria->addSelectColumn($alias . '.META_KEYWORD');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class ProductTableMap extends TableMap
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum, meta_title, meta_description, meta_keyword', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||||
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
|
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
|
||||||
);
|
);
|
||||||
} // getBehaviors()
|
} // getBehaviors()
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ use Thelia\Model\Base\Message as BaseMessage;
|
|||||||
use Propel\Runtime\Connection\ConnectionInterface;
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
use Thelia\Core\Event\TheliaEvents;
|
use Thelia\Core\Event\TheliaEvents;
|
||||||
use Thelia\Core\Event\Message\MessageEvent;
|
use Thelia\Core\Event\Message\MessageEvent;
|
||||||
|
use Thelia\Core\Template\ParserInterface;
|
||||||
|
use Thelia\Core\Template\TemplateHelper;
|
||||||
|
|
||||||
class Message extends BaseMessage {
|
class Message extends BaseMessage {
|
||||||
|
|
||||||
@@ -64,4 +66,97 @@ class Message extends BaseMessage {
|
|||||||
{
|
{
|
||||||
$this->dispatchEvent(TheliaEvents::AFTER_DELETEMESSAGE, new MessageEvent($this));
|
$this->dispatchEvent(TheliaEvents::AFTER_DELETEMESSAGE, new MessageEvent($this));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* Calculate the message body, given the HTML entered in the back-office, the message layout, and the message template
|
||||||
|
*/
|
||||||
|
protected function getMessageBody($parser, $message, $layout, $template) {
|
||||||
|
|
||||||
|
$body = false;
|
||||||
|
|
||||||
|
$mail_template_path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath() . DS;
|
||||||
|
|
||||||
|
// Try to get the body from template file, if a file is defined
|
||||||
|
if (! empty($template)) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
$body = $parser->render($mail_template_path . $template);
|
||||||
|
} catch (ResourceNotFoundException $ex) {
|
||||||
|
// Ignore this.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// We did not get it ? Use the message entered in the back-office
|
||||||
|
if ($body === false) {
|
||||||
|
$body = $parser->renderString($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do we have a layout ?
|
||||||
|
if (! empty($layout)) {
|
||||||
|
|
||||||
|
// Populate the message body variable
|
||||||
|
$parser->assign('message_body', $body);
|
||||||
|
|
||||||
|
// Render the layout file
|
||||||
|
$body = $parser->render($mail_template_path . $layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $body;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the HTML message body
|
||||||
|
*/
|
||||||
|
public function getHtmlMessageBody(ParserInterface $parser) {
|
||||||
|
|
||||||
|
return $this->getMessageBody(
|
||||||
|
$parser,
|
||||||
|
$this->getHtmlMessage(),
|
||||||
|
$this->getHtmlLayoutFileName(),
|
||||||
|
$this->getHtmlTemplateFileName()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the TEXT message body
|
||||||
|
*/
|
||||||
|
public function getTextMessageBody(ParserInterface $parser) {
|
||||||
|
|
||||||
|
return $this->getMessageBody(
|
||||||
|
$parser,
|
||||||
|
$this->getTextMessage(),
|
||||||
|
$this->getTextLayoutFileName(),
|
||||||
|
$this->getTextTemplateFileName()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a subject and a body (TEXT, HTML or both, depending on the message
|
||||||
|
* configuration.
|
||||||
|
*/
|
||||||
|
public function buildMessage($parser, \Swift_Message $messageInstance) {
|
||||||
|
|
||||||
|
$subject = $parser->fetch(sprintf("string:%s", $this->getSubject()));
|
||||||
|
$htmlMessage = $this->getHtmlMessageBody($parser);
|
||||||
|
$textMessage = $this->getTextMessageBody($parser);
|
||||||
|
|
||||||
|
$messageInstance->setSubject($subject);
|
||||||
|
|
||||||
|
// If we do not have an HTML message
|
||||||
|
if (empty($htmlMessage)) {
|
||||||
|
// Message body is the text message
|
||||||
|
$messageInstance->setBody($textMessage, 'text/plain');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// The main body is the HTML messahe
|
||||||
|
$messageInstance->setBody($htmlMessage, 'text/html');
|
||||||
|
|
||||||
|
// Use the text as a message part, if we have one.
|
||||||
|
if (! empty($textMessage)) {
|
||||||
|
$messageInstance->addPart($textMessage, 'text/plain');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $messageInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,6 +22,13 @@ class Module extends BaseModule
|
|||||||
return ucfirst($this->getCode());
|
return ucfirst($this->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the module's base directory path, relative to THELIA_MODULE_DIR
|
||||||
|
*/
|
||||||
|
public function getAbsoluteBaseDir() {
|
||||||
|
return THELIA_MODULE_DIR . $this->getBaseDir();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the module's config directory path, relative to THELIA_MODULE_DIR
|
* @return the module's config directory path, relative to THELIA_MODULE_DIR
|
||||||
*/
|
*/
|
||||||
@@ -29,10 +36,24 @@ class Module extends BaseModule
|
|||||||
return $this->getBaseDir() . DS . "Config";
|
return $this->getBaseDir() . DS . "Config";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the module's config absolute directory path
|
||||||
|
*/
|
||||||
|
public function getAbsoluteConfigPath() {
|
||||||
|
return THELIA_MODULE_DIR . $this->getConfigPath();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the module's i18N directory path, relative to THELIA_MODULE_DIR
|
* @return the module's i18N directory path, relative to THELIA_MODULE_DIR
|
||||||
*/
|
*/
|
||||||
public function getI18nPath() {
|
public function getI18nPath() {
|
||||||
return $this->getBaseDir() . DS . "I18n";
|
return $this->getBaseDir() . DS . "I18n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* @return the module's i18N absolute directory path
|
||||||
|
*/
|
||||||
|
public function getAbsoluteI18nPath() {
|
||||||
|
return THELIA_MODULE_DIR . $this->getI18nPath();
|
||||||
|
}
|
||||||
|
}
|
||||||
337
core/lib/Thelia/Tests/Model/Message.php
Normal file
337
core/lib/Thelia/Tests/Model/Message.php
Normal file
@@ -0,0 +1,337 @@
|
|||||||
|
<?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\Tests\Model;
|
||||||
|
|
||||||
|
|
||||||
|
use Thelia\Model\ConfigQuery;
|
||||||
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
use Thelia\Model\Message;
|
||||||
|
use Thelia\Core\Template\Smarty\SmartyParser;
|
||||||
|
use Thelia\Core\Template\ParserContext;
|
||||||
|
use Thelia\Core\Template\TemplateHelper;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||||
|
use Thelia\Core\HttpFoundation\Request;
|
||||||
|
use Thelia\Core\HttpFoundation\Session\Session;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class CustomerTest
|
||||||
|
* @package Thelia\Tests\Action
|
||||||
|
* @author Etienne Roudeix <eroudeix@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class MessageTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ContainerBuilder $container
|
||||||
|
*/
|
||||||
|
protected $container, $parser;
|
||||||
|
|
||||||
|
private $backup_mail_template = 'undefined';
|
||||||
|
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
$this->backup_mail_template = ConfigQuery::read('active-mail-template', 'default');
|
||||||
|
|
||||||
|
ConfigQuery::write('active-mail-template', 'test');
|
||||||
|
|
||||||
|
@mkdir(TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath(), 0777, true);
|
||||||
|
|
||||||
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
|
$session = new Session(new MockArraySessionStorage());
|
||||||
|
$request = new Request();
|
||||||
|
$dispatcher = $this->getMock("Symfony\Component\EventDispatcher\EventDispatcherInterface");
|
||||||
|
|
||||||
|
$request->setSession($session);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* public function __construct(
|
||||||
|
Request $request, EventDispatcherInterface $dispatcher, ParserContext $parserContext,
|
||||||
|
$env = "prod", $debug = false)
|
||||||
|
|
||||||
|
*/
|
||||||
|
$container->set("event_dispatcher", $dispatcher);
|
||||||
|
$container->set('request', $request);
|
||||||
|
|
||||||
|
$this->parser = new SmartyParser($request, $dispatcher, new ParserContext($request), 'dev', true);
|
||||||
|
$this->parser->setTemplate(TemplateHelper::getInstance()->getActiveMailTemplate());
|
||||||
|
|
||||||
|
$container->set('thelia.parser', $this->parser);
|
||||||
|
|
||||||
|
$this->container = $container;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with HTML and TEXT body from message HTMl and TEXT fields
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextAndHtmlBody()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setHtmlMessage("The HTML content");
|
||||||
|
$message->setTextMessage("The TEXT content");
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("The HTML content", $instance->getBody());
|
||||||
|
$this->assertEquals("The TEXT content", $instance->getChildren()[0]->getBody());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with TEXT body only from message HTMl and TEXT fields
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextOnlyBody()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setTextMessage("The TEXT content");
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("The TEXT content", $instance->getBody());
|
||||||
|
$this->assertEquals(0, count($instance->getChildren()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with HTML and TEXT body from message HTMl and TEXT fields
|
||||||
|
* using a text and a html layout
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextAndHtmlBodyAndTextAndHtmlLayout()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setTextMessage("The TEXT content");
|
||||||
|
$message->setHtmlMessage("The HTML content");
|
||||||
|
|
||||||
|
$message->setHtmlLayoutFileName('layout.html.tpl');
|
||||||
|
$message->setTextLayoutFileName('layout.text.tpl');
|
||||||
|
|
||||||
|
$path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'layout.html.tpl', 'HTML Layout: {$message_body nofilter}');
|
||||||
|
file_put_contents($path.DS.'layout.text.tpl', 'TEXT Layout: {$message_body nofilter}');
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("HTML Layout: The HTML content", $instance->getBody());
|
||||||
|
$this->assertEquals("TEXT Layout: The TEXT content", $instance->getChildren()[0]->getBody());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with TEXT only body from message HTMl and TEXT fields
|
||||||
|
* using a text only layout
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextOnlyBodyAndTextOnlyLayout()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setTextMessage("The <TEXT> & content");
|
||||||
|
|
||||||
|
$message->setTextLayoutFileName('layout3.text.tpl');
|
||||||
|
|
||||||
|
$path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'layout3.text.tpl', 'TEXT Layout 3: {$message_body nofilter} :-) <>');
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("TEXT Layout 3: The <TEXT> & content :-) <>", $instance->getBody());
|
||||||
|
$this->assertEquals(0, count($instance->getChildren()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with TEXT and HTML body from message HTMl and TEXT fields
|
||||||
|
* using a text only layout
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextAndHtmlBodyAndTextOnlyLayout()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setTextMessage("The <TEXT> & content");
|
||||||
|
$message->setHtmlMessage("The <HTML> & content");
|
||||||
|
|
||||||
|
$message->setTextLayoutFileName('layout3.text.tpl');
|
||||||
|
|
||||||
|
$path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'layout3.text.tpl', 'TEXT Layout 3: {$message_body nofilter} :-) <>');
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("The <HTML> & content", $instance->getBody());
|
||||||
|
$this->assertEquals("TEXT Layout 3: The <TEXT> & content :-) <>", $instance->getChildren()[0]->getBody());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with HTML and TEXT body from template HTMl and TEXT fields
|
||||||
|
* using a text and a html layout
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextAndHtmlBodyAndTextAndHtmlLayoutAndTextAndHtmlTemplate()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setTextMessage("The TEXT content");
|
||||||
|
$message->setHtmlMessage("The HTML content");
|
||||||
|
|
||||||
|
$message->setTextTemplateFileName('template4-text.txt');
|
||||||
|
$message->setHtmlTemplateFileName('template4-html.html');
|
||||||
|
|
||||||
|
$message->setHtmlLayoutFileName('layout4.html.tpl');
|
||||||
|
$message->setTextLayoutFileName('layout4.text.tpl');
|
||||||
|
|
||||||
|
$path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
$this->parser->assign('myvar', 'my-value');
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'layout4.html.tpl', 'HTML Layout 4: {$message_body nofilter}');
|
||||||
|
file_put_contents($path.DS.'layout4.text.tpl', 'TEXT Layout 4: {$message_body nofilter}');
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'template4-html.html', 'HTML <template> & content v={$myvar}');
|
||||||
|
file_put_contents($path.DS.'template4-text.txt', 'TEXT <template> & content v={$myvar}');
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("HTML Layout 4: HTML <template> & content v=my-value", $instance->getBody());
|
||||||
|
$this->assertEquals("TEXT Layout 4: TEXT <template> & content v=my-value", $instance->getChildren()[0]->getBody());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with HTML and TEXT body from template HTMl and TEXT fields
|
||||||
|
* using a text and a html layout
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextAndHtmlBodyAndTextAndHtmlLayoutAndTextAndHtmlTemplateWichExtendsLayout()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setTextMessage("The TEXT content");
|
||||||
|
$message->setHtmlMessage("The HTML content");
|
||||||
|
|
||||||
|
$message->setTextTemplateFileName('template5-text.txt');
|
||||||
|
$message->setHtmlTemplateFileName('template5-html.html');
|
||||||
|
|
||||||
|
//$message->setHtmlLayoutFileName('layout5.html.tpl');
|
||||||
|
//$message->setTextLayoutFileName('layout5.text.tpl');
|
||||||
|
|
||||||
|
$path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
$this->parser->assign('myvar', 'my-value');
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'layout5.html.tpl', 'HTML Layout 5: {block name="message-body"}{$message_body nofilter}{/block}');
|
||||||
|
file_put_contents($path.DS.'layout5.text.tpl', 'TEXT Layout 5: {block name="message-body"}{$message_body nofilter}{/block}');
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'template5-html.html', '{extends file="layout5.html.tpl"}{block name="message-body"}HTML <template> & content v={$myvar}{/block}');
|
||||||
|
file_put_contents($path.DS.'template5-text.txt' , '{extends file="layout5.text.tpl"}{block name="message-body"}TEXT <template> & content v={$myvar}{/block}');
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("HTML Layout 5: HTML <template> & content v=my-value", $instance->getBody());
|
||||||
|
$this->assertEquals("TEXT Layout 5: TEXT <template> & content v=my-value", $instance->getChildren()[0]->getBody());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create message with HTML and TEXT body from template HTMl and TEXT fields
|
||||||
|
* using a text and a html layout
|
||||||
|
*/
|
||||||
|
public function testMessageWithTextAndHtmlBodyAndTextAndHtmlExtendableLayout()
|
||||||
|
{
|
||||||
|
$message = new Message();
|
||||||
|
|
||||||
|
$message->setLocale('fr_FR');
|
||||||
|
|
||||||
|
$message->setSubject("The subject");
|
||||||
|
$message->setTextMessage('TEXT <template> & content v={$myvar}');
|
||||||
|
$message->setHtmlMessage('HTML <template> & content v={$myvar}');
|
||||||
|
|
||||||
|
$message->setHtmlLayoutFileName('layout6.html.tpl');
|
||||||
|
$message->setTextLayoutFileName('layout6.text.tpl');
|
||||||
|
|
||||||
|
$path = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
$this->parser->assign('myvar', 'my-value');
|
||||||
|
|
||||||
|
file_put_contents($path.DS.'layout6.html.tpl', 'HTML Layout 6: {block name="message-body"}{$message_body nofilter}{/block}');
|
||||||
|
file_put_contents($path.DS.'layout6.text.tpl', 'TEXT Layout 6: {block name="message-body"}{$message_body nofilter}{/block}');
|
||||||
|
|
||||||
|
$instance = \Swift_Message::newInstance();
|
||||||
|
|
||||||
|
$message->buildMessage($this->parser, $instance);
|
||||||
|
|
||||||
|
$this->assertEquals("The subject", $instance->getSubject());
|
||||||
|
$this->assertEquals("HTML Layout 6: HTML <template> & content v=my-value", $instance->getBody());
|
||||||
|
$this->assertEquals("TEXT Layout 6: TEXT <template> & content v=my-value", $instance->getChildren()[0]->getBody());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function tearDown() {
|
||||||
|
|
||||||
|
$dir = TemplateHelper::getInstance()->getActiveMailTemplate()->getAbsolutePath();
|
||||||
|
|
||||||
|
ConfigQuery::write('active-mail-template', $this->backup_mail_template);
|
||||||
|
|
||||||
|
$fs = new Filesystem();
|
||||||
|
|
||||||
|
$fs->remove($dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -1060,6 +1060,10 @@ CREATE TABLE `message`
|
|||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`name` VARCHAR(255) NOT NULL,
|
`name` VARCHAR(255) NOT NULL,
|
||||||
`secured` TINYINT,
|
`secured` TINYINT,
|
||||||
|
`text_layout_file_name` VARCHAR(255),
|
||||||
|
`text_template_file_name` VARCHAR(255),
|
||||||
|
`html_layout_file_name` VARCHAR(255),
|
||||||
|
`html_template_file_name` VARCHAR(255),
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
`version` INTEGER DEFAULT 0,
|
`version` INTEGER DEFAULT 0,
|
||||||
@@ -1652,6 +1656,9 @@ CREATE TABLE `product_i18n`
|
|||||||
`description` LONGTEXT,
|
`description` LONGTEXT,
|
||||||
`chapo` TEXT,
|
`chapo` TEXT,
|
||||||
`postscriptum` TEXT,
|
`postscriptum` TEXT,
|
||||||
|
`meta_title` VARCHAR(255),
|
||||||
|
`meta_description` TEXT,
|
||||||
|
`meta_keyword` TEXT,
|
||||||
PRIMARY KEY (`id`,`locale`),
|
PRIMARY KEY (`id`,`locale`),
|
||||||
CONSTRAINT `product_i18n_FK_1`
|
CONSTRAINT `product_i18n_FK_1`
|
||||||
FOREIGN KEY (`id`)
|
FOREIGN KEY (`id`)
|
||||||
@@ -2342,6 +2349,10 @@ CREATE TABLE `message_version`
|
|||||||
`id` INTEGER NOT NULL,
|
`id` INTEGER NOT NULL,
|
||||||
`name` VARCHAR(255) NOT NULL,
|
`name` VARCHAR(255) NOT NULL,
|
||||||
`secured` TINYINT,
|
`secured` TINYINT,
|
||||||
|
`text_layout_file_name` VARCHAR(255),
|
||||||
|
`text_template_file_name` VARCHAR(255),
|
||||||
|
`html_layout_file_name` VARCHAR(255),
|
||||||
|
`html_template_file_name` VARCHAR(255),
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
`version` INTEGER DEFAULT 0 NOT NULL,
|
`version` INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
<column name="description" type="CLOB" />
|
<column name="description" type="CLOB" />
|
||||||
<column name="chapo" type="LONGVARCHAR" />
|
<column name="chapo" type="LONGVARCHAR" />
|
||||||
<column name="postscriptum" type="LONGVARCHAR" />
|
<column name="postscriptum" type="LONGVARCHAR" />
|
||||||
|
<column name="template_id" type="INTEGER" />
|
||||||
|
<column name="meta_title" size="255" type="VARCHAR" />
|
||||||
|
<column name="meta_description" type="LONGVARCHAR" />
|
||||||
<column name="meta_keyword" type="LONGVARCHAR" />
|
<column name="meta_keyword" type="LONGVARCHAR" />
|
||||||
<foreign-key foreignTable="tax_rule" name="fk_product_tax_rule_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
<foreign-key foreignTable="tax_rule" name="fk_product_tax_rule_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="tax_rule_id" />
|
<reference foreign="id" local="tax_rule_id" />
|
||||||
@@ -46,7 +49,7 @@
|
|||||||
<index-column name="template_id" />
|
<index-column name="template_id" />
|
||||||
</index>
|
</index>
|
||||||
<behavior name="timestampable" />
|
<behavior name="timestampable" />
|
||||||
<behavior name="i18n">
|
<behavior name="i18n">
|
||||||
<parameter name="i18n_columns" value="title, description, chapo, postscriptum, meta_title, meta_description, meta_keyword" />
|
<parameter name="i18n_columns" value="title, description, chapo, postscriptum, meta_title, meta_description, meta_keyword" />
|
||||||
</behavior>
|
</behavior>
|
||||||
<behavior name="versionable">
|
<behavior name="versionable">
|
||||||
@@ -820,6 +823,10 @@
|
|||||||
<column name="title" type="LONGVARCHAR" />
|
<column name="title" type="LONGVARCHAR" />
|
||||||
<column name="subject" type="LONGVARCHAR" />
|
<column name="subject" type="LONGVARCHAR" />
|
||||||
<column name="text_message" type="CLOB" />
|
<column name="text_message" type="CLOB" />
|
||||||
|
<column name="html_message" type="CLOB" />
|
||||||
|
<column name="text_layout_file_name" size="255" type="VARCHAR" />
|
||||||
|
<column name="text_template_file_name" size="255" type="VARCHAR" />
|
||||||
|
<column name="html_layout_file_name" size="255" type="VARCHAR" />
|
||||||
<column name="html_template_file_name" size="255" type="VARCHAR" />
|
<column name="html_template_file_name" size="255" type="VARCHAR" />
|
||||||
<unique name="name_UNIQUE">
|
<unique name="name_UNIQUE">
|
||||||
<unique-column name="name" />
|
<unique-column name="name" />
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ContactController extends BaseFrontController
|
|||||||
|
|
||||||
$message = \Swift_Message::newInstance($form->get('subject')->getData())
|
$message = \Swift_Message::newInstance($form->get('subject')->getData())
|
||||||
->addFrom($form->get('email')->getData(), $form->get('name')->getData())
|
->addFrom($form->get('email')->getData(), $form->get('name')->getData())
|
||||||
->addTo(ConfigQuery::read('contact_email'), ConfigQuery::read('company_name'))
|
->addTo(ConfigQuery::read('store_email'), ConfigQuery::read('store_name'))
|
||||||
->setBody($form->get('message')->getData())
|
->setBody($form->get('message')->getData())
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ label {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Textarea in fixed fonts
|
||||||
|
textarea.fixedfont {
|
||||||
|
font-family: @font-family-monospace;
|
||||||
|
}
|
||||||
|
|
||||||
// FORM FIELD FEEDBACK STATES
|
// FORM FIELD FEEDBACK STATES
|
||||||
// --------------------------
|
// --------------------------
|
||||||
|
|
||||||
@@ -73,10 +78,10 @@ form .info {
|
|||||||
|
|
||||||
.search-query {
|
.search-query {
|
||||||
outline: none;
|
outline: none;
|
||||||
.rounded(0px);
|
.rounded(0px);
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
170
templates/backOffice/default/config-store.html
Normal file
170
templates/backOffice/default/config-store.html
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
{extends file="admin-layout.tpl"}
|
||||||
|
|
||||||
|
{block name="page-title"}{intl l='Store'}{/block}
|
||||||
|
|
||||||
|
{block name="check-resource"}admin.configuration.store{/block}
|
||||||
|
{block name="check-access"}update{/block}
|
||||||
|
|
||||||
|
{block name="main-content"}
|
||||||
|
<div class="variables edit-variable">
|
||||||
|
|
||||||
|
<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>{intl l="Store"}</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="Store configuration"}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{form name='thelia.configuration.store'}
|
||||||
|
<form method="POST" action="{url path='/admin/configuration/store/save'}">
|
||||||
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
|
{include
|
||||||
|
file = "includes/inner-form-toolbar.html"
|
||||||
|
hide_flags = true
|
||||||
|
|
||||||
|
page_url = "{url path='/admin/configuration/store'}"
|
||||||
|
close_url = "{url path='/admin/configuration'}"
|
||||||
|
}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<p class="title title-without-tabs">{intl l='General'}</p>
|
||||||
|
|
||||||
|
{if $form_error}
|
||||||
|
<div class="alert alert-danger">{$form_error_message}</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
{form_field form=$form field='store_name'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Used in your store front'}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_business_id'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Store Business Identification Number (SIRET, etc).'}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_email'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Email used when you send an email to your customers (Order confirmations, etc).'}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_phone'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l=''}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_fax'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l=''}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
<p class="title title-without-tabs">{intl l="Store address"}</p>
|
||||||
|
|
||||||
|
{form_field form=$form field='store_address1'}
|
||||||
|
<div style="margin-bottom: 5px" class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Address'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_address2'}
|
||||||
|
<div style="margin-bottom: 5px" class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Additional address'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_address3'}
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Additional address'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_zipcode'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if} </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Zip code'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_city'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='City'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='store_country'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
|
||||||
|
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}>
|
||||||
|
{loop type="country" name="country1"}
|
||||||
|
<option value="{$ID}" {if {$value} == $ID}selected{/if}>{$TITLE}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{include
|
||||||
|
file = "includes/inner-form-toolbar.html"
|
||||||
|
hide_flags = true
|
||||||
|
|
||||||
|
page_url = "{url path='/admin/configuration/store'}"
|
||||||
|
close_url = "{url path='/admin/configuration'}"
|
||||||
|
}
|
||||||
|
|
||||||
|
</form>
|
||||||
|
{/form}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
@@ -116,6 +116,13 @@
|
|||||||
|
|
||||||
{module_include location='system_configuration_top'}
|
{module_include location='system_configuration_top'}
|
||||||
|
|
||||||
|
{loop type="auth" name="pcc-store" role="ADMIN" resource="admin.configuration.store" access="VIEW"}
|
||||||
|
<tr>
|
||||||
|
<td><a href="{url path='/admin/configuration/store'}">{intl l='Store'}</a></td>
|
||||||
|
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/store'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
{/loop}
|
||||||
|
|
||||||
{loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.variable" access="VIEW"}
|
{loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.variable" access="VIEW"}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{url path='/admin/configuration/variables'}">{intl l='System variables'}</a></td>
|
<td><a href="{url path='/admin/configuration/variables'}">{intl l='System variables'}</a></td>
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ Parameters:
|
|||||||
|
|
||||||
<div class="col-md-6 inner-actions">
|
<div class="col-md-6 inner-actions">
|
||||||
{if $hide_submit_buttons != true}
|
{if $hide_submit_buttons != true}
|
||||||
<button type="submit" name="save_mode" value="stay" class="form-submit-button btn btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
<button type="submit" name="save_mode" value="stay" class="form-submit-button btn btn-sm btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||||
<button type="submit" name="save_mode" value="close" class="form-submit-button btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
|
<button type="submit" name="save_mode" value="close" class="form-submit-button btn btn-sm btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
|
||||||
{/if}
|
{/if}
|
||||||
{if ! empty($close_url)}
|
{if ! empty($close_url)}
|
||||||
<a href="{$close_url}" class="page-close-button btn btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
|
<a href="{$close_url}" class="page-close-button btn btn-sm btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,8 +55,10 @@
|
|||||||
|
|
||||||
{form_field form=$form field='name'}
|
{form_field form=$form field='name'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} :
|
||||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="form-control">
|
<span class="label-help-block">{intl l="This the unique name of this message. Do not change this value unless you understand what you do."}</span>
|
||||||
|
</label>
|
||||||
|
<input type="text" id="{$label_attr.for}" {if $required}required="required"{/if} name="{$name}" value="{$value}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
@@ -71,40 +73,126 @@
|
|||||||
|
|
||||||
{form_field form=$form field='title'}
|
{form_field form=$form field='title'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} :
|
||||||
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{$value}">
|
<span class="label-help-block">{intl l="This is the message purpose, such as 'Order confirmation'."}</span>
|
||||||
|
</label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" {if $required}{if $required}required="required"{/if}{/if} title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{$value}">
|
||||||
</div>
|
</div>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
{form_field form=$form field='subject'}
|
{form_field form=$form field='subject'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} :
|
||||||
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Subject'}" placeholder="{intl l='Subject'}" class="form-control" value="{$value}">
|
<span class="label-help-block">{intl l="This is the subject of the e-mail, such as 'Your order is confirmed'."}</span>
|
||||||
</div>
|
|
||||||
{/form_field}
|
|
||||||
|
|
||||||
{form_field form=$form field='html_message'}
|
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
|
||||||
<label for="{$label_attr.for}" class="control-label">
|
|
||||||
{$label} :
|
|
||||||
<span class="label-help-block">{intl l="The mailing template in HTML format."}</span>
|
|
||||||
</label>
|
|
||||||
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control">{$value}</textarea>
|
|
||||||
</div>
|
|
||||||
{/form_field}
|
|
||||||
|
|
||||||
{form_field form=$form field='text_message'}
|
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
|
||||||
<label for="{$label_attr.for}" class="control-label">
|
|
||||||
{$label} :
|
|
||||||
<span class="label-help-block">{intl l="The mailing template in text-only format."}</span>
|
|
||||||
</label>
|
</label>
|
||||||
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control">{$value}</textarea>
|
<input type="text" id="{$label_attr.for}" name="{$name}" {if $required}required="required"{/if} title="{intl l='Subject'}" placeholder="{intl l='Subject'}" class="form-control" value="{$value}">
|
||||||
</div>
|
</div>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading"><h3 class="panel-title">{intl l="HTML version of this message"}</h3></div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{form_field form=$form field='html_layout_file_name'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||||
|
<select id="{$label_attr.for}" name="{$name}" {if $required}required="required"{/if} title="{$label}" class="form-control">
|
||||||
|
<option value="">{intl l='Use default layout'}</option>
|
||||||
|
{foreach $layout_list as $layout}
|
||||||
|
<option value="{$layout}" {if $layout == $value}selected="selected"{/if}>{$layout}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{form_field form=$form field='html_template_file_name'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||||
|
<select data-toggle-textarea="html-message-content" id="{$label_attr.for}" name="{$name}" {if $required}required="required"{/if} title="{$label}" class="textarea-toggle form-control">
|
||||||
|
<option value="">{intl l='Use HTML message defined below'}</option>
|
||||||
|
{foreach $html_template_list as $template}
|
||||||
|
<option value="{$template}" {if $template == $value}selected="selected"{/if}>{$template}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{if ! empty($value)}{$disable_html='readonly="true"'}{/if}
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{form_field form=$form field='html_message'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="html-message-content" class="control-label">
|
||||||
|
{$label}{if $required} <span class="required">*</span>{/if} :
|
||||||
|
<span class="label-help-block">{intl l="The mailing template in HTML format."}</span>
|
||||||
|
</label>
|
||||||
|
<textarea {$disable_html} {if $required}required="required"{/if} name="{$name}" id="html-message-content" rows="10" class="fixedfont form-control">{$value}</textarea>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading"><h3 class="panel-title">{intl l="Text version of this message"}</h3></div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{form_field form=$form field='text_layout_file_name'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||||
|
<select id="{$label_attr.for}" name="{$name}" {if $required}required="required"{/if} title="{$label}" class="form-control">
|
||||||
|
<option value="">{intl l='Use default layout'}</option>
|
||||||
|
{foreach $layout_list as $layout}
|
||||||
|
<option value="{$layout}" {if $layout == $value}selected="selected"{/if}>{$layout}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{form_field form=$form field='text_template_file_name'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||||
|
<select data-toggle-textarea="text-message-content" id="{$label_attr.for}" name="{$name}" {if $required}required="required"{/if} title="{$label}" class="textarea-toggle form-control">
|
||||||
|
<option value="">{intl l='Use Text message defined below'}</option>
|
||||||
|
{foreach $text_template_list as $template}
|
||||||
|
<option value="{$template}" {if $template == $value}selected="selected"{/if}>{$template}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{if ! empty($value)}{$disable_text='readonly="true"'}{/if}
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{form_field form=$form field='text_message'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="text-message-content" class="control-label">
|
||||||
|
{$label}{if $required} <span class="required">*</span>{/if} :
|
||||||
|
<span class="label-help-block">{intl l="The mailing template in text-only format."}</span>
|
||||||
|
</label>
|
||||||
|
<textarea {$disable_text} id="text-message-content" {if $required}required="required"{/if} name="{$name}" rows="10" class="fixedfont form-control">{$value}</textarea>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<p>{intl l='Message created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}}</p>
|
<p>{intl l='Message created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
@@ -129,4 +217,20 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
{block name="javascript-initialization"}
|
||||||
|
<script>
|
||||||
|
(function($) {
|
||||||
|
$('select.textarea-toggle').change(function(ev) {
|
||||||
|
if ($(this).val() != '') {
|
||||||
|
$('#' + $(this).data('toggle-textarea')).addClass("disabled").prop('readonly', true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#' + $(this).data('toggle-textarea')).removeClass('disabled').prop('readonly', false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
|||||||
@@ -127,14 +127,14 @@
|
|||||||
|
|
||||||
{form_field form=$form field='name'}
|
{form_field form=$form field='name'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Mailing template name'}" placeholder="{intl l='Mailing template name'}" class="form-control">
|
<input type="text" id="{$label_attr.for}" {if $required}required="required"{/if} name="{$name}" value="{$value}" title="{intl l='Mailing template name'}" placeholder="{intl l='Mailing template name'}" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
{form_field form=$form field='title'}
|
{form_field form=$form field='title'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||||
|
|
||||||
{loop type="lang" name="default-lang" default_only="1"}
|
{loop type="lang" name="default-lang" default_only="1"}
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Mailing template purpose'}" placeholder="{intl l='Mailing template purpose'}" class="form-control">
|
<input type="text" id="{$label_attr.for}" {if $required}required="required"{/if} name="{$name}" value="{$value}" title="{intl l='Mailing template purpose'}" placeholder="{intl l='Mailing template purpose'}" class="form-control">
|
||||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
|
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
71
templates/email/default/README
Normal file
71
templates/email/default/README
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
About mail layout and templates
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Layouts
|
||||||
|
-------
|
||||||
|
|
||||||
|
Mail layouts are used to provide a layout to all or some of the e-mails sent by
|
||||||
|
the Thelia core or the modules.
|
||||||
|
|
||||||
|
The layouts should have the 'tpl' extension, and should use {$message_body} as the
|
||||||
|
placeholder of the final message content.
|
||||||
|
|
||||||
|
For example, a minimal layout is :
|
||||||
|
|
||||||
|
{$message_body}
|
||||||
|
|
||||||
|
There are no specific limitations in the content of the layout. For exemple, you
|
||||||
|
can forecast inheritance, using a block :
|
||||||
|
|
||||||
|
{block name='message-body'}{$message_body nofilter}{/block}
|
||||||
|
|
||||||
|
(In fact, this is the content of the default HTML layout, default-html-layout.tpl)
|
||||||
|
|
||||||
|
This way, you can extends the layout in message templates :
|
||||||
|
|
||||||
|
{block name='message-body'}
|
||||||
|
|
||||||
|
Here is the template content
|
||||||
|
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
|
||||||
|
Templates
|
||||||
|
---------
|
||||||
|
|
||||||
|
A Template contains the body of a specific message. It can be used It may extends a layout, but
|
||||||
|
in this case, you SHOULD NOT select this layout as the message layout in the back office.
|
||||||
|
|
||||||
|
HTML templates SHOULD have the 'html' extension to be displayed in the "Name of
|
||||||
|
the HTML template file" menu in the back-office.
|
||||||
|
|
||||||
|
TEXT templates SHOULD have the 'text' extension to be displayed in the "Name of
|
||||||
|
the text template file" menu in the back-office.
|
||||||
|
|
||||||
|
|
||||||
|
What you can do with this stuff ?
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
For a specific message, you can :
|
||||||
|
|
||||||
|
Not use templates or layouts, and rely on HTML and TEXT entered in the back-
|
||||||
|
office.
|
||||||
|
|
||||||
|
Use only layouts, to define a common look and feel to your mails. These layouts
|
||||||
|
are be populated (through {$message_body}) with HTML or TEXT entered in the back-
|
||||||
|
office.
|
||||||
|
|
||||||
|
Use only templates, without layouts, to define message content. In this case,
|
||||||
|
HTML or TEXT entered in the back-office is ignored.
|
||||||
|
|
||||||
|
Use layouts and templates, without inheritance. This way, layouts are populated
|
||||||
|
(through {$message_body}) with HTML or TEXT found in the message templates.
|
||||||
|
HTML or TEXT entered in the back-office is ignored.
|
||||||
|
|
||||||
|
Use templates which inherit from a layout. In the layout, {$message_body}
|
||||||
|
(if present) is then ignored, and the classic Smarty bock-based inheritance
|
||||||
|
is used.
|
||||||
|
Be sure in this case to not define an extended layout as ther message layout,
|
||||||
|
or unexpected results may be generated (probably repeated layout content)
|
||||||
|
|
||||||
|
Enjoy.
|
||||||
10
templates/email/default/default-html-layout.tpl
Normal file
10
templates/email/default/default-html-layout.tpl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{*
|
||||||
|
This is the default HTML mail layout. Use {$message_body} as a placeholder for
|
||||||
|
the HTML message defined in the 'HTML Message' field in the back-office, or the
|
||||||
|
content of the selected template in the back-office.
|
||||||
|
|
||||||
|
Be sure to use the nofilter modifier, to prevent HTML escaping.
|
||||||
|
|
||||||
|
DO NOT DELETE THIS FILE, some plugins may use it.
|
||||||
|
*}
|
||||||
|
{block name='message-body'}{$message_body nofilter}{/block}
|
||||||
10
templates/email/default/default-text-layout.tpl
Normal file
10
templates/email/default/default-text-layout.tpl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{*
|
||||||
|
This is the default TEXT mail layout. Use {$message_body} as a placeholder for
|
||||||
|
the text message defined in the 'TEXT Message' field in the back-office, or the
|
||||||
|
content of the selected template in the back-office.
|
||||||
|
|
||||||
|
Be sure to use the nofilter modifier, to prevent HTML escaping.
|
||||||
|
|
||||||
|
DO NOT DELETE THIS FILE, some plugins may use it.
|
||||||
|
*}
|
||||||
|
{block name='message-body'}{$message_body nofilter}{/block}
|
||||||
107
templates/email/default/order_confirmation.html
Normal file
107
templates/email/default/order_confirmation.html
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
{loop name="order.invoice" type="order" id=$order_id customer="*"}
|
||||||
|
{loop name="currency.order" type="currency" id=$CURRENCY}
|
||||||
|
{assign "orderCurrency" $SYMBOL}
|
||||||
|
{/loop}
|
||||||
|
{loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}
|
||||||
|
{assign var="customer_ref" value=$REF}
|
||||||
|
{/loop}
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<title>courriel de confirmation de commande de {config key="url_site"} </title>
|
||||||
|
{literal}
|
||||||
|
<style type="text/css">body {font-family: Arial, Helvetica, sans-serif; font-size:100%; text-align:center;}#liencompte {margin:15px 0 ; text-align:center; font-size:10pt;}#wrapper {width:480pt;margin:0 auto;}#entete {padding-bottom:20px;margin-bottom:10px;border-bottom:1px dotted #000;}#logotexte {float:left;width:180pt;height:75pt;border:1pt solid #000;font-size:18pt;text-align:center;}#logoimg{float:left;}#h2 {margin:0;padding:0;font-size:140%;text-align:center;}#h3 {margin:0;padding:0;font-size:120%;text-align:center;}#tableprix {margin:0 auto;border-collapse:collapse;font-size:80%;}#intitules {font-weight:bold;text-align:center;}#ref {width:65pt;border:1px solid #000;}#designation {width:278pt;border:1px solid #000;}#pu {width:65pt;border:1px solid #000;}#qte {width:60pt;border:1px solid #000;}.ligneproduit{font-weight:normal;}.cellref{text-align:right;padding-right:6pt;border:1px solid #000;}.celldsg{text-align:left;padding-left:6pt;border:1px solid #000;}.cellpu{text-align:right;padding-right:6pt;border:1px solid #000;}.cellqte{text-align:right;padding-right:6pt;border:1px solid #000;}.lignevide{border-bottom:1px solid #000;}.totauxtitre{text-align:right;padding-right:6pt;border-left:1px solid #000;}.totauxcmdtitre{text-align:right;padding-right:6pt;border-left:1px solid #000;border-bottom:1px solid #000;}.totauxprix{text-align:right;padding-right:6pt;border:1px solid #000;}.blocadresses{display:inline;float:left;width:228pt;margin:12pt 4pt 12pt 5pt;font-size:80%;line-height:18pt;text-align:left;border:1px solid #000;}.stylenom{margin:0;padding:0 0 0 10pt;border-bottom:1px solid #000;}.styleliste{margin:0;padding:0 0 0 10pt;}</style>
|
||||||
|
{/literal}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="wrapper">
|
||||||
|
<div id="entete"><h1 id="logotexte">{config key="company_name"}</h1>
|
||||||
|
<h2 id="info">Confirmation de commande</h2>
|
||||||
|
<h3 id="commande">N° {$REF} du <span style="font-size:80%">{format_date date=$INVOICE_DATE output="date"}</span></h3>
|
||||||
|
</div>
|
||||||
|
<table id="tableprix" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr id="intitules">
|
||||||
|
<th id="ref">Référence</th>
|
||||||
|
<th id="designation">Désignation</th>
|
||||||
|
<th id="pu">P.U. €</th>
|
||||||
|
<th id="qte">Qté</th>
|
||||||
|
</tr>
|
||||||
|
{loop type="order_product" name="order-products" order=$ID}
|
||||||
|
{if $WAS_IN_PROMO == 1}
|
||||||
|
{assign "realPrice" $PROMO_PRICE}
|
||||||
|
{assign "realTax" $PROMO_PRICE_TAX}
|
||||||
|
{assign "realTaxedPrice" $TAXED_PROMO_PRICE}
|
||||||
|
{else}
|
||||||
|
{assign "realPrice" $PRICE}
|
||||||
|
{assign "realTax" $PRICE_TAX}
|
||||||
|
{assign "realTaxedPrice" $TAXED_PRICE}
|
||||||
|
{/if}
|
||||||
|
<tr class="ligneproduit">
|
||||||
|
<td class="cellref">{$REF}</td>
|
||||||
|
<td class="celldsg">{$TITLE}
|
||||||
|
{ifloop rel="combinations"}
|
||||||
|
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
|
||||||
|
{$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}<br>
|
||||||
|
{/loop}
|
||||||
|
{/ifloop}
|
||||||
|
</td>
|
||||||
|
<td class="cellpu">{$orderCurrency} {$realTaxedPrice}</td>
|
||||||
|
<td class="cellqte">{$QUANTITY}</td>
|
||||||
|
</tr>
|
||||||
|
{/loop}
|
||||||
|
<!-- insere une ligne vide -->
|
||||||
|
<tr class="ligneproduit">
|
||||||
|
<td class="lignevide" colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="ligneproduit">
|
||||||
|
<td class="totauxtitre" colspan="3">Montant total avant remise €</td>
|
||||||
|
<td class="totauxprix">{$orderCurrency} {$TOTAL_TAXED_AMOUNT - $POSTAGE}</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="ligneproduit">
|
||||||
|
<td class="totauxtitre" colspan="3">Port €</td>
|
||||||
|
<td class="totauxprix">{$orderCurrency} {$POSTAGE}</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="ligneproduit">
|
||||||
|
<td class="totauxcmdtitre" colspan="3">Montant total de la commande €</td>
|
||||||
|
<td class="totauxprix">{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="blocadresses">
|
||||||
|
<p class="stylenom">LIVRAISON : {loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}</p>
|
||||||
|
{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}
|
||||||
|
<p class="styleliste">N° de client : {$customer_ref}</p>
|
||||||
|
<p class="styleliste">Nom :
|
||||||
|
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}</p>
|
||||||
|
<p class="styleliste">N° et rue :
|
||||||
|
{$ADDRESS1}</p>
|
||||||
|
<p class="styleliste">Complément : {$ADDRESS2}
|
||||||
|
{$ADDRESS3}</p>
|
||||||
|
<p class="styleliste">Code postal : {$ZIPCODE}</p>
|
||||||
|
<p class="styleliste">Ville : {$CITY}</p>
|
||||||
|
<p class="styleliste">Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}</p>
|
||||||
|
</div>
|
||||||
|
{/loop}
|
||||||
|
<div class="blocadresses">
|
||||||
|
<p class="stylenom">FACTURATION : paiement par {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</p>
|
||||||
|
{loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS}
|
||||||
|
<p class="styleliste">N° de client : {$customer_ref}</p>
|
||||||
|
<p class="styleliste">Nom :
|
||||||
|
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}</p>
|
||||||
|
<p class="styleliste">N° et rue :
|
||||||
|
{$ADDRESS1}</p>
|
||||||
|
<p class="styleliste">Complément : {$ADDRESS2}
|
||||||
|
{$ADDRESS3}</p>
|
||||||
|
<p class="styleliste">Code postal : {$ZIPCODE}</p>
|
||||||
|
<p class="styleliste">Ville : {$CITY}</p>
|
||||||
|
<p class="styleliste">Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}</p>
|
||||||
|
</div>
|
||||||
|
{/loop}
|
||||||
|
<p id="liencompte">Le suivi de votre commande est disponible dans la rubrique mon compte sur <a href="{config key="url_site"}">{config key="url_site"}</a></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{/loop}
|
||||||
40
templates/email/default/order_confirmation.txt
Normal file
40
templates/email/default/order_confirmation.txt
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{assign var="order_id" value=1}
|
||||||
|
{loop name="order.invoice" type="order" id=$order_id customer="*"}
|
||||||
|
{loop name="currency.order" type="currency" id=$CURRENCY}
|
||||||
|
{assign "orderCurrency" $CODE}
|
||||||
|
{/loop}
|
||||||
|
{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}
|
||||||
|
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}\r\n
|
||||||
|
{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}\r\n
|
||||||
|
{$ZIPCODE} {$CITY}\r\n
|
||||||
|
{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}\r\n
|
||||||
|
{/loop}
|
||||||
|
Confirmation de commande {$REF} du {format_date date=$INVOICE_DATE}\r\n\r\n
|
||||||
|
Les articles commandés:\r\n
|
||||||
|
{loop type="order_product" name="order-products" order=$ID}
|
||||||
|
{if $WAS_IN_PROMO == 1}
|
||||||
|
{assign "realPrice" $PROMO_PRICE}
|
||||||
|
{assign "realTax" $PROMO_PRICE_TAX}
|
||||||
|
{assign "realTaxedPrice" $TAXED_PROMO_PRICE}
|
||||||
|
{else}
|
||||||
|
{assign "realPrice" $PRICE}
|
||||||
|
{assign "realTax" $PRICE_TAX}
|
||||||
|
{assign "realTaxedPrice" $TAXED_PRICE}
|
||||||
|
{/if}
|
||||||
|
\r\n
|
||||||
|
Article : {$TITLE}
|
||||||
|
{ifloop rel="combinations"}
|
||||||
|
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
|
||||||
|
{$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}\r\n
|
||||||
|
{/loop}
|
||||||
|
{/ifloop}\r\n
|
||||||
|
Quantité : {$QUANTITY}\r\n
|
||||||
|
Prix unitaire TTC : {$realTaxedPrice} {$orderCurrency}\r\n
|
||||||
|
{/loop}
|
||||||
|
\r\n-----------------------------------------\r\n
|
||||||
|
Montant total TTC : {$TOTAL_TAXED_AMOUNT - $POSTAGE} {$orderCurrency} \r\n
|
||||||
|
Frais de port TTC : {$POSTAGE} {$orderCurrency} \r\n
|
||||||
|
Somme totale: {$TOTAL_TAXED_AMOUNT} {$orderCurrency} \r\n
|
||||||
|
==================================\r\n\r\n
|
||||||
|
Votre facture est disponible dans la rubrique mon compte sur {config key="url_site"}
|
||||||
|
{/loop}
|
||||||
BIN
templates/frontOffice/default/assets/img/email/header.jpg
Normal file
BIN
templates/frontOffice/default/assets/img/email/header.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
BIN
templates/frontOffice/default/assets/img/email/logo.gif
Normal file
BIN
templates/frontOffice/default/assets/img/email/logo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
123
templates/frontOffice/default/email/order.html
Normal file
123
templates/frontOffice/default/email/order.html
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
{extends file="email/template.tpl"}
|
||||||
|
|
||||||
|
{* Open in browser *}
|
||||||
|
{block name="email-browsers"}{/block}
|
||||||
|
|
||||||
|
{* Subject *}
|
||||||
|
{block name="email-subject"}Your order confirmation Nº __ORDER_REF__{/block}
|
||||||
|
|
||||||
|
{* Title *}
|
||||||
|
{block name="email-title"}Thank you for your order!{/block}
|
||||||
|
|
||||||
|
{* Content *}
|
||||||
|
{block name="email-content"}
|
||||||
|
|
||||||
|
{assign var="orderId" value="1"}
|
||||||
|
|
||||||
|
{loop name="order.invoice" type="order" id=$orderId customer="*"}
|
||||||
|
{loop name="currency.order" type="currency" id=$CURRENCY}
|
||||||
|
{assign "orderCurrencySymbol" $SYMBOL}
|
||||||
|
{assign var="orderCurrencyIsoCode" value=$ISOCODE}
|
||||||
|
{/loop}
|
||||||
|
{loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}
|
||||||
|
{assign var="customerRef" value=$REF}
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
Here are the details of your purchase:<br /><br />
|
||||||
|
|
||||||
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="55%">
|
||||||
|
<strong>Delivery address:</strong><br>
|
||||||
|
{loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS}
|
||||||
|
{$FIRSTNAME} {$LASTNAME}<br />
|
||||||
|
{$ADDRESS1}<br>
|
||||||
|
{if $ADDRESS2 != ""}{$ADDRESS2}<br />{/if}
|
||||||
|
{if $ADDRESS3 != ""}{$ADDRESS3}<br />{/if}
|
||||||
|
{$CITY}<br />
|
||||||
|
{$ZIPCODE}, {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}<br />
|
||||||
|
{/loop}
|
||||||
|
</td>
|
||||||
|
<td valign="top">
|
||||||
|
<strong>Billing address:</strong><br />
|
||||||
|
{loop type="order_address" name="invoice_address" id=$INVOICE_ADDRESS}
|
||||||
|
{$FIRSTNAME} {$LASTNAME}<br />
|
||||||
|
{$ADDRESS1}<br>
|
||||||
|
{if $ADDRESS2 != ""}{$ADDRESS2}<br />{/if}
|
||||||
|
{if $ADDRESS3 != ""}{$ADDRESS3}<br />{/if}
|
||||||
|
{$CITY}<br />
|
||||||
|
{$ZIPCODE}, {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}<br />
|
||||||
|
{/loop}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Order Total: {$TOTAL_TAXED_AMOUNT} {$orderCurrencySymbol} <span style="font-size:90%;color:#777">{$orderCurrencyIsoCode}</span><br />
|
||||||
|
Order Number: {$REF}<br />
|
||||||
|
Paid With: {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}<br />
|
||||||
|
Purchase Date: {format_date date=$CREATE_DATE output="date"}<br />
|
||||||
|
Delivery method: {loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}<br />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:13px;line-height:2em">
|
||||||
|
<tr style="color:#999;font-size:11px">
|
||||||
|
<td style="color:#999;border-bottom:1px solid #000">What You Purchased</td>
|
||||||
|
<td align="right" style="color:#999;border-bottom:1px solid #000">Price in {$orderCurrencyIsoCode}</td>
|
||||||
|
</tr>
|
||||||
|
{loop type="order_product" name="order-products" order=$ID}
|
||||||
|
{if $WAS_IN_PROMO == 1}
|
||||||
|
{assign "realPrice" $PROMO_PRICE}
|
||||||
|
{assign "realTax" $PROMO_PRICE_TAX}
|
||||||
|
{assign "realTaxedPrice" $TAXED_PROMO_PRICE}
|
||||||
|
{else}
|
||||||
|
{assign "realPrice" $PRICE}
|
||||||
|
{assign "realTax" $PRICE_TAX}
|
||||||
|
{assign "realTaxedPrice" $TAXED_PRICE}
|
||||||
|
{/if}
|
||||||
|
<tr>
|
||||||
|
<td style="border-bottom:1px solid #000">
|
||||||
|
<b>{$TITLE}</b> <i>({$REF})</i>
|
||||||
|
{ifloop rel="combinations"}<br />
|
||||||
|
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
|
||||||
|
<span style="color:#999;display:block;font-size:11px;line-height:1.2">* {$ATTRIBUTE_TITLE}: {$ATTRIBUTE_AVAILABILITY_TITLE}</span>
|
||||||
|
{/loop}
|
||||||
|
{/ifloop}
|
||||||
|
</td>
|
||||||
|
<td align="right" style="border-bottom:1px solid #000">
|
||||||
|
{$QUANTITY} x {$realTaxedPrice} {$orderCurrencySymbol}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/loop}
|
||||||
|
<tr>
|
||||||
|
<td align="right" style="text-align:right">Total</td>
|
||||||
|
<td align="right" style="text-align:right">{$TOTAL_TAXED_AMOUNT - $POSTAGE} {$orderCurrencySymbol}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" style="text-align:right">Shipping:</td>
|
||||||
|
<td align="right" style="text-align:right">{$POSTAGE} {$orderCurrencySymbol}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" style="text-align:right"><strong>Order Total</strong></td>
|
||||||
|
<td align="right" style="text-align:right"><strong>{$TOTAL_TAXED_AMOUNT} {$orderCurrencySymbol}</strong></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<h2>Support</h2>
|
||||||
|
For any questions, or concerns, feel free to contact <a href="mailto:support@yourdomain.com" style="color:#3c69c1;text-decoration:none" target="_blank">support@yourdomain.com</a>.<br /><br />
|
||||||
|
<b>Our contact us at:</b> <br />
|
||||||
|
Thelia V2<br>
|
||||||
|
Street name of my business<br />
|
||||||
|
City<br />
|
||||||
|
75000, France
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
Thanks,<br />
|
||||||
|
The Thelia V2 team
|
||||||
|
{/block}
|
||||||
21
templates/frontOffice/default/email/password-reset.html
Normal file
21
templates/frontOffice/default/email/password-reset.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{extends file="email/template.tpl"}
|
||||||
|
|
||||||
|
{* Open in browser *}
|
||||||
|
{block name="email-browsers"}{/block}
|
||||||
|
|
||||||
|
{* Subject *}
|
||||||
|
{block name="email-subject"}Thelia V2 password reset confirmation{/block}
|
||||||
|
|
||||||
|
{* Title *}
|
||||||
|
{block name="email-title"}Password Reset{/block}
|
||||||
|
|
||||||
|
{* Content *}
|
||||||
|
{block name="email-content"}
|
||||||
|
Hi there,<br /><br />
|
||||||
|
There was recently a request to change the password on your account.<br /><br />
|
||||||
|
If you requested this password change, please set a new password by following the link below:<br /><br />
|
||||||
|
<a href="__SITE__/forgot?forgot_key=5e20f225cedd08a3" target="_blank">__SITE__/forgot?forgot_key=5e20f225cedd08a3</a><br /><br />
|
||||||
|
If you don't want to change your password, just ignore this message.<br /><br />
|
||||||
|
Thanks,<br />
|
||||||
|
- The Thelia V2 Team
|
||||||
|
{/block}
|
||||||
21
templates/frontOffice/default/email/password.html
Normal file
21
templates/frontOffice/default/email/password.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{extends file="email/template.tpl"}
|
||||||
|
|
||||||
|
{* Open in browser *}
|
||||||
|
{block name="email-browsers"}{/block}
|
||||||
|
|
||||||
|
{* Subject *}
|
||||||
|
{block name="email-subject"}Your password for Thelia V2{/block}
|
||||||
|
|
||||||
|
{* Title *}
|
||||||
|
{block name="email-title"}Password{/block}
|
||||||
|
|
||||||
|
{* Content *}
|
||||||
|
{block name="email-content"}
|
||||||
|
Hi there,<br /><br />
|
||||||
|
You have requested a new password for your Thelia V2 account.<br /><br />
|
||||||
|
Your new password is:<br />
|
||||||
|
__PASSWORD__<br /><br />
|
||||||
|
You can change your password in your user account by opening the "Change my password" link under your personal information.<br /><br />
|
||||||
|
Kind regards,<br />
|
||||||
|
- The Thelia V2 Team
|
||||||
|
{/block}
|
||||||
42
templates/frontOffice/default/email/register.html
Normal file
42
templates/frontOffice/default/email/register.html
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{extends file="email/template.tpl"}
|
||||||
|
|
||||||
|
{* Open in browser *}
|
||||||
|
{block name="email-browsers"}{/block}
|
||||||
|
|
||||||
|
{* Subject *}
|
||||||
|
{block name="email-subject"}Welcome to Thelia V2{/block}
|
||||||
|
|
||||||
|
{* Title *}
|
||||||
|
{block name="email-title"}Welcome to Thelia V2{/block}
|
||||||
|
|
||||||
|
{* Content *}
|
||||||
|
{block name="email-content"}
|
||||||
|
{assign var="customerId" value="1"}
|
||||||
|
|
||||||
|
|
||||||
|
<p>Congratulations! You have successfully created an account on Thelia v2 demo site. Keep this email as a reference of your account details, and helpful links.</p>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<h2>Accessing Your Account:</h2>
|
||||||
|
Login at: <a href="{url path="/login"}">{url path="/login"}</a><br />
|
||||||
|
{loop type="customer" name="customer.info" id=$customerId}
|
||||||
|
Username: {$EMAIL} <br />
|
||||||
|
Password: __MOTDEPASSE__<br />
|
||||||
|
{/loop}
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<h2>Support</h2>
|
||||||
|
For any questions, or concerns, feel free to contact <a href="mailto:support@yourdomain.com" style="color:#3c69c1;text-decoration:none" target="_blank">support@yourdomain.com</a>.<br />
|
||||||
|
|
||||||
|
<br />
|
||||||
|
Learn more about Thelia V2.<br />
|
||||||
|
Our site: <a href="http://thelia.net/v2" style="color:#3c69c1;text-decoration:none" target="_blank">http://thelia.net/v2</a><br />
|
||||||
|
Twitter: <a href="http://twitter.com/theliaecommerce" style="color:#3c69c1;text-decoration:none" target="_blank">http://twitter.com/theliaecommerce</a><br />
|
||||||
|
Facebook: <a href="http://www.facebook.com/theliaecommerce" style="color:#3c69c1;text-decoration:none" target="_blank">http://www.facebook.com/theliaecommerce</a>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
Thanks,<br />
|
||||||
|
- The Thelia V2 Team
|
||||||
|
{/block}
|
||||||
485
templates/frontOffice/default/email/template.tpl
Normal file
485
templates/frontOffice/default/email/template.tpl
Normal file
@@ -0,0 +1,485 @@
|
|||||||
|
{assign var="url_site" value="{config key="url_site"}"}
|
||||||
|
{assign var="company_name" value="{config key="company_name"}"}
|
||||||
|
{if not $company_name}
|
||||||
|
{assign var="company_name" value="{intl l='Thelia V2'}"}
|
||||||
|
{/if}
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>{block name="email-subject"}{/block}</title>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
{literal}
|
||||||
|
#outlook a{
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.ReadMsgBody{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
.ExternalClass{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
.yshortcuts,a .yshortcuts,a .yshortcuts:hover,a .yshortcuts:active,a .yshortcuts:focus{
|
||||||
|
background-color:transparent !important;
|
||||||
|
border:none !important;
|
||||||
|
color:inherit !important;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
border:0;
|
||||||
|
height:auto;
|
||||||
|
line-height:100%;
|
||||||
|
outline:none;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
table,td{
|
||||||
|
border-collapse:collapse !important;
|
||||||
|
mso-table-lspace:0pt;
|
||||||
|
mso-table-rspace:0pt;
|
||||||
|
}
|
||||||
|
#bodyTable,#bodyCell{
|
||||||
|
height:100% !important;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
width:100% !important;
|
||||||
|
}
|
||||||
|
#bodyCell{
|
||||||
|
padding:20px;
|
||||||
|
}
|
||||||
|
.templateContainer{
|
||||||
|
width:600px;
|
||||||
|
}
|
||||||
|
h1{
|
||||||
|
color:#202020;
|
||||||
|
display:block;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:26px;
|
||||||
|
font-style:normal;
|
||||||
|
font-weight:bold;
|
||||||
|
line-height:100%;
|
||||||
|
letter-spacing:normal;
|
||||||
|
margin-top:0;
|
||||||
|
margin-right:0;
|
||||||
|
margin-bottom:10px;
|
||||||
|
margin-left:0;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
color:#404040;
|
||||||
|
display:block;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:20px;
|
||||||
|
font-style:normal;
|
||||||
|
font-weight:bold;
|
||||||
|
line-height:100%;
|
||||||
|
letter-spacing:normal;
|
||||||
|
margin-top:0;
|
||||||
|
margin-right:0;
|
||||||
|
margin-bottom:10px;
|
||||||
|
margin-left:0;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
h3{
|
||||||
|
color:#606060;
|
||||||
|
display:block;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:16px;
|
||||||
|
font-style:normal;
|
||||||
|
font-weight:bold;
|
||||||
|
line-height:100%;
|
||||||
|
letter-spacing:normal;
|
||||||
|
margin-top:0;
|
||||||
|
margin-right:0;
|
||||||
|
margin-bottom:10px;
|
||||||
|
margin-left:0;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
h4{
|
||||||
|
color:#808080;
|
||||||
|
display:block;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:12px;
|
||||||
|
font-style:normal;
|
||||||
|
font-weight:bold;
|
||||||
|
line-height:100%;
|
||||||
|
letter-spacing:normal;
|
||||||
|
margin-top:0;
|
||||||
|
margin-right:0;
|
||||||
|
margin-bottom:10px;
|
||||||
|
margin-left:0;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
#templatePreheader{
|
||||||
|
background-color:#f5f5f5;
|
||||||
|
border-top:10px solid #f5f5f5;
|
||||||
|
border-bottom:0;
|
||||||
|
}
|
||||||
|
.preheaderContent{
|
||||||
|
color:#707070;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:10px;
|
||||||
|
line-height:125%;
|
||||||
|
padding-top:10px;
|
||||||
|
padding-bottom:10px;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
.preheaderContent a:link,.preheaderContent a:visited,.preheaderContent a .yshortcuts {
|
||||||
|
color:#FFFFFF;
|
||||||
|
font-weight:normal;
|
||||||
|
text-decoration:underline;
|
||||||
|
}
|
||||||
|
#templateHeader{
|
||||||
|
background-color:#FFFFFF;
|
||||||
|
border-top:10px solid #f5f5f5;
|
||||||
|
border-bottom:0;
|
||||||
|
}
|
||||||
|
.headerContent{
|
||||||
|
color:#202020;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:20px;
|
||||||
|
font-weight:bold;
|
||||||
|
line-height:100%;
|
||||||
|
padding-top:40px;
|
||||||
|
padding-right:0;
|
||||||
|
padding-bottom:20px;
|
||||||
|
padding-left:0;
|
||||||
|
text-align:left;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
.headerContent a:link,.headerContent a:visited,.headerContent a .yshortcuts {
|
||||||
|
color:#E1523D;
|
||||||
|
font-weight:normal;
|
||||||
|
text-decoration:underline;
|
||||||
|
}
|
||||||
|
#templateBody{
|
||||||
|
background-color:#FFFFFF;
|
||||||
|
border-top:0;
|
||||||
|
border-bottom:0;
|
||||||
|
}
|
||||||
|
.titleContentBlock{
|
||||||
|
background-color:#ffffff;
|
||||||
|
border-top:0px solid #F47766;
|
||||||
|
border-bottom:0px solid #B14031;
|
||||||
|
}
|
||||||
|
.titleContent{
|
||||||
|
color:#7a7a7a;
|
||||||
|
font-family:Arial;
|
||||||
|
font-size:24px;
|
||||||
|
font-weight:normal;
|
||||||
|
line-height:110%;
|
||||||
|
padding-top:5px;
|
||||||
|
padding-bottom:5px;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
.bodyContentBlock{
|
||||||
|
background-color:#FFFFFF;
|
||||||
|
border-top:0;
|
||||||
|
border-bottom:1px solid #E5E5E5;
|
||||||
|
}
|
||||||
|
.bodyContent{
|
||||||
|
color:#505050;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:16px;
|
||||||
|
line-height:150%;
|
||||||
|
padding-top:20px;
|
||||||
|
padding-bottom:20px;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
.bodyContent a:link,.bodyContent a:visited,.bodyContent a .yshortcuts {
|
||||||
|
color:#E1523D;
|
||||||
|
font-weight:normal;
|
||||||
|
text-decoration:underline;
|
||||||
|
}
|
||||||
|
.templateButton{
|
||||||
|
-moz-border-radius:5px;
|
||||||
|
-webkit-border-radius:5px;
|
||||||
|
background-color:#f49a17;
|
||||||
|
border:0;
|
||||||
|
border-radius:5px;
|
||||||
|
}
|
||||||
|
.templateButtonContent,.templateButtonContent a:link,.templateButtonContent a:visited,.templateButtonContent a .yshortcuts {
|
||||||
|
color:#FFFFFF;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:15px;
|
||||||
|
font-weight:bold;
|
||||||
|
letter-spacing:-.5px;
|
||||||
|
line-height:100%;
|
||||||
|
text-align:center;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
.bodyContent img{
|
||||||
|
display:inline;
|
||||||
|
height:auto;
|
||||||
|
max-width:600px;
|
||||||
|
}
|
||||||
|
body,#bodyTable{
|
||||||
|
background-color:#444444;
|
||||||
|
}
|
||||||
|
#templateFooter{
|
||||||
|
border-top:0;
|
||||||
|
}
|
||||||
|
.footerContent{
|
||||||
|
color:#808080;
|
||||||
|
font-family:Helvetica;
|
||||||
|
font-size:10px;
|
||||||
|
line-height:150%;
|
||||||
|
padding-top:20px;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
.footerContent a:link,.footerContent a:visited,.footerContent a .yshortcuts {
|
||||||
|
color:#606060;
|
||||||
|
font-weight:normal;
|
||||||
|
text-decoration:underline;
|
||||||
|
}
|
||||||
|
.footerContent img{
|
||||||
|
display:inline;
|
||||||
|
max-width:600px;
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 480px){
|
||||||
|
body,table,td,p,a,li,blockquote{
|
||||||
|
-webkit-text-size-adjust:none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body{
|
||||||
|
width:auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class=templateContainer]{
|
||||||
|
width:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[class=templateContainer]{
|
||||||
|
max-width:600px !important;
|
||||||
|
width:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
font-size:24px !important;
|
||||||
|
line-height:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2{
|
||||||
|
font-size:20px !important;
|
||||||
|
line-height:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3{
|
||||||
|
font-size:18px !important;
|
||||||
|
line-height:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4{
|
||||||
|
font-size:16px !important;
|
||||||
|
line-height:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table[id=templatePreheader]{
|
||||||
|
display:none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
img[id=headerImage]{
|
||||||
|
height:auto !important;
|
||||||
|
max-width:233px !important;
|
||||||
|
width:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
td[class=headerContent]{
|
||||||
|
font-size:20px !important;
|
||||||
|
line-height:150% !important;
|
||||||
|
padding-top:40px !important;
|
||||||
|
padding-right:10px !important;
|
||||||
|
padding-bottom:20px !important;
|
||||||
|
padding-left:10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
img[class=bodyImage]{
|
||||||
|
height:auto !important;
|
||||||
|
max-width:580px !important;
|
||||||
|
width:100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
td[class=titleContent]{
|
||||||
|
font-size:20px !important;
|
||||||
|
line-height:125% !important;
|
||||||
|
padding-right:10px;
|
||||||
|
padding-left:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td[class=bodyContent]{
|
||||||
|
font-size:16px !important;
|
||||||
|
line-height:125% !important;
|
||||||
|
padding-right:10px;
|
||||||
|
padding-left:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td[class=footerContent]{
|
||||||
|
font-size:14px !important;
|
||||||
|
line-height:150% !important;
|
||||||
|
padding-right:10px;
|
||||||
|
padding-left:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td[class=footerContent] a{
|
||||||
|
display:block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.preheaderContent a:link,.preheaderContent a:visited,.preheaderContent a .yshortcuts{
|
||||||
|
color:#f49a17;
|
||||||
|
}
|
||||||
|
.footerContent a:link,.footerContent a:visited,.footerContent a .yshortcuts{
|
||||||
|
color:#ffffff;
|
||||||
|
}
|
||||||
|
.bodyContent a:link,.bodyContent a:visited,.bodyContent a .yshortcuts{
|
||||||
|
color:#f49a17;
|
||||||
|
text-decoration:none;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
.templateButtonContent,.templateButtonContent a:link,.templateButtonContent a:visited,.templateButtonContent a .yshortcuts{
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
{/literal}
|
||||||
|
</style></head>
|
||||||
|
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="margin: 0;padding: 0;background-color: #444444;">
|
||||||
|
<center>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;margin: 0;padding: 0;background-color: #444444;border-collapse: collapse !important;height: 100% !important;width: 100% !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templatePreheader" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;background-color: #f5f5f5;border-top: 10px solid #f5f5f5;border-bottom: 0;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" class="templateContainer" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 600px;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" class="preheaderContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #707070;font-family: Helvetica;font-size: 10px;line-height: 125%;padding-top: 10px;padding-bottom: 10px;text-align: left;border-collapse: collapse !important;">
|
||||||
|
{block name="email-intro"}{intl l="Welcome to Thelia. This is a demo site built with Thelia V2 an E-Commerce solution based on Symfony 2."}{/block}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td valign="top" class="preheaderContent" style="padding-left: 20px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #707070;font-family: Helvetica;font-size: 10px;line-height: 125%;padding-top: 10px;padding-bottom: 10px;text-align: left;border-collapse: collapse !important;" width="200">
|
||||||
|
{block name="browser"}{intl l="Email not displaying correctly?"}<br><a href="{config key="url_site"}?view=email/register" target="_blank" style="color: #f49a17;font-weight: normal;text-decoration: underline;">{intl l="View it in your browser"}</a>.{/block}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;background-color: #FFFFFF;border-top: 10px solid #f5f5f5;border-bottom: 0;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" class="templateContainer" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 600px;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td class="headerContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #202020;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 100%;padding-top: 40px;padding-right: 0;padding-bottom: 20px;padding-left: 0;text-align: left;vertical-align: middle;border-collapse: collapse !important;">
|
||||||
|
{images file='../assets/img/email/logo.gif'}<img src="{$asset_url}" alt="{$company_name}" border="0" style="border: 0px none;border-color: ;border-style: none;border-width: 0px;height: 75px;width: 135px;margin: 0;padding: 0;line-height: 100%;outline: none;text-decoration: none;" width="135" height="75">{/images}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;background-color: #FFFFFF;border-top: 0;border-bottom: 0;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="padding-top: 20px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" class="templateContainer" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 600px;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="10" cellspacing="0" width="100%" class="titleContentBlock" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;background-color: #ffffff;border-top: 0px solid #F47766;border-bottom: 0px solid #B14031;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" class="titleContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #7a7a7a;font-family: Arial;font-size: 24px;font-weight: normal;line-height: 110%;padding-top: 5px;padding-bottom: 5px;text-align: left;border-collapse: collapse !important;">
|
||||||
|
{block name="email-title"}{/block}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="padding-bottom: 40px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="10" cellspacing="0" width="100%" class="bodyContentBlock" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;background-color: #FFFFFF;border-top: 0;border-bottom: 1px solid #E5E5E5;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td class="bodyContent" style="padding-bottom: 20px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #505050;font-family: Helvetica;font-size: 16px;line-height: 150%;padding-top: 20px;text-align: left;border-collapse: collapse !important;">
|
||||||
|
{images file='../assets/img/email/header.jpg'}<img class="bodyImage" src="{$asset_url}" alt="" border="0" style="border: 0px none;border-color: ;border-style: none;border-width: 0px;height: 188px;width: 580px;margin: 0;padding: 0;line-height: 100%;outline: none;text-decoration: none;display: inline;max-width: 600px;" width="580" height="188">{/images}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" class="bodyContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #505050;font-family: Helvetica;font-size: 14px;line-height: 150%;padding-top: 0px;padding-bottom: 20px;text-align: left;border-collapse: collapse !important;">
|
||||||
|
{block name="email-content"}{/block}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{* button
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top" style="padding-bottom: 40px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="15" cellspacing="0" class="templateButton" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;-moz-border-radius: 5px;-webkit-border-radius: 5px;background-color: #f49a17;border: 0;border-radius: 5px;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="middle" class="templateButtonContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #FFFFFF;font-family: Helvetica;font-size: 15px;font-weight: normal;letter-spacing: -.5px;line-height: 100%;text-align: center;text-decoration: none;border-collapse: collapse !important;">
|
||||||
|
<a href="#" target="_blank" style="color: #FFFFFF;font-family: Helvetica;font-size: 15px;font-weight: normal;letter-spacing: -.5px;line-height: 100%;text-align: center;text-decoration: none;">Link Button</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>*}
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateFooter" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-top: 0;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" style="padding-bottom: 40px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-collapse: collapse !important;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" class="templateContainer" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 600px;border-collapse: collapse !important;">
|
||||||
|
<tr>
|
||||||
|
<td valign="top" class="footerContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #808080;font-family: Helvetica;font-size: 10px;line-height: 150%;padding-top: 20px;text-align: left;border-collapse: collapse !important;">
|
||||||
|
<a href="http://twitter.com/theliaecommerce" style="color: #ffffff;font-weight: normal;text-decoration: underline;">Follow on Twitter</a> <a href="http://www.facebook.com/theliaecommerce" style="color: #ffffff;font-weight: normal;text-decoration: underline;">Friend on Facebook</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" class="footerContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #808080;font-family: Helvetica;font-size: 10px;line-height: 150%;padding-top: 20px;text-align: left;border-collapse: collapse !important;">
|
||||||
|
<strong>{intl l="Our mailing address is:"}</strong>
|
||||||
|
<br>
|
||||||
|
Street name of my business 75000 City, France
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<em>{intl l="Copyright"} © {'Y'|date} {$company_name}, {intl l="All rights reserved."}</em>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{* Unsubscribe
|
||||||
|
<tr>
|
||||||
|
<td valign="top" class="footerContent" style="mso-table-lspace: 0pt;mso-table-rspace: 0pt;color: #808080;font-family: Helvetica;font-size: 10px;line-height: 150%;padding-top: 20px;text-align: left;border-collapse: collapse !important;">
|
||||||
|
<a href="*|UNSUB|*" style="color: #ffffff;font-weight: normal;text-decoration: underline;">unsubscribe from this list</a> <a href="*|UPDATE_PROFILE|*" style="color: #ffffff;font-weight: normal;text-decoration: underline;">update subscription preferences</a>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
*|IF:REWARDS|* *|HTML:REWARDS|* *|END:IF|*
|
||||||
|
</td>
|
||||||
|
</tr>*}
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
{* Declare assets directory, relative to template base directory *}
|
{* Declare assets directory, relative to template base directory *}
|
||||||
{declare_assets directory='assets'}
|
{declare_assets directory='assets'}
|
||||||
{block name="no-return-functions"}{/block}
|
{block name="no-return-functions"}{/block}
|
||||||
{assign var="company_name" value="{config key="company_name"}"}
|
{assign var="store_name" value="{config key="store_name"}"}
|
||||||
{if not $company_name}
|
{if not $store_name}
|
||||||
{assign var="company_name" value="{intl l='Thelia V2'}"}
|
{assign var="store_name" value="{intl l='Thelia V2'}"}
|
||||||
{/if}
|
{/if}
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--
|
<!--
|
||||||
@@ -37,14 +37,14 @@ GNU General Public License : http://www.gnu.org/licenses/
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
{* Page Title *}
|
{* Page Title *}
|
||||||
<title>{block name="page-title"}{strip}{if $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title} - {/foreach}{/if}{$company_name}{/strip}{/block}</title>
|
<title>{block name="page-title"}{strip}{if $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title} - {/foreach}{/if}{$store_name}{/strip}{/block}</title>
|
||||||
|
|
||||||
{* Meta Tags *}
|
{* Meta Tags *}
|
||||||
<meta name="generator" content="{intl l='Thelia V2'}">
|
<meta name="generator" content="{intl l='Thelia V2'}">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
{block name="meta"}
|
{block name="meta"}
|
||||||
<meta name="description" content="{$company_name}">
|
<meta name="description" content="{$store_name}">
|
||||||
<meta name="robots" content="noindex,nofollow">
|
<meta name="robots" content="noindex,nofollow">
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="{navigate to="index"}">{$company_name}</a>
|
<a class="navbar-brand" href="{navigate to="index"}">{$store_name}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Place everything within .nav-collapse to hide it until above 768px -->
|
<!-- Place everything within .nav-collapse to hide it until above 768px -->
|
||||||
@@ -146,8 +146,8 @@ GNU General Public License : http://www.gnu.org/licenses/
|
|||||||
<header class="container" role="banner">
|
<header class="container" role="banner">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1 class="logo">
|
<h1 class="logo">
|
||||||
<a href="{navigate to="index"}" title="{$company_name}">
|
<a href="{navigate to="index"}" title="{$store_name}">
|
||||||
{images file='assets/img/logo.gif'}<img src="{$asset_url}" alt="{$company_name}">{/images}
|
{images file='assets/img/logo.gif'}<img src="{$asset_url}" alt="{$store_name}">{/images}
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@@ -356,21 +356,30 @@ GNU General Public License : http://www.gnu.org/licenses/
|
|||||||
<section class="block block-contact" itemscope itemtype="http://schema.org/Organization">
|
<section class="block block-contact" itemscope itemtype="http://schema.org/Organization">
|
||||||
<div class="block-heading"><h3 class="block-title">{intl l="Contact Us"}</h3></div>
|
<div class="block-heading"><h3 class="block-title">{intl l="Contact Us"}</h3></div>
|
||||||
<div class="block-content">
|
<div class="block-content">
|
||||||
<meta itemprop="name" content="{$company_name}">
|
<meta itemprop="name" content="{$store_name}">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="contact-address">
|
<li class="contact-address">
|
||||||
<address class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
<address class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
||||||
<span class="street-address" itemprop="streetAddress">Street name of my business</span><br>
|
<span class="street-address" itemprop="streetAddress">{config key="store_address1"} {config key="store_address2"} {config key="store_address3"}</span><br>
|
||||||
<span class="postal-code" itemprop="postalCode">75000</span>
|
<span class="postal-code" itemprop="postalCode">{config key="store_zipcode"}</span>
|
||||||
<span class="locality" itemprop="addressLocality">City, <span class="country-name">France</span></span>
|
<span class="locality" itemprop="addressLocality">
|
||||||
|
{config key="store_city"}
|
||||||
|
{if {config key="store_country"} }
|
||||||
|
{loop type="country" name="address.country.title" id={config key="store_country"}}, <span class="country-name">{$TITLE}</span>{/loop}
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
</address>
|
</address>
|
||||||
</li>
|
</li>
|
||||||
|
{if {config key="store_phone"} }
|
||||||
<li class="contact-phone">
|
<li class="contact-phone">
|
||||||
<span class="tel" itemprop="telephone">+33 (0)0 00 00 00 00</span>
|
<span class="tel" itemprop="telephone">{config key="store_phone"}</span>
|
||||||
</li>
|
</li>
|
||||||
|
{/if}
|
||||||
|
{if {config key="store_email"} }
|
||||||
<li class="contact-email">
|
<li class="contact-email">
|
||||||
{mailto address="contact@yourdomain.com" encode="hex" extra='class="email" itemprop="email"'}
|
{mailto address="{config key="store_email"}" encode="hex" extra='class="email" itemprop="email"'}
|
||||||
</li>
|
</li>
|
||||||
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -159,9 +159,13 @@
|
|||||||
{form_field form=$form field='product_sale_elements_id'}
|
{form_field form=$form field='product_sale_elements_id'}
|
||||||
<select name="{$name}" class="form-control">
|
<select name="{$name}" class="form-control">
|
||||||
{loop name="stock" type="product_sale_elements" product="$ID" order="min_price"}
|
{loop name="stock" type="product_sale_elements" product="$ID" order="min_price"}
|
||||||
{loop name="combi" type="attribute_combination" product_sale_elements="$ID" order="alpha"}
|
<option value="{$ID}" data-quantity="{$QUANTITY}" data-price="{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}" data-old-price="{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}">
|
||||||
<option value="{$ID}" data-quantity="{$QUANTITY}" data-price="{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}" data-old-price="{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}">{$ATTRIBUTE_AVAILABILITY_TITLE}</option>
|
{$REF}
|
||||||
{/loop}
|
({loop name="combi" type="attribute_combination" product_sale_elements="$ID" order="alpha"}
|
||||||
|
{if $LOOP_COUNT > 1}-{/if}
|
||||||
|
{$ATTRIBUTE_AVAILABILITY_TITLE}
|
||||||
|
{/loop})
|
||||||
|
</option>
|
||||||
{/loop}
|
{/loop}
|
||||||
</select>
|
</select>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
@@ -192,17 +196,19 @@
|
|||||||
|
|
||||||
{strip}
|
{strip}
|
||||||
{capture "additional"}
|
{capture "additional"}
|
||||||
{ifloop rel="feature_value_info"}
|
{ifloop rel="feature_info"}
|
||||||
<ul>
|
{ifloop rel="feature_value_info"}
|
||||||
{loop name="feature_info" type="feature" product="{$ID}"}
|
<ul>
|
||||||
<li>
|
{loop name="feature_info" type="feature" product="{$ID}"}
|
||||||
<strong>{$TITLE}</strong> :
|
<li>
|
||||||
{loop name="feature_value_info" type="feature_value" feature="{$ID}" product="{product attr="id"}"}
|
<strong>{$TITLE}</strong> :
|
||||||
{$TITLE}
|
{loop name="feature_value_info" type="feature_value" feature="{$ID}" product="{product attr="id"}"}
|
||||||
{/loop}
|
{$TITLE}
|
||||||
</li>
|
{/loop}
|
||||||
{/loop}
|
</li>
|
||||||
</ul>
|
{/loop}
|
||||||
|
</ul>
|
||||||
|
{/ifloop}
|
||||||
{/ifloop}
|
{/ifloop}
|
||||||
{/capture}
|
{/capture}
|
||||||
{/strip}
|
{/strip}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
<div style="text-align: center; padding-bottom: 5mm;">
|
<div style="text-align: center; padding-bottom: 5mm;">
|
||||||
<h1 style="font-size: 5mm;">
|
<h1 style="font-size: 5mm;">
|
||||||
{config key="company_name"}
|
{config key="store_name"}
|
||||||
<!-- Vous pouvez remplacer #VARIABLE(nomsite) par le nom de votre entreprise -->
|
<!-- Vous pouvez remplacer #VARIABLE(nomsite) par le nom de votre entreprise -->
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<td style="width:50%; padding: 0; border: none;" valign="bottom">
|
<td style="width:50%; padding: 0; border: none;" valign="bottom">
|
||||||
|
|
||||||
<div style="text-align: center; padding-bottom: 10mm;">
|
<div style="text-align: center; padding-bottom: 10mm;">
|
||||||
<h1>{config key="company_name"}</h1>
|
<h1>{config key="store_name"}</h1>
|
||||||
<p><!-- Insérer ici l'adresse de votre entreprise --></p>
|
<p><!-- Insérer ici l'adresse de votre entreprise --></p>
|
||||||
<h2>{intl l="invoice"} {$INVOICE_REF}</h2>
|
<h2>{intl l="invoice"} {$INVOICE_REF}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ if (!$err && $_SESSION['install']['step'] != $step) {
|
|||||||
|
|
||||||
$_SESSION['install']['step'] = $step;
|
$_SESSION['install']['step'] = $step;
|
||||||
|
|
||||||
|
// Retrieve the website url
|
||||||
|
$url = $_SERVER['PHP_SELF'];
|
||||||
|
$website_url = preg_replace("#/install/[a-z](.*)#" ,'', $url);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form action="end.php" method="POST" >
|
<form action="end.php" method="POST" >
|
||||||
<div class="well">
|
<div class="well">
|
||||||
@@ -90,15 +94,15 @@ $_SESSION['install']['step'] = $step;
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email_contact">Contact email :</label>
|
<label for="email_contact">Contact email :</label>
|
||||||
<input id="email_contact" class="form-control" type="text" name="email_contact" placeholder="foo@bar.com" value="" required>
|
<input id="email_contact" class="form-control" type="text" name="store_email" placeholder="foo@bar.com" value="" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="site_name">Company name :</label>
|
<label for="site_name">Company name :</label>
|
||||||
<input id="site_name" class="form-control" type="text" name="company_name" placeholder="" value="" required>
|
<input id="site_name" class="form-control" type="text" name="store_name" placeholder="" value="" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="site_name">website url :</label>
|
<label for="site_name">website url :</label>
|
||||||
<input id="site_name" class="form-control" type="text" name="url_site" placeholder="" value="http://<?php echo $_SERVER['SERVER_NAME']; ?>" required>
|
<input id="site_name" class="form-control" type="text" name="url_site" placeholder="" value="http://<?php echo $_SERVER['SERVER_NAME'].$website_url; ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<div class="control-btn">
|
<div class="control-btn">
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ if($_SESSION['install']['step'] == 5) {
|
|||||||
|
|
||||||
|
|
||||||
\Thelia\Model\ConfigQuery::create()
|
\Thelia\Model\ConfigQuery::create()
|
||||||
->filterByName('contact_email')
|
->filterByName('store_email')
|
||||||
->update(array('Value' => $_POST['email_contact']));
|
->update(array('Value' => $_POST['store_email']));
|
||||||
|
|
||||||
\Thelia\Model\ConfigQuery::create()
|
\Thelia\Model\ConfigQuery::create()
|
||||||
->filterByName('company_name')
|
->filterByName('store_name')
|
||||||
->update(array('Value' => $_POST['company_name']));
|
->update(array('Value' => $_POST['store_name']));
|
||||||
|
|
||||||
\Thelia\Model\ConfigQuery::create()
|
\Thelia\Model\ConfigQuery::create()
|
||||||
->filterByName('url_site')
|
->filterByName('url_site')
|
||||||
@@ -58,6 +58,11 @@ $fs->remove(THELIA_ROOT . '/cache/dev');
|
|||||||
|
|
||||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||||
$_SESSION['install']['step'] = $step;
|
$_SESSION['install']['step'] = $step;
|
||||||
|
|
||||||
|
// Retrieve the website url
|
||||||
|
$url = $_SERVER['PHP_SELF'];
|
||||||
|
$website_url = preg_replace("#/install/[a-z](.*)#" ,'', $url);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="well">
|
<div class="well">
|
||||||
@@ -69,8 +74,8 @@ $_SESSION['install']['step'] = $step;
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="lead text-center">
|
<p class="lead text-center">
|
||||||
<a href="<?php echo $request->getSchemeAndHttpHost(); ?>/admin">Go to back office</a>
|
<a href="<?php echo $request->getSchemeAndHttpHost().$website_url; ?>/admin">Go to back office</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php include "footer.php"; ?>
|
<?php include "footer.php"; ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user