Merge branch 'tiket-productTemplate' into develop

This commit is contained in:
Marion Muszynski 2016-06-03 12:07:42 +02:00
commit 76f698ee8f
4 changed files with 46 additions and 24 deletions

View File

@ -3316,6 +3316,16 @@ class AdminProducts extends AdminTab
echo ' <div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').';float: left;">
<textarea class=" other_textarea" cols="100" rows="5" id="videos_'.$language['id_lang'].'" name="videos_'.$language['id_lang'].'">'.htmlentities(stripslashes($this->getFieldValue($obj, 'videos', $language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>
</div>';
echo ' </td>
</tr>
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
<tr>
<td class="col-left">'.$this->l('Livraison :').'</td>
<td style="padding-bottom:5px;" class="translatable">';
foreach ($this->_languages as $language)
echo ' <div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').';float: left;">
<textarea class=" other_textarea" cols="100" rows="5" id="description_delivery_'.$language['id_lang'].'" name="description_delivery_'.$language['id_lang'].'">'.htmlentities(stripslashes($this->getFieldValue($obj, 'description_delivery', $language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>
</div>';
echo ' </td>
</tr>';

View File

@ -2,6 +2,7 @@
class Product extends ProductCore
{
public $description_more;
public $description_delivery;
public $videos;
/**
@ -11,7 +12,7 @@ class Product extends ProductCore
'meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName',
'meta_title' => 'isGenericName', 'link_rewrite' => 'isLinkRewrite', 'name' => 'isCatalogName',
'description' => 'isString', 'description_short' => 'isString', 'available_now' => 'isGenericName', 'available_later' => 'IsGenericName',
'description_more' => 'isString','videos' => 'isString');
'description_more' => 'isString','videos' => 'isString', 'description_delivery' => 'isString');
/**
* @Override
@ -35,6 +36,7 @@ class Product extends ProductCore
$fields[$language['id_lang']]['description_short'] = (isset($this->description_short[$language['id_lang']])) ? pSQL($this->description_short[$language['id_lang']], true) : '';
$fields[$language['id_lang']]['description_more'] = (isset($this->description_more[$language['id_lang']])) ? pSQL($this->description_more[$language['id_lang']], true) : '';
$fields[$language['id_lang']]['videos'] = (isset($this->videos[$language['id_lang']])) ? pSQL($this->videos[$language['id_lang']], true) : '';
$fields[$language['id_lang']]['description_delivery'] = (isset($this->description_delivery[$language['id_lang']])) ? pSQL($this->description_delivery[$language['id_lang']], true) : '';
foreach ($fieldsArray as $field)
{
if (!Validate::isTableOrIdentifier($field))

View File

@ -458,31 +458,36 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
{$product->videos}
</div>
{/if}
<div id="idTab5" class="rte product_info">
<div class="info info_1">
{if $sale->delivery_delay == 2
|| $sale->delivery_delay == 3
|| $sale->delivery_delay == 4
|| $sale->delivery_delay == 5
|| $sale->delivery_delay == 6
|| $sale->delivery_delay == 7}
{include file="./themes/site/delay.tpl" delivery_delay=$sale->delivery_delay}
{else}
<div id="idTab5" class="rte">
<div class="product_info">
<div class="info info_1">
{if $sale->delivery_delay == 2
|| $sale->delivery_delay == 3
|| $sale->delivery_delay == 4
|| $sale->delivery_delay == 5
|| $sale->delivery_delay == 6
|| $sale->delivery_delay == 7}
{include file="./themes/site/delay.tpl" delivery_delay=$sale->delivery_delay}
{else}
<span class="picto"></span>
{l s='Livraison estimée sous'} <br />
<span class="pink">{l s=' 3 semaines'}</span>
{/if}
</div>
<div class="info info_2">
<span class="picto"></span>
{l s='Livraison estimée sous'} <br />
<span class="pink">{l s=' 3 semaines'}</span>
{/if}
</div>
<div class="info info_2">
<span class="picto"></span>
{l s='Commandez plusieurs marques'} <br />
<span class="pink">{l s='= un seul frais de port !'}</span>
</div>
<div class="info info_3">
<span class="picto"></span>
{l s='Paiement'} <span class="pink">{l s='sécurisé'}</span> <br />
{l s='Paypal & CB'}
{l s='Commandez plusieurs marques'} <br />
<span class="pink">{l s='= un seul frais de port !'}</span>
</div>
<div class="info info_3">
<span class="picto"></span>
{l s='Paiement'} <span class="pink">{l s='sécurisé'}</span> <br />
{l s='Paypal & CB'}
</div>
</div>
{if !empty($product->description_delivery)}
{$product->description_delivery}
{/if}
</div>
{if $features}
<!-- product's features -->

View File

@ -426,6 +426,7 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
{if $product->description_more}<li><a id="more_info_tab_more_info" href="#idTab3" style="">{l s='More'}</a></li>{/if}
{*if $product->buy_guide}<li><a id="more_info_tab_data_sheet" href="#idTab3">{l s='Buy guide'}</a></li>{/if*}
{if $product->videos}<li><a id="more_info_tab_more_info" href="#idTab4" style="">{l s='Videos'}</a></li>{/if}
{if $product->description_delivery}<li><a id="more_info_tab_more_info" href="#idTab5" style="">{l s='Shipping'}</a></li>{/if}
{*if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if*}
{*if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if*}
{*if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if*}
@ -448,6 +449,10 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
<!-- full videos -->
<div id="idTab4" class="rte">{$product->videos}</div>
{/if}
{if $product->description_delivery}
<!-- full description_delivery -->
<div id="idTab5" class="rte">{$product->description_delivery}</div>
{/if}
{if $features}
<!-- product's features -->
<ul id="idTab8" class="bullet">