icomplete product page

This commit is contained in:
Manuel Raynaud
2013-09-19 15:39:36 +02:00
parent 42e43de9a6
commit 41bd8a7cec
3 changed files with 37 additions and 9 deletions

View File

@@ -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) {

View File

@@ -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())
;

View File

@@ -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>