- Moderator
- 1044
nopCommerce 3.2
If the "Terms of service (shopping cart page)" or "Terms of service (confirm order page)" option is in use, then if user clicks link to read terms the ugly new browser windows appears.
In 3.1 we have an elegant modal dialog displayed for that purpose.
Can you fix this?
If the "Terms of service (shopping cart page)" or "Terms of service (confirm order page)" option is in use, then if user clicks link to read terms the ugly new browser windows appears.
In 3.1 we have an elegant modal dialog displayed for that purpose.
Can you fix this?
Hi zjerry,
This is not a bug, but rather a change in nopCommerce. While in nop 3.1 a fancybox jquery plugin was used to show the TermsOfService topic, in nop 3.2 a new browser dialog is used for that purpose and as you know a browser dialog cannot be styled.
If you want to preserve the old fancybox dialog you will have to edit the Themes/NeoFashion/Views/ShoppingCart/OrderSummary.cshtml view as shown below:
Replace the
if (Model.TermsOfServiceOnShoppingCartPage)
{
<div id="terms-of-service-warning-box" title="@T("Checkout.TermsOfService")" style="display:none;">
<p>@T("Checkout.TermsOfService.PleaseAccept")</p>
</div>
<div class="terms-of-service">
<input id="termsofservice" type="checkbox" name="termsofservice" />
@T("Checkout.TermsOfService.IAccept")
<span class="read" onclick="javascript:OpenWindow('@Url.RouteUrl("TopicPopup", new { SystemName = "conditionsofUse" })', 450, 500, true)">@T("Checkout.TermsOfService.Read")</span>
</div>
}
<div class="checkout-buttons">
@if (String.IsNullOrEmpty(Model.MinOrderSubtotalWarning))
{
<script type="text/javascript">
$(document).ready(function () {
$('#checkout').click(function () {
//terms of service
var termOfServiceOk = true;
if ($('#termsofservice').length > 0) {
//terms of service element exists
if (!$('#termsofservice').is(':checked')) {
$("#terms-of-service-warning-box").dialog();
termOfServiceOk = false;
} else {
termOfServiceOk = true;
}
}
return termOfServiceOk;
});
});
</script>
<button type="submit" id="checkout" name="checkout" value="checkout" class="button-1 checkout-button">
<span>@T("Checkout.Button")</span>
</button>
}
</div>
with the following: