conditional checkbox for checkout coupon in checkout step page

  • Posts: 138
  • Thank you received: 4
7 years 4 months ago #272933

hi,
I want add checkbox for conditional coupon box , if "yes" show coupon box.
I add this code in coupon.php

<script type="text/javascript">
	$('#checkbox1').change(function(){
    if($(this).is(":checked"))
    $('#hikashop_checkout_coupon').fadeIn('slow');
    else
    $('#hikashop_checkout_coupon').fadeOut('slow');

});
</script>
		yes coupon<input class="hikashop_checkout_terms_checkbox" id="checkbox1" type="checkbox" name="hikashop_checkout_terms" value="1" />

but dont work.
reason : dont execute script tag.
attach coupon.php (zip)

File Attachment:

File Name: coupon.zip
File Size:1 KB

please help me
thanks


Joomla Developer | am.ebrahimzadeh[at]gmail.com
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 4 months ago #272960

Hi,

The coupon view file is only used if you have the "checkout legacy" setting activated.
If that setting is turned off in the HikaShop configuration, you're using the new checkout and in that case, it's the "show_block_coupon" view file that you need to edit in order to add your custom code.
So please check on that.

The following user(s) said Thank You: aminweb

Please Log in or Create an account to join the conversation.

  • Posts: 138
  • Thank you received: 4
7 years 4 months ago #273016

thabnks Nicolas,
but I use hikashop 2.6.3 - this version have not legacy setting ....


Joomla Developer | am.ebrahimzadeh[at]gmail.com

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 4 months ago #273034

Hi,

That's why we ask you to provide the version number of HikaShop and a link to the page with the issue when you create a new thread on this forum so that we don't loose time on both ends. So please try to provide that next time.

Then we'll have to check directly on the website because I can't say like that. Please provide a link to the shop and the precise steps necessary to reproduce the problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum