Merge branch 'backoffice' into frontend
This commit is contained in:
@@ -288,8 +288,8 @@ class Order extends BaseAction implements EventSubscriberInterface
|
||||
*/
|
||||
public function sendOrderEmail(OrderEvent $event)
|
||||
{
|
||||
$contact_email = ConfigQuery::read('contact_email');
|
||||
if($contact_email) {
|
||||
$store_email = ConfigQuery::read('store_email');
|
||||
if($store_email) {
|
||||
$order = $event->getOrder();
|
||||
$customer = $order->getCustomer();
|
||||
|
||||
@@ -311,7 +311,7 @@ class Order extends BaseAction implements EventSubscriberInterface
|
||||
|
||||
$instance = \Swift_Message::newInstance($subject)
|
||||
->addTo($customer->getEmail(), $customer->getFirstname()." ".$customer->getLastname())
|
||||
->addFrom(ConfigQuery::read('contact_email'), ConfigQuery::read('company_name'))
|
||||
->addFrom($store_email, ConfigQuery::read('store_name'))
|
||||
;
|
||||
$instance
|
||||
->setBody($htmlMessage, 'text/html')
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
<form name="thelia.lang.defaultBehavior" class="Thelia\Form\Lang\LangDefaultBehaviorForm"/>
|
||||
<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.admin.module.modification" class="Thelia\Form\ModuleModificationForm"/>
|
||||
|
||||
@@ -512,6 +512,17 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\ConfigController::deleteAction</default>
|
||||
</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 -->
|
||||
|
||||
<route id="admin.configuration.system-logs.default" path="/admin/configuration/system-logs">
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ class SystemLogController extends BaseAdminController
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@@ -100,5 +100,7 @@ final class AdminResources
|
||||
|
||||
const SYSTEM_LOG = "admin.configuration.system-log";
|
||||
|
||||
const STORE = "admin.configuration.store";
|
||||
|
||||
const TRANSLATIONS = "admin.configuration.translations";
|
||||
}
|
||||
|
||||
121
core/lib/Thelia/Form/ConfigStoreForm.php
Normal file
121
core/lib/Thelia/Form/ConfigStoreForm.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?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\Model\ConfigQuery;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Log\Tlog;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class ConfigStoreForm extends BaseForm
|
||||
{
|
||||
protected function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add("store_name", "text", array(
|
||||
"label" => Translator::getInstance()->trans('Store name'),
|
||||
"label_attr" => array(
|
||||
"for" => "store_name"
|
||||
)
|
||||
))
|
||||
->add("store_email", "text", array(
|
||||
"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"
|
||||
)
|
||||
))
|
||||
->add("store_phone", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Phone"),
|
||||
"label_attr" => array(
|
||||
"for" => "store_phone"
|
||||
)
|
||||
))
|
||||
->add("store_fax", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Fax"),
|
||||
"label_attr" => array(
|
||||
"for" => "store_fax"
|
||||
)
|
||||
))
|
||||
->add("store_address1", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label_attr" => array(
|
||||
"for" => "store_address1"
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Street Address ")
|
||||
))
|
||||
->add("store_address2", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Address Line 2"),
|
||||
"label_attr" => array(
|
||||
"for" => "store_address2"
|
||||
)
|
||||
))
|
||||
->add("store_address3", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Address Line 3"),
|
||||
"label_attr" => array(
|
||||
"for" => "store_address3"
|
||||
)
|
||||
))
|
||||
->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";
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -47,7 +47,7 @@ class ContactController extends BaseFrontController
|
||||
|
||||
$message = \Swift_Message::newInstance($form->get('subject')->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())
|
||||
;
|
||||
|
||||
|
||||
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}: </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" 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}: </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" 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}: </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" 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}: </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" 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}: </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" 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}" 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}" 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}" 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}" 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}" 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">
|
||||
{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'}
|
||||
|
||||
{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"}
|
||||
<tr>
|
||||
<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">
|
||||
{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="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="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-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 ! 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}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,9 +1,9 @@
|
||||
{* Declare assets directory, relative to template base directory *}
|
||||
{declare_assets directory='assets'}
|
||||
{block name="no-return-functions"}{/block}
|
||||
{assign var="company_name" value="{config key="company_name"}"}
|
||||
{if not $company_name}
|
||||
{assign var="company_name" value="{intl l='Thelia V2'}"}
|
||||
{assign var="store_name" value="{config key="store_name"}"}
|
||||
{if not $store_name}
|
||||
{assign var="store_name" value="{intl l='Thelia V2'}"}
|
||||
{/if}
|
||||
<!doctype html>
|
||||
<!--
|
||||
@@ -37,14 +37,14 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<meta charset="utf-8">
|
||||
|
||||
{* 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 name="generator" content="{intl l='Thelia V2'}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
{block name="meta"}
|
||||
<meta name="description" content="{$company_name}">
|
||||
<meta name="description" content="{$store_name}">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
{/block}
|
||||
|
||||
@@ -86,7 +86,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{$company_name}</a>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{$store_name}</a>
|
||||
</div>
|
||||
|
||||
<!-- 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">
|
||||
<div class="header">
|
||||
<h1 class="logo">
|
||||
<a href="{navigate to="index"}" title="{$company_name}">
|
||||
{images file='assets/img/logo.gif'}<img src="{$asset_url}" alt="{$company_name}">{/images}
|
||||
<a href="{navigate to="index"}" title="{$store_name}">
|
||||
{images file='assets/img/logo.gif'}<img src="{$asset_url}" alt="{$store_name}">{/images}
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
@@ -356,21 +356,25 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<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-content">
|
||||
<meta itemprop="name" content="{$company_name}">
|
||||
<meta itemprop="name" content="{$store_name}">
|
||||
<ul>
|
||||
<li class="contact-address">
|
||||
<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="postal-code" itemprop="postalCode">75000</span>
|
||||
<span class="locality" itemprop="addressLocality">City, <span class="country-name">France</span></span>
|
||||
<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">{config key="store_zipcode"}</span>
|
||||
<span class="locality" itemprop="addressLocality">{config key="store_city"}{loop type="country" name="address.country.title" id={config key="store_country"}}, <span class="country-name">{$TITLE}</span>{/loop}</span>
|
||||
</address>
|
||||
</li>
|
||||
{if {config key="store_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>
|
||||
{/if}
|
||||
{if {config key="store_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>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<div style="text-align: center; padding-bottom: 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 -->
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<td style="width:50%; padding: 0; border: none;" valign="bottom">
|
||||
|
||||
<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>
|
||||
<h2>{intl l="invoice"} {$INVOICE_REF}</h2>
|
||||
</div>
|
||||
|
||||
@@ -90,11 +90,11 @@ $_SESSION['install']['step'] = $step;
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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 class="form-group">
|
||||
<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 class="form-group">
|
||||
<label for="site_name">website url :</label>
|
||||
|
||||
@@ -37,12 +37,12 @@ if($_SESSION['install']['step'] == 5) {
|
||||
|
||||
|
||||
\Thelia\Model\ConfigQuery::create()
|
||||
->filterByName('contact_email')
|
||||
->update(array('Value' => $_POST['email_contact']));
|
||||
->filterByName('store_email')
|
||||
->update(array('Value' => $_POST['store_email']));
|
||||
|
||||
\Thelia\Model\ConfigQuery::create()
|
||||
->filterByName('company_name')
|
||||
->update(array('Value' => $_POST['company_name']));
|
||||
->filterByName('store_name')
|
||||
->update(array('Value' => $_POST['store_name']));
|
||||
|
||||
\Thelia\Model\ConfigQuery::create()
|
||||
->filterByName('url_site')
|
||||
|
||||
Reference in New Issue
Block a user