Post by Qphoria » Sat Sep 10, 2011 10:17 pm

uksitebuilder wrote:Just tested with free shipping and instead of an item_x and amount_x

I just get a <input name="discount_amount_cart" value="0.50"> (which was the amount of discount)

When at PayPal it shows as an item 'Discount' but deducts from the totals correctly.

So looks like there are two ways of sending over the discount to paypal

1. if you have shipping, OC deducts the discount from the shipping and sets item_x and amount_x
2. if free shipping, OC sends the discount in discount_amount_cart


---

Just going to test now when the discount amount is greater than the shipping value to see what happens. (this is for my own satisfaction and doesnt help you though)
Just to add my research.. which maybe you already know...
Paypal only applies discounts to the "item total" and does not consider shipping or tax or handling to be "discount-eligible"

So if you have
Item Subtotal: 10
Shipping: 10
Discount: -10
Total: 10

Paypal will reject it because the discount is greater or equal to the item total

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by amcitsolutons » Sun Sep 11, 2011 12:26 am

michaelgbarnes wrote:Hello all,

Simon suggested I post my issue here regarding this mod.

I've reviewed both threads and installed both scripts with vqmod. Neither of them has any effect on the checkout page. I have only installed modules with vqmod and read that it was important to have unmodded files. Do you have any thoughts on what might cause neither of them to function at all?

I've checked user group permissions and everything appears normal otherwise.

Thanks in advance
I too am experiencing exactly the same problem. I have installed vQmod, and dropped the replacement xml file in the xml folder on vQmod.

But do not see the voucher code box in option 5.

Any help appreciated as it is desperately needed.

Thanks in advance ;D

Newbie

Posts

Joined
Fri Sep 09, 2011 6:32 pm

Post by terrier » Sun Sep 18, 2011 5:08 pm

Tested it and works perfectly..

Will there be any mod for gift voucher as well as rewards points?

New member

Posts

Joined
Wed Aug 31, 2011 7:05 pm

Post by xfacor » Mon Sep 19, 2011 10:31 pm

Can you do it for voucher (Gift Card)?

Newbie

Posts

Joined
Fri Sep 02, 2011 12:11 pm

Post by terrier » Mon Sep 19, 2011 10:39 pm

anyway.. to solve all these problems.. the easiest way is customer must go shopping cart before checkout.

therefore I route all checkout path to cart.

In that case all rewards, voucher, coupon will definately be there to entry before checkout! :)

New member

Posts

Joined
Wed Aug 31, 2011 7:05 pm

Post by SandCarver » Mon Sep 19, 2011 11:35 pm

First of all - thank you for J.Neuhoff for creating this wonderful vQmod. I had been searching for an answer since I upgraded from 1.4.x to 1.5.x.

For those that are not running the default template (like myself) I had to make 1 minor change to make the pp_standard.tpl file from my template match the default template in order for the coupon amount to transfer to PayPal.

The change was the addition of the following lines (at line 23):

Code: Select all

  <?php if ($discount_amount_cart) { ?>
  <input type="hidden" name="discount_amount_cart" value="<?php echo $discount_amount_cart; ?>" />
  <?php } ?>
Now my customers can enter a coupon code in the standard checkout process and it is deducted from their PayPal amount due.

Thank you again!

Checkout Our OpenCart powered Stores
Sandcarving Systems | Glass Banks


Newbie

Posts

Joined
Wed Nov 17, 2010 11:14 pm

Post by clapiana » Thu Oct 06, 2011 4:24 am

seems to be working fine for me on oc1513 thank you!

New member

Posts

Joined
Thu Sep 01, 2011 6:22 pm

Post by favfan » Tue Oct 18, 2011 7:10 am

Does anyone have this vQmod tweaked for Shoppica? I confirmed it works with default theme on 1.5.1.3, but when I tried it on Shoppica (also running 1.5.1.3), no luck. Thanks!

Newbie

Posts

Joined
Sat Sep 03, 2011 6:15 am

Post by john121park121 » Fri Oct 21, 2011 2:54 am

Works fine for me too on 1.5.1.3!

Thanks!


Posts

