Page 4 of 8

Re: [vQmod] Apply coupon during checkout

Posted: Sat Nov 19, 2011 7:36 am
by nytrous
just this one, nothing more, it might be something on your theme! try to use the default one and see the result!

Re: [vQmod] Apply coupon during checkout

Posted: Sat Nov 19, 2011 1:33 pm
by kungmats
i've tryed both default and my theme but no :(

Vhat about your folder vqmodcahche?

Re: [vQmod] Apply coupon during checkout

Posted: Tue Nov 22, 2011 11:10 am
by Ozfarmer
Hey Great Mod (I think ;D ) It all seems to work fine but says that the discount has been applied to your order but when I go to the next step I cannot see the discount applied. I am using 1.5.1.3 and a custom

Just ignore me!!! Coupons was disabled in Options!! working well thanks!! ;D ;D

Re: [vQmod] Apply coupon during checkout

Posted: Sat Nov 26, 2011 9:14 am
by kghandi
I upgraded to v 1.5.3.1 from 1.4.9. I really like the one page checkout except for the fact that it does not allow entry of coupon codes. I tried applying the vqmod posted at the top of this thread but it has not worked. Has anyone tried this with v 1.5.3.1 yet?

Thanks

Re: [vQmod] Apply coupon during checkout

Posted: Sat Nov 26, 2011 9:56 am
by Ozfarmer
kghandi wrote:I upgraded to v 1.5.3.1 from 1.4.9. I really like the one page checkout except for the fact that it does not allow entry of coupon codes. I tried applying the vqmod posted at the top of this thread but it has not worked. Has anyone tried this with v 1.5.3.1 yet?

Thanks
Yeah mine is installed in 1.5.1.3

Re: [vQmod] Apply coupon during checkout

Posted: Wed Dec 07, 2011 9:55 am
by indigo
Hi great mod .. thanks .. it's working well for me on 1.5.3.1

I just want to make a slight adjustment to the code so when I go through the checkout, I'm shown the actual coupon name ... currently it shows just the coupon code ...

so rather than show the code e.g coupon(1111) in the totals area,
it will show the coupon name e.g coupon (15% off plus free gift)

Many thanks :)

Re: [vQmod] Apply coupon during checkout

Posted: Wed Dec 07, 2011 10:55 pm
by jimaras
Thank you.
Works great with 1.5.1.3
Is any mod to apply voucher during checkout like this one?

Re: [vQmod] Apply coupon during checkout

Posted: Thu Dec 08, 2011 6:50 am
by scoobs001
Doesn't work with 1.5.1.3 for me.

Any other solutions? Tried most things i can think of with this XML.

Re: [vQmod] Apply coupon during checkout

Posted: Thu Dec 08, 2011 8:00 am
by indigo
Hi Scoobs .... are you using the default template?

If not, remember to change

Line 29:

Code: Select all


    <file name="catalog/view/theme/[YOUR THEME NAME]/template/checkout/payment.tpl">
Line 53:

Code: Select all


    $('#button-coupon').after('<span class="wait">&nbsp;<img src="catalog/view/theme/[YOUR THEME NAME]/image/loading.gif" alt="" /></span>'); 

Hope it helps!

Re: [vQmod] Apply coupon during checkout

Posted: Sun Dec 11, 2011 9:13 am
by Klimskady
I am also trying to get this vQmod working, I have vQmod installed and vQmod which has thown up this error
---------- Date: 2011-12-11 00:25:59 ~ IP : *3.*7.**.*** ----------
REQUEST URI : /index.php?route=checkout/payment
MOD DETAILS:
modFile : /home/XXXX/public_html/vqmod/xml/checkout-coupon.xml
id : Opencart core file modifications for adding coupon support into the checkout sequence
version : 1.5.1.1
vqmver : 1.2.3
author : mhccorp.com
SEARCH NOT FOUND (ABORTING MOD): <script type="text/javascript"><!--

