Merge branch 'master' of github.com:thelia/thelia
This commit is contained in:
@@ -31,10 +31,12 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||
|
||||
use Thelia\Model\Base\CategoryQuery;
|
||||
use Thelia\Model\Base\ProductCategoryQuery;
|
||||
use Thelia\Model\Base\FeatureQuery;
|
||||
use Thelia\Model\CategoryQuery;
|
||||
use Thelia\Model\FeatureI18nQuery;
|
||||
use Thelia\Model\ProductCategoryQuery;
|
||||
use Thelia\Model\FeatureQuery;
|
||||
use Thelia\Model\Map\ProductCategoryTableMap;
|
||||
use Thelia\Model\ProductQuery;
|
||||
use Thelia\Type\TypeCollection;
|
||||
use Thelia\Type;
|
||||
use Thelia\Type\BooleanOrBothType;
|
||||
@@ -71,7 +73,8 @@ class Feature extends BaseI18nLoop
|
||||
new Type\EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual_reverse'))
|
||||
),
|
||||
'manual'
|
||||
)
|
||||
),
|
||||
Argument::createAnyTypeArgument('title')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -134,6 +137,23 @@ class Feature extends BaseI18nLoop
|
||||
);
|
||||
}
|
||||
|
||||
$title = $this->getTitle();
|
||||
|
||||
if (null !== $title) {
|
||||
//find all feture that match exactly this title and find with all locales.
|
||||
$features = FeatureI18nQuery::create()
|
||||
->filterByTitle($title, Criteria::LIKE)
|
||||
->select('id')
|
||||
->find();
|
||||
|
||||
if($features) {
|
||||
$search->filterById(
|
||||
$features,
|
||||
Criteria::IN
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$orders = $this->getOrder();
|
||||
|
||||
foreach ($orders as $order) {
|
||||
|
||||
@@ -68,14 +68,11 @@ class ModuleActivateCommandTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testModuleActivateCommandUnknownModule()
|
||||
{
|
||||
$module = ModuleQuery::create()->findOne();
|
||||
$testedModule = ModuleQuery::create()->findOneByCode('Letshopethismoduledoesnotexists');
|
||||
|
||||
if(null !== $module && null == $testedModule) {
|
||||
if(null == $testedModule) {
|
||||
$application = new Application($this->getKernel());
|
||||
|
||||
$module->setActivate(BaseModule::IS_NOT_ACTIVATED);
|
||||
$module->save();
|
||||
|
||||
$moduleActivate = new ModuleActivateCommand();
|
||||
$moduleActivate->setContainer($this->getContainer());
|
||||
|
||||
@@ -27,7 +27,7 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat
|
||||
('thelia_admin_remember_me_cookie_expiration', 2592000, 0, 0, NOW(), NOW()),
|
||||
('thelia_customer_remember_me_cookie_name', 'tcrmcn', 0, 0, NOW(), NOW()),
|
||||
('thelia_customer_remember_me_cookie_expiration', 31536000, 0, 0, NOW(), NOW()),
|
||||
('session_config.handlers', 'Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler', 0, 0, NOW(), NOW())
|
||||
('session_config.handlers', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler', 0, 0, NOW(), NOW())
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<tbody>
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
|
||||
<tr>
|
||||
<td>{$REF}</td>
|
||||
<td><a href="{url path="/admin/customer/update/{$ID}" }">{$REF}</a></td>
|
||||
|
||||
<td>
|
||||
{$COMPANY}
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Modules'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.modules.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="modules">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<div class="clearfix">
|
||||
<ul class="breadcrumb pull-left">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/modules'}">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.modules.install"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Install a new module'}" href="#install_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-import"></span> {intl l="Install a new module"}
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
{module_include location='modules_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Transport modules'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Name"}</th>
|
||||
<th>{intl l="Description"}</th>
|
||||
<th>{intl l="Enable/Disable"}</th>
|
||||
|
||||
{module_include location='modules_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="">Tinymce</a></td>
|
||||
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{module_include location='modules_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="">So colissimo</a></td>
|
||||
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{module_include location='modules_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="">Title meta</a></td>
|
||||
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{module_include location='modules_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Delivery modules'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Name"}</th>
|
||||
<th>{intl l="Description"}</th>
|
||||
<th>{intl l="Enable/Disable"}</th>
|
||||
|
||||
{module_include location='modules_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="">Tinymce</a></td>
|
||||
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{module_include location='modules_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="">So colissimo</a></td>
|
||||
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{module_include location='modules_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="">Title meta</a></td>
|
||||
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{module_include location='modules_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='modules_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Delete module confirmation dialog *}
|
||||
|
||||
{capture "delete_module_dialog"}
|
||||
<input type="hidden" name="current_module_id" value="{$current_module_id}" />
|
||||
<input type="hidden" name="module_id" id="delete_module_id" value"" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_module_dialog"
|
||||
dialog_title = {intl l="Delete a module"}
|
||||
dialog_message = {intl l="Do you really want to delete this module ?"}
|
||||
|
||||
form_action = {url path='/admin/modules/delete'}
|
||||
form_content = {$smarty.capture.delete_module_dialog nofilter}
|
||||
}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{/block}
|
||||
@@ -18,8 +18,16 @@
|
||||
<article id="product" class="col-main" role="main" itemscope itemtype="http://schema.org/Product">
|
||||
|
||||
<!-- Use the meta tag to specify content that is not visible on the page in any way -->
|
||||
<meta itemprop="brand" content="Diesel">
|
||||
<meta itemprop="productID" content="isbn:925872">
|
||||
{loop name="brand.feature" type="feature" product="{$ID}" title="brand"}
|
||||
{loop name="brand.value" type="feature_value" feature="{$ID}" product="{product attr="id"}"}
|
||||
<meta itemprop="brand" content="{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<!--
|
||||
activate this meta tag if you have isbn feature for exemple
|
||||
<meta itemprop="productID" content="isbn:925872">
|
||||
-->
|
||||
|
||||
<section id="product-gallery">
|
||||
<figure class="product-image">
|
||||
@@ -84,7 +92,7 @@
|
||||
<div class="price-container">
|
||||
<meta itemprop="category" content="Category1">
|
||||
<meta itemprop="itemCondition" itemscope itemtype="http://schema.org/NewCondition"> <!-- List of condition : NewCondition, DamagedCondition, UsedCondition, RefurbishedCondition -->
|
||||
<meta itemprop="priceCurrency" content="USD"> <!-- List of currency : The currency used to describe the product price, in three-letter ISO format. -->
|
||||
<meta itemprop="priceCurrency" content="{currency attr="symbol"}"> <!-- List of currency : The currency used to describe the product price, in three-letter ISO format. -->
|
||||
<link itemprop="availability" href="http://schema.org/InStock" content="in_stock" />
|
||||
<!-- List of availibility :
|
||||
out_of_stock : http://schema.org/OutOfStock
|
||||
@@ -100,7 +108,7 @@
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{/loop}
|
||||
{else}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user