Joined
Tue Aug 30, 2011 11:24 pm

Post by goodweather » Wed Nov 09, 2011 12:46 pm

JNeuhoff wrote:Here is an updated VQmod XML file which should fix the bug with IE8:

Notice it is for Opencart 1.5.1.1 only, don't report bugs for other Opencart versions!
Hi,
thanks for writing this code.
It works fine for IE 8 and other browsers now, but is it possible to fix it for IE7?

Thanks in advance!

Newbie

Posts

Joined
Wed Aug 31, 2011 9:58 am

Post by travoltron » Thu Nov 17, 2011 1:00 am

My build of OC is 1.5.0.5, but this should work for everyone:
If you use a theme other than the default, you MUST list your theme name in directory to make this mod visible. Lines 29 and 53 are the culprits.

Line 29:
<file name="catalog/view/theme/[YOUR THEME NAME]/template/checkout/payment.tpl">
Line 53:
$('#button-coupon').after('<span class="wait">&nbsp;<img src="catalog/view/theme/[YOUR THEME NAME]/image/loading.gif" alt="" /></span>');
Hope it helps!

Newbie

Posts

Joined
Fri Nov 04, 2011 4:07 am

Post by kungmats » Fri Nov 18, 2011 9:41 pm

I know this is not made for 1.5.1.3, but I can see there are people using 1.5.1.3 that has make this work ... but how?

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by nytrous » Sat Nov 19, 2011 2:43 am

kungmats wrote:I know this is not made for 1.5.1.3, but I can see there are people using 1.5.1.3 that has make this work ... but how?
Hi;
it works for me on the 1.5.1.3 you just have to modify line 23
<file name="catalog/view/theme/default/template/checkout/payment.tpl">
To:
<file name="catalog/view/theme/NAME OF YOUR THEME/template/checkout/payment.tpl">

Hope that works for you :)

Image


New member

Posts

Joined
Tue Oct 25, 2011 2:24 am

Post by kungmats » Sat Nov 19, 2011 3:09 am

I've done both th line 29 and 53 but it doesn'n help.
Can I have your url to the shop so i can see how it appears?

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by nytrous » Sat Nov 19, 2011 4:11 am


Image


New member

Posts

Joined
Tue Oct 25, 2011 2:24 am

Post by kungmats » Sat Nov 19, 2011 4:24 am

ok, I can see you dont have guest check out ... is it ok if I just do a test account? and you can delete it afterwords,

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by nytrous » Sat Nov 19, 2011 4:26 am

you can test now with the guest checkout ;)

Image


New member

Posts

Joined
Tue Oct 25, 2011 2:24 am

Post by kungmats » Sat Nov 19, 2011 4:32 am

Thanks ... yes I can see the coupon option ;D , but it wont work on my page :(
http://shop.specialkompaniet.com

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm

Post by nytrous » Sat Nov 19, 2011 4:39 am

here is my code:

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/portuguese-br/checkout/checkout.php">
		<operation>
			<search position="after"><![CDATA[$_['text_comments']]]></search>
			<add><![CDATA[
$_['entry_payment_coupon']           = 'Coloque o codigo do seu cupão (se disponivel) e clique em Aplicar cupão"';
$_['text_payment_coupon']            = 'Código de cupão de desconto:';
$_['text_payment_coupon_success']    = 'O seu cupão de disconto foi aplicado correctamente no total da sua encomenda. Irá verificar isso no proximo passo quando verificar o total.';
$_['button_coupon']                  = 'Aplicar Cupão';
			]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/netde-1/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></div><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/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> 
			]]></add>
		</operation>
	</file>
	
</modification>
Maibe theres something there that you miss!

Image


New member

Posts

Joined
Tue Oct 25, 2011 2:24 am

Post by kungmats » Sat Nov 19, 2011 4:53 am

Nope :(

Using your code but changing to my data did not help.

On line 53 you have the theme set to default instead of netde-1 ... but it works anyway :) ... strange

Do you have any file in the folder /vqmod/vqcache/
that says coupon?

Active Member

Posts

Joined
Tue Jan 25, 2011 11:00 pm
Who is online

Users browsing this forum: No registered users and 22 guests