[+] Project : default theme added
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10862 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -33,6 +33,7 @@ $('document').ready(function(){
|
||||
});
|
||||
|
||||
$('#sendEmail').click(function(){
|
||||
console.log('aaa');
|
||||
var datas = [];
|
||||
$('#fancybox-content').find('input').each(function(index){
|
||||
var o = {}
|
||||
@@ -41,10 +42,10 @@ $('document').ready(function(){
|
||||
if (o.value != '')
|
||||
datas.push(o);
|
||||
});
|
||||
|
||||
if (datas.length == 3)
|
||||
console.log(datas.length);
|
||||
console.log(datas);
|
||||
if (datas.length >= 3)
|
||||
{
|
||||
|
||||
$.ajax({
|
||||
{/literal}url: "{$module_dir}sendtoafriend_ajax.php",{literal}
|
||||
post: "POST",
|
||||
@@ -58,8 +59,7 @@ $('document').ready(function(){
|
||||
else
|
||||
{
|
||||
$('#send_friend_form_error').show();
|
||||
var error_text = {/literal}{l s='You did not fill required fields' mod=sendtoafriend}{literal}
|
||||
$('#send_friend_form_error').text(error_text);
|
||||
$('#send_friend_form_error').text('{/literal}{l s="You did not fill required fields" mod=sendtoafriend}{literal}');
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -73,10 +73,10 @@ $('document').ready(function(){
|
||||
<div id="send_friend_form">
|
||||
<h2 class="title">{l s='Send to a friend' mod='sendtoafriend'}</h2>
|
||||
<div class="product clearfix">
|
||||
<img src="{$link->getImageLink($product->link_rewrite, $stf_product_cover, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product->name|escape:html:'UTF-8'}" />
|
||||
<img src="{$link->getImageLink($stf_product->link_rewrite, $stf_product_cover, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$stf_product->name|escape:html:'UTF-8'}" />
|
||||
<div class="product_desc">
|
||||
<p class="product_name"><strong>{$product->name}</strong></p>
|
||||
{$product->description_short}
|
||||
<p class="product_name"><strong>{$stf_product->name}</strong></p>
|
||||
{$stf_product->description_short}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,99 +1,46 @@
|
||||
#fancybox-wrap {width:585px !important}
|
||||
#fancybox-content {
|
||||
width:585px !important;
|
||||
border-width:0 !important
|
||||
}
|
||||
|
||||
#send_friend_form {
|
||||
width:585px;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
background-color: #fff
|
||||
}
|
||||
#send_friend_form .title {
|
||||
padding:10px;
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
background: #333
|
||||
}
|
||||
|
||||
#send_friend_form .product {padding:15px}
|
||||
#send_friend_form .product img {
|
||||
float:left;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
#send_friend_form .product .product_desc {
|
||||
float:left;
|
||||
margin-left:15px;
|
||||
width:300px;
|
||||
line-height:18px;
|
||||
color:#666
|
||||
}
|
||||
#send_friend_form .product .product_desc .product_name {
|
||||
padding-bottom:5px;
|
||||
font-size:13px;
|
||||
color:#000
|
||||
}
|
||||
|
||||
.send_friend_form_content {
|
||||
padding:15px;
|
||||
background:#f8f8f8
|
||||
}
|
||||
.send_friend_form_content .intro_form {
|
||||
padding-bottom: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
|
||||
#send_friend_form .form_container {
|
||||
clear:both;
|
||||
margin-top:20px
|
||||
}
|
||||
#send_friend_form p.text {
|
||||
margin-bottom:0;
|
||||
padding-bottom:0
|
||||
}
|
||||
#send_friend_form p.text label, #send_friend_form p.textarea label {
|
||||
display: block;
|
||||
margin:12px 0 4px 0;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
#send_friend_form p.text input {
|
||||
padding: 0 5px;
|
||||
height: 28px;
|
||||
width: 540px;
|
||||
border: 1px solid #ccc;
|
||||
background: url(../img/bg_input.png) repeat-x scroll 0 0 #fff;
|
||||
}
|
||||
|
||||
#send_friend_form .submit {
|
||||
padding:0;
|
||||
font-size:13px;
|
||||
text-align:right
|
||||
}
|
||||
#send_friend_form button {
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding: 4px 7px 3px 7px;
|
||||
border: 1px solid #CC9900;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
background: url(../img/bg_bt.gif) repeat-x scroll 0 0 #F4B61B
|
||||
}
|
||||
#send_friend_form .submit .txt_required {
|
||||
float:left;
|
||||
font-size:12px;
|
||||
font-style:italic;
|
||||
color:#666
|
||||
}
|
||||
#send_friend_form_error {
|
||||
color:red;
|
||||
font-size:13px;
|
||||
text-align:left;
|
||||
display:hidden;
|
||||
/* ************************************************************************************************
|
||||
PAGE SEND TO FRIEND
|
||||
************************************************************************************************ */
|
||||
#sendfriendpage form.std fieldset {
|
||||
margin:0 0 20px 0;
|
||||
padding: 10px 15px;
|
||||
background: none repeat scroll 0 0 #eee
|
||||
}
|
||||
|
||||
#sendfriendpage .product {}
|
||||
#sendfriendpage .product .img_link {float:left}
|
||||
#sendfriendpage .product .img_link img {
|
||||
margin:0 10px 0 0;
|
||||
border:1px solid #ccc;
|
||||
}
|
||||
#sendfriendpage .product .product_desc {
|
||||
float:left;
|
||||
width:200px;
|
||||
font-weight:bold;
|
||||
font-size:12px;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
#sendfriendpage #send_friend_form_content {margin-top:40px}
|
||||
#sendfriendpage #send_friend_form_content .text {
|
||||
padding-bottom: 10px
|
||||
}
|
||||
#sendfriendpage #send_friend_form_content .text label {
|
||||
display: inline-block;
|
||||
padding: 6px 15px;
|
||||
width: 180px;
|
||||
font-size: 12px;
|
||||
text-align: right
|
||||
}
|
||||
#sendfriendpage #send_friend_form_content .text input {
|
||||
padding: 0 5px;
|
||||
height: 22px;
|
||||
width: 260px;
|
||||
border: 1px solid #ccc;
|
||||
font-size: 12px
|
||||
}
|
||||
#sendfriendpage #send_friend_form_content .submit {
|
||||
margin:0 20px 0 0;
|
||||
padding:5px 0;
|
||||
text-align:right
|
||||
}
|
||||
@@ -69,8 +69,8 @@ class sendToAFriend extends Module
|
||||
$productLink = $this->context->link->getProductLink($product);
|
||||
$image = Product::getCover((int)($_GET['id_product']));
|
||||
|
||||
|
||||
Context::getContext()->smarty->assign(array(
|
||||
'stf_product' => $product,
|
||||
'stf_id_product' => (int)Tools::getValue('id_product'),
|
||||
'stf_product_link' => $productLink,
|
||||
'stf_product_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'],
|
||||
|
||||
@@ -26,40 +26,41 @@
|
||||
|
||||
{capture name=path}{l s='Send to a friend' mod='sendtoafriend'}{/capture}
|
||||
{include file="$tpl_dir./breadcrumb.tpl"}
|
||||
<div id="sendfriendpage">
|
||||
<h1>{l s='Send to a friend' mod='sendtoafriend'}</h1>
|
||||
|
||||
<h1>{l s='Send to a friend' mod='sendtoafriend'}</h1>
|
||||
<p class="bold">{l s='Send this page to a friend who might be interested in the item below.' mod='sendtoafriend'}.</p>
|
||||
{include file="$tpl_dir/errors.tpl"}
|
||||
|
||||
<p class="bold">{l s='Send this page to a friend who might be interested in the item below.' mod='sendtoafriend'}.</p>
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
{if isset($smarty.get.submited)}
|
||||
<p class="success">{l s='Your email has been sent successfully' mod='sendtoafriend'}</p>
|
||||
{else}
|
||||
<form method="post" action="{$request_uri}" class="std">
|
||||
<fieldset>
|
||||
<div class="product clearfix">
|
||||
<a href="{$productLink}" class="img_link"><img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'small')}" alt="" title="{$cover.legend}" /></a>
|
||||
<a href="{$productLink}" class="product_desc"><br />{$product->name}</a>
|
||||
</div>
|
||||
|
||||
{if isset($smarty.get.submited)}
|
||||
<p class="success">{l s='Your email has been sent successfully' mod='sendtoafriend'}</p>
|
||||
{else}
|
||||
<form method="post" action="{$request_uri}" class="std">
|
||||
<fieldset>
|
||||
<h3>{l s='Send a message' mod='sendtoafriend'}</h3>
|
||||
<div id="send_friend_form_content">
|
||||
<p class="text">
|
||||
<label for="friend-name">{l s='Friend\'s name:' mod='sendtoafriend'}</label>
|
||||
<input type="text" id="friend-name" name="name" value="{if isset($smarty.post.name)}{$smarty.post.name|escape:'htmlall':'UTF-8'|stripslashes}{/if}" />
|
||||
</p>
|
||||
<p class="text">
|
||||
<label for="friend-address">{l s='Friend\'s email:' mod='sendtoafriend'}</label>
|
||||
<input type="text" id="friend-address" name="email" value="{if isset($smarty.post.name)}{$smarty.post.email|escape:'htmlall'|stripslashes}{/if}" />
|
||||
</p>
|
||||
|
||||
<p class="align_center">
|
||||
<a href="{$productLink}"><img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'small')}" alt="" title="{$cover.legend|escape:'htmlall':'UTF-8'}" /></a><br/>
|
||||
<a href="{$productLink}">{$product->name|escape:'htmlall':'UTF-8'}</a>
|
||||
</p>
|
||||
<p class="submit">
|
||||
<input type="submit" name="submitAddtoafriend" value="{l s='send' mod='sendtoafriend'}" class="button" />
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<p>
|
||||
<label for="friend-name">{l s='Friend\'s name:' mod='sendtoafriend'}</label>
|
||||
<input type="text" id="friend-name" name="name" value="{if isset($smarty.post.name)}{$smarty.post.name|escape:'htmlall':'UTF-8'|stripslashes}{/if}" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="friend-address">{l s='Friend\'s email:' mod='sendtoafriend'}</label>
|
||||
<input type="text" id="friend-address" name="email" value="{if isset($smarty.post.name)}{$smarty.post.email|escape:'htmlall'|stripslashes}{/if}" />
|
||||
</p>
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" name="submitAddtoafriend" value="{l s='send' mod='sendtoafriend'}" class="button" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<ul class="footer_links">
|
||||
<li><a href="{$productLink}" class="button_large">{l s='Back to product page' mod='sendtoafriend'}</a></li>
|
||||
</ul>
|
||||
<ul class="footer_links">
|
||||
<li><a href="{$productLink}">« {l s='Back to product page' mod='sendtoafriend'}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user