Jump to content

Problème validation conditions générales de ventes


Recommended Posts

Bonjour,

Je suis en train d'améliorer mon tunnel de conversion et je viens de m’apercevoir que je peux passer à l'étape du paiement sans avoir cocher la case "J'ai lu les conditions générales de vente".

Je souhaiterais que cette case soit obligatoire avant de passer au paiement.

Comment puis-je faire svp ?

Help !

D'avance merci.

Share this post


Link to post
Share on other sites

themes/default-bootstrap/order-carrier.tpl:362:                            <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
themes/default-bootstrap/order-carrier.tpl:363:                            <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label>
themes/default-bootstrap/order-carrier-advanced.tpl:361:                                    <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
themes/default-bootstrap/order-carrier-advanced.tpl:362:                                    <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label>
themes/default-bootstrap/js/order-opc.js:328:	if ($('#cgv:checked').length !== 0)
themes/default-bootstrap/js/order-opc.js:918:	$('#cgv').on('click', function(e){
themes/default-bootstrap/js/advanced-payment-api.js:110:        if ($('#cgv').prop('checked')) {
themes/default-bootstrap/js/order-carrier.js:54:	if (typeof msg_order_carrier != 'undefined' && $('#cgv').length && !$('input#cgv:checked').length)
themes/default-bootstrap/order-carrier-opc-advanced.tpl:347:                    <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
themes/default-bootstrap/order-carrier-opc-advanced.tpl:348:                    <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label>
themes/default-bootstrap/order-payment-advanced.tpl:132:                            <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
themes/default-bootstrap/order-payment-advanced.tpl:133:                            <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label>

 

Share this post


Link to post
Share on other sites

Dans : themes/montheme/js/order-opc.js ligne 328 environ j'ai ça comme fonction :

function updatePaymentMethodsDisplay()
{
	var checked = '';
	if ($('#cgv:checked').length !== 0)
		checked = 1;
	else
		checked = 0;
	$('#opc_payment_methods-overlay').fadeIn('slow', function(){
		$.ajax({
			type: 'POST',
			headers: { "cache-control": "no-cache" },
			url: orderOpcUrl + '?rand=' + new Date().getTime(),
			async: true,
			cache: false,
			dataType : "json",
			data: 'ajax=true&method=updateTOSStatusAndGetPayments&checked=' + checked + '&token=' + static_token,
			success: function(json)
			{
				updatePaymentMethods(json);
				if (typeof bindUniform !=='undefined')
					bindUniform();
			}
		});
		$(this).fadeOut('slow');
	});
}

Vers la ligne 918 :

// Term Of Service (TOS)
	$('#cgv').on('click', function(e){
	updatePaymentMethodsDisplay();
});

Dans le fichier themes/montheme/js/advance-payment-api.js vers la ligne 110 j'ai :

this.checkTOS = function() {
	if ($('#cgv').prop('checked')) {
		return true;
	}
        return false;
};

Dans themes/montheme/js/order-carrier.js vers la ligne 54 j'ai :

function acceptCGV()
{
	if (typeof msg_order_carrier != 'undefined' && $('#cgv').length && !$('input#cgv:checked').length)
	{
		if (!!$.prototype.fancybox)
		    $.fancybox.open([
	        {
	            type: 'inline',
	            autoScale: true,
	            minHeight: 30,
	            content: '<p class="fancybox-error">' + msg_order_carrier + '</p>'
	        }],
			{
		        padding: 0
		    });
		else
		    alert(msg_order_carrier);
	}
	else
		return true;
	return false;
}

Tous le reste est ok dans mes fichiers .tpl

Il n'y a pas l'air d'avoir d'erreur -_-'

Est ce que vous voyez quelque chose d'anormal ?

 

Share this post


Link to post
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More