Now I have followed all the instructions listed before about altering the text on both the lines that refer the the default which is set to shoppica but still not joy.

Can someone take pity on someone who should have got this website finished months back but has hit every wall going?

Thanks in advance

Re: [vQmod] Apply coupon during checkout

Posted: Mon Dec 19, 2011 6:30 am
by scoobs001
indigo wrote:Hi Scoobs .... are you using the default template?

If not, remember to change

Line 29:

Code: Select all


    <file name="catalog/view/theme/[YOUR THEME NAME]/template/checkout/payment.tpl">
Line 53:

Code: Select all


    $('#button-coupon').after('<span class="wait">&nbsp;<img src="catalog/view/theme/[YOUR THEME NAME]/image/loading.gif" alt="" /></span>'); 

Hope it helps!

Yeah, I have tried this already.

Code: Select all

<modification>
	<id>Opencart core file modifications for adding coupon support into the checkout sequence</id>
	<version>1.5.1.1</version>
	<vqmver>1.2.3</vqmver>
	<author>mhccorp.com</author>
	
	<file name="catalog/controller/checkout/payment.php">
		<operation>
			<search position="after"><![CDATA[$this->data['text_comments'] = $this->language->get('text_comments');]]></search>
			<add><![CDATA[
		$this->data['entry_payment_coupon'] = $this->language->get('entry_payment_coupon');
		$this->data['text_payment_coupon'] = $this->language->get('text_payment_coupon');
		$this->data['text_payment_coupon_success'] = $this->language->get('text_payment_coupon_success');
		$this->data['button_coupon'] = $this->language->get('button_coupon');
			]]></add>
		</operation>
	</file>
	<file name="catalog/language/english/checkout/checkout.php">
		<operation>
			<search position="after"><![CDATA[$_['text_comments']]]></search>
			<add><![CDATA[
$_['entry_payment_coupon']           = 'Enter your code (if available) and click "Apply Coupon"';
$_['text_payment_coupon']            = 'Discount Coupon Code:';
$_['text_payment_coupon_success']    = 'Your discount coupon has been successfuly applied to your order. You will see it in the next checkout step';
$_['button_coupon']                  = 'Apply Coupon';
			]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/yostore/template/checkout/payment.tpl">
		<operation>
			<search position="after" offset="2"><![CDATA[<textarea name="comment"]]></search>
			<add><![CDATA[
<div id="coupon">
  <b><?php echo $entry_payment_coupon; ?></b><br /><br />
  <?php echo $text_payment_coupon; ?>&nbsp;
  <input type="text" name="coupon" value="" />
  &nbsp;<a id="button-coupon" class="button"><span><?php echo $button_coupon; ?></span></a><br />
</div>
			]]></add>
		</operation>
		<operation>
			<search position="before"><![CDATA[<script type="text/javascript"><!--]]></search>
			<add><![CDATA[
<script type="text/javascript"><!--
$('#button-coupon').bind('click', function() {
	$.ajax({
		type: 'POST',
		url: 'index.php?route=total/coupon/calculate',
		data: $('#coupon :input'),
		dataType: 'json',		
		beforeSend: function() {
			$('#button-coupon').attr('disabled', true);
			$('#button-coupon').after('<span class="wait">&nbsp;<img src="catalog/view/theme/yostore/image/loading.gif" alt="" /></span>');
		},
		complete: function() {
			$('#button-coupon').attr('disabled', false);
			$('.wait').remove();
		},		
		success: function(json) {
			if (json['error']) {
				alert( json['error'] );
			} else {
				$("input[name=coupon]").val("");
				alert( "<?php echo $text_payment_coupon_success; ?>" );
			}
		}
	});
});
//--></script> 
			]]></add>
		</operation>
	</file>
	
</modification>

Re: [vQmod] Apply coupon during checkout

Posted: Wed Dec 21, 2011 6:51 pm
by AnonyMoose
Thanks very much for this mod, worked for me on 1.5.1.3 and with custom template. Great work as usual!

Re: [vQmod] Apply coupon during checkout

Posted: Thu Dec 22, 2011 7:26 am
by burley
I installed it but can't seem to get it to work in 1.5.1, I haven't got any custom templates.


Has anybody got it to work on version 1.5.1? Or do I have to upgrade?

Re: [vQmod] Apply coupon during checkout

Posted: Thu Dec 22, 2011 7:02 pm
by JNeuhoff
burley wrote:I installed it but can't seem to get it to work in 1.5.1, I haven't got any custom templates.


Has anybody got it to work on version 1.5.1? Or do I have to upgrade?
Read this !

Re: [vQmod] Apply coupon during checkout

Posted: Thu Dec 22, 2011 8:19 pm
by burley
I did, installed it as well prior to posting here.

But my version is 1.5.1. not 1.5.1.1, somehow it doesn't work with my version.

Or am I missing something?

EDIT: Nevermind the above, I used your xml file as guide and edited the files (including the different language files) and it works like clockwork on 1.5.1.

It had something to do with the script code below which you commented out in the xml file. Put it in and it functions.

Code: Select all

<script type="text/javascript">
$('#button-coupon').bind('click', function() {
	$.ajax({
		type: 'POST',
		url: 'index.php?route=total/coupon/calculate',
		data: $('#coupon :input'),
		dataType: 'json',		
		beforeSend: function() {
			$('#button-coupon').attr('disabled', true);
			$('#button-coupon').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},
		complete: function() {
			$('#button-coupon').attr('disabled', false);
			$('.wait').remove();
		},		
		success: function(json) {
			if (json['error']) {
				alert( json['error'] );
			} else {
				$("input[name=coupon]").val("");
				alert( "<?php echo $text_payment_coupon_success; ?>" );
			}
		}
	});
});
</script> 

Re: [vQmod] Apply coupon during checkout

Posted: Fri Dec 23, 2011 7:00 pm
by fsroque
The script had a problem in ie7 where it would make the payment step disappear in opencart 1.5.1.3.

Attached is the fixed version, working for 1.5.1.3. Remember to change the theme if you do not use the default.

Re: [vQmod] Apply coupon during checkout

Posted: Fri Dec 23, 2011 7:37 pm
by JNeuhoff
fsroque wrote:The script had a problem in ie7 where it would make the payment step disappear in opencart 1.5.1.3.

Attached is the fixed version, working for 1.5.1.3. Remember to change the theme if you do not use the default.
Wasn't this fix working for you?

Re: [vQmod] Apply coupon during checkout

Posted: Sun Dec 25, 2011 12:14 am
by Klimskady
Can anyone help with the error I have that I posted above, I would really like to get this working on my website.

Edit** I also have the Shoppica theme, is there a problem with this playing nicely with the custom theme?

Re: [vQmod] Apply coupon during checkout

Posted: Mon Dec 26, 2011 8:26 am
by scoobs001
I solved my issue,

Remove and re-install VQMOD along with new XML files

Re: [vQmod] Apply coupon during checkout

Posted: Fri Dec 30, 2011 9:29 am
by Klimskady
scoobs001 wrote:I solved my issue,

Remove and re-install VQMOD along with new XML files

Did you also change the files like above?

I have already tried re-installing vQmod and I have reinstalled the XML file for this but still in vQmod Manager I am getting this error

REQUEST URI : /index.php?route=checkout/payment
MOD DETAILS:
modFile : /home/public_html/vqmod/xml/checkout-coupon.xml
id : Opencart core file modifications for adding coupon support into the checkout sequence
version : 1.5.1.1
vqmver : 1.2.3
author : mhccorp.com
SEARCH NOT FOUND (ABORTING MOD): <script type="text/javascript"><!--

I just would like this to work :(