Des modules ajoutés et mise en page du CSS
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,11 @@
|
||||
<form id="paypal-express-checkout" method="post" action="{url path='/module/paypal/express/checkout'}" class="pull-right"></form>
|
||||
<script>
|
||||
window.paypalCheckoutReady = function() {
|
||||
paypal.checkout.setup('{$paypal_merchantid}', {
|
||||
environment: '{$paypal_mode}',
|
||||
container: 'paypal-express-checkout',
|
||||
locale: '{lang attr="locale"}'
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script src="//www.paypalobjects.com/api/checkout.js" async></script>
|
||||
@@ -0,0 +1,85 @@
|
||||
<fieldset class="col-xs-11 col-xs-offset-1">
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}" class="paypal-method" name="{$name}" data-content="#content-paypal-credit-card" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}"><strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :<br />{if $required} <span class="required">*</span>{/if}</label>
|
||||
<img src="{image file='assets/cards-logo.jpg' source="PayPal"}" border="0" alt="CB / VISA / Mastercard" />
|
||||
|
||||
<div id="content-paypal-credit-card" class="hidden">
|
||||
{form_field field='paypal_credit_card_type.card_type'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{foreach from=$choices item=type}
|
||||
<option value="{$type->value}">{$type->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_number'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" value="" />
|
||||
</div>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_expire_month'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{foreach from=$choices item=type}
|
||||
<option value="{$type->value}">{$type->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_expire_year'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<select name="{$name}" id="{$label_attr.for}">
|
||||
{foreach from=$choices item=type}
|
||||
<option value="{$type->value}">{$type->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='paypal_credit_card_type.card_cvv'}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<label class="control-label col-sm-3" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="control-input col-sm-5">
|
||||
<input type="text" name="{$name}" id="{$label_attr.for}" value="" />
|
||||
{if $error }
|
||||
<span class="help-block">{$message}</span>
|
||||
{assign var="error_focus" value="true"}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,17 @@
|
||||
<fieldset class="col-xs-11 col-xs-offset-1">
|
||||
{if $method_paypal_with_in_context}
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}-express" class="paypal-method paypal-express-method" name="{$name}" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}-express">
|
||||
<strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :
|
||||
<img src="{image file='assets/paypal-logo.png' source="PayPal"}" border="0" alt="PayPal account" />
|
||||
</label>
|
||||
{else}
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}" class="paypal-method" name="{$name}" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}">
|
||||
<strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :
|
||||
<img src="{image file='assets/paypal-logo.png' source="PayPal"}" border="0" alt="PayPal account" />
|
||||
</label>
|
||||
{/if}
|
||||
|
||||
|
||||
</fieldset>
|
||||
@@ -0,0 +1,26 @@
|
||||
{assign var="methodName" value=$name}
|
||||
{form_field field='paypal_planified_payment'}
|
||||
{if count($choices) > 0}
|
||||
<fieldset class="col-xs-11 col-xs-offset-1">
|
||||
<input type="radio" id="{$label_attr.for}{$choice->label}" class="paypal-method" name="{$methodName}" data-content="#content-paypal-planified-payment" value="{$choice->label}" {if $value == $choice->label}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$choice->label}"><strong>{intl l=$choice->label d="paypal.fo.default"}</strong> :<br />{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div id="content-paypal-planified-payment" class="hidden">
|
||||
{foreach $choices as $choice}
|
||||
{assign var="planifiedPayment" value=$choice->data}
|
||||
<div class="form-group row{if $error} has-error{/if}">
|
||||
<div class="control-input col-sm-5">
|
||||
<input type="radio" id="{$label_attr.for}{$planifiedPayment->getId()}" name="{$name}" value="{$planifiedPayment->getId()}" {if $value == $planifiedPayment->getId()}checked{/if}/>
|
||||
<label class="control-label" for="{$label_attr.for}{$planifiedPayment->getId()}"><strong>{$planifiedPayment->getTitle()}</strong> :<br />{if $required} <span class="required">*</span>{/if}</label>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{$planifiedPayment->getDescription()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</fieldset>
|
||||
{/if}
|
||||
{/form_field}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<article>
|
||||
<span id='lippButton'></span>
|
||||
<script src='https://www.paypalobjects.com/js/external/api.js'></script>
|
||||
<script>
|
||||
paypal.use( ['login'], function (login) {
|
||||
login.render ({
|
||||
"appid":'{$paypal_appid}',
|
||||
"authend":'{$paypal_authend}',
|
||||
"scopes":"profile email address phone https://uri.paypal.com/services/paypalattributes",
|
||||
"containerid":"lippButton",
|
||||
"locale":"fr-fr",
|
||||
"returnurl":'{url path="/module/paypal/login/ok"}'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</article>
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
$('#form-cart-delivery button:submit').each(function() {
|
||||
if (!$(this).hasClass('paypal')) {
|
||||
$(this).addClass('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,4 @@
|
||||
<button class="btn btn-primary pull-right paypal" type="submit">
|
||||
<i class="fa fa-chevron-right"></i>
|
||||
{intl l='Finish payment with PayPal' d='paypal.fo.default'}
|
||||
</button>
|
||||
@@ -0,0 +1,11 @@
|
||||
<form id="paypal-express-checkout" method="post" action="{url path='/module/paypal/invoice/express/checkout'}" class="hidden"></form>
|
||||
<script>
|
||||
window.paypalCheckoutReady = function() {
|
||||
paypal.checkout.setup('{$paypal_merchantid}', {
|
||||
environment: '{$paypal_mode}',
|
||||
container: 'paypal-express-checkout',
|
||||
locale: '{lang attr="locale"}'
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script src="//www.paypalobjects.com/api/checkout.js" async></script>
|
||||
@@ -0,0 +1,58 @@
|
||||
<script type="text/javascript">
|
||||
var payPalModuleId = '{$module_id}';
|
||||
|
||||
(function ($) {
|
||||
|
||||
{literal}
|
||||
$(document).ready(function () {
|
||||
var $payPal = $('#payment_' + payPalModuleId)
|
||||
, $payPalMethod = $('input:radio[class=paypal-method]')
|
||||
, hasSelection = false
|
||||
;
|
||||
|
||||
if ($payPal.prop('checked')) {
|
||||
$('#paypal-methods').removeClass('hidden');
|
||||
}
|
||||
|
||||
$('#payment-method input:radio').on('change', function() {
|
||||
if ($(this).attr('name') === 'thelia_order_payment[payment-module]') {
|
||||
if ($(this).attr('id') === $payPal.attr('id')) {
|
||||
$('#paypal-methods').removeClass('hidden');
|
||||
} else {
|
||||
$('#paypal-methods').addClass('hidden');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$payPalMethod.on('change', function() {
|
||||
//$payPalMethod.prop('checked', true);
|
||||
$($(this).data('content')).removeClass('hidden');
|
||||
|
||||
$('input:radio').each(function(){
|
||||
if ($(this).attr('name') == "thelia_order_payment[paypal_method]" && $(this).prop('checked')) {
|
||||
hasSelection = true;
|
||||
$($(this).data('content')).removeClass('hidden');
|
||||
} else {
|
||||
$($(this).data('content')).addClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('input:radio').each(function(){
|
||||
|
||||
if ($(this).attr('name') == "thelia_order_payment[paypal_method]" && $(this).prop('checked')) {
|
||||
hasSelection = true;
|
||||
$($(this).data('content')).removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('.paypal-express-method').on('click', function(){
|
||||
$('#paypal-express-checkout button').each(function(){
|
||||
$(this).trigger('click');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
{/literal}
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,21 @@
|
||||
{form name="thelia.order.payment"}
|
||||
<div id="paypal-methods" class="row hidden">
|
||||
<hr>
|
||||
{form_field field='paypal_method'}
|
||||
{foreach from=$choices item=choice}
|
||||
|
||||
{if $choice->label == 'paypal' && {module_config key="method_paypal" module="PayPal" locale="en_US"} == 1}
|
||||
{include file="paypal/form/extra-paypal.html"}
|
||||
{/if}
|
||||
|
||||
{if $choice->label == 'credit_card' && {module_config key="method_credit_card" module="PayPal" locale="en_US"} == 1}
|
||||
{include file="paypal/form/extra-credit-card.html"}
|
||||
{/if}
|
||||
|
||||
{if $choice->label == 'planified_payment' && {module_config key="method_planified_payment" module="PayPal" locale="en_US"} == 1}
|
||||
{include file="paypal/form/extra-planified-payment.html"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/form_field}
|
||||
</div>
|
||||
{/form}
|
||||
@@ -0,0 +1,6 @@
|
||||
{loop type="paypal_order" name="paypal_order" id=$placed_order_id limit=1}
|
||||
{if $paypal_order->getPlanifiedCycle() > 0}
|
||||
<strong>{intl l="Planified payment" d="paypal.fo.default"}</strong> :
|
||||
{intl l="Payment in %x times every %frequency_interval %frequency" x=$paypal_order->getPlanifiedCycle() frequency_interval=$paypal_order->getPlanifiedFrequencyInterval() frequency="{intl l=$paypal_order->getPlanifiedFrequency() d="paypal.fo.default"}" d="paypal.fo.default"}
|
||||
{/if}
|
||||
{/loop}
|
||||
Reference in New Issue
Block a user