Jump to content

Terms & Conditions Checkbox not work


Serial

Recommended Posts

Hi,

 

In an order, if the user doesn't accept Terms & Conditions, user can order. It going to payment page.

 

On the back-office, in Preferences -> Orders-> Terms and Conditions is on YES.

 

I'm looking my .js file, I don't see anything :

 

order-carrier.js

    $(document).ready(function(){
     
    	if (!!$.prototype.fancybox)
    		$("a.iframe").fancybox({
    			'type': 'iframe',
    			'width': 600,
    			'height': 600
    		});
     
    	if (typeof cart_gift != 'undefined' && cart_gift && $('input#gift').is(':checked'))
    		$('p#gift_div').show();
     
    	$(document).on('change', 'input.delivery_option_radio', function(){
    		var key = $(this).data('key');
    		var id_address = parseInt($(this).data('id_address'));
    		if (orderProcess == 'order' && key && id_address)
    			updateExtraCarrier(key, id_address);
    		else if(orderProcess == 'order-opc' && typeof updateCarrierSelectionAndGift !== 'undefined')
    			updateCarrierSelectionAndGift();
    	});
     
    	$(document).on('submit', 'form[name=carrier_area]', function(){
    		return acceptCGV();
    	});
     
    });
     
    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;
    }

Thanks.

Link to comment
Share on other sites

It seems to work for me. The JS is not triggering because you have an error.

Turn off CCC for javascript. Reach the page, open the debug console (f12 on chrome) and see where the error is

Uncaught ReferenceError: total_products_wt is not defined

  • Like 1
Link to comment
Share on other sites

  • 2 years later...
On 5/4/2016 at 11:24 AM, NemoPS said:

It seems to work for me. The JS is not triggering because you have an error.

Turn off CCC for javascript. Reach the page, open the debug console (f12 on chrome) and see where the error is

Uncaught ReferenceError: total_products_wt is not defined

Hi Nemo and thanks for your help. I see that it's an old thread, but I need to fix this problem in Ps 1.7, and I really don't know how to come out. 

Edited by markoroots (see edit history)
Link to comment
Share on other sites

I guess this is a problem of the theme you are using.

Check the \themes\classic\templates\checkout\_partials\steps\payment.tpl file, you will find a div with a "js-modal-content" classname, see attached picture, the div is used to show the content of terms and conditions. But I can't find the div on your site. 

To fix the problem, you can ask developers of your theme for help. To fix it by yourself, you need to edit the \themes\pos_aero4\templates\checkout\_partials\steps\payment.tpl file.

Screenshot00329.jpg

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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
×
×
  • Create New...