Post by uksitebuilder » Thu Aug 11, 2011 3:32 am

so no shipping is being passed ?

basically
item_1 is product 1 in the cart
amount_1 is the value for that

item_2 can be either another product and will have an amount_2 for associated value
item_3 "" etc etc

then finally there will be a final item_x which contains shipping and also taxes and discounts again with an amount_x for it's value

I'm guessing you have no shipping because at the least you should have an item_2 that contains the shipping amount if you only have 1 product in the basket.

If you have free shipping, then I guess this could be the reason. I havent tested with free shipping, will test now this end.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Thu Aug 11, 2011 3:39 am

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)

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Maansy » Thu Aug 11, 2011 3:42 am

@uksitebuilder, thanks for the files. these are identical to what i am using. i uploaded them any ways but still the same.

this is what i tried so far:-
Scenario 1:
item price: 54.99
coupon value: 54.99
no tax, no shipping

in step 6 coupon value is detected from the total amount and showing total: $0.00
in paypal the coupon amount was ignore and showing the total is 54.99


Scenario 2:
item price: 54.99
coupon value: 53.99 (notice it is $1 less than the product price/total)
no tax, no shipping

in step 6 coupon value is detected from the total amount and showing total: $0.00
in paypal the coupon amount was detected and showing the total is $1.00

ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by uksitebuilder » Thu Aug 11, 2011 3:55 am

OK, I get the same as you in Scenario 1, but during checkout, I get a new Payment Option of 'Free Checkout'

I can't see anyone going to PayPal to pay $0.00

Agreed though it needs to be tidied up to not show PayPal if amount is below $1

--

With Scenario 2 though I don't get the same.

I get correct cart total showing and the same when I hit PayPal

--

I can only see that the zero amount (maybe a minus amount too) is causing a problem, and needs to be tidied up by hiding PayPal as a payment option if the amount is zero or less.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Maansy » Thu Aug 11, 2011 4:05 am

uksitebuilder wrote:OK, I get the same as you in Scenario 1, but during checkout, I get a new Payment Option of 'Free Checkout'

I can't see anyone going to PayPal to pay $0.00

Agreed though it needs to be tidied up to not show PayPal if amount is below $1

--

With Scenario 2 though I don't get the same.

I get correct cart total showing and the same when I hit PayPal

--

I can only see that the zero amount (maybe a minus amount too) is causing a problem, and needs to be tidied up by hiding PayPal as a payment option if the amount is zero or less.
thats exactly what it should do. if total is $0.00 then allow free checkout if not then go to paypal (in my case)

senario 2 is acually working correct (total $54.99 - coupon $53.99 = paypal total $1.00)

ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by uksitebuilder » Thu Aug 11, 2011 4:13 am

Do you get the free checkout option ?

If you do, here is a fix to hide paypal if total is zero or less

catalog/model/payment/pp_standard.php

find:

Code: Select all

		if ($this->config->get('pp_standard_total') > $total) {
change to:

Code: Select all

		if ($this->config->get('pp_standard_total') > $total || $total < 0.01) {
It is also the same for most other payment methods, they should not be shown if total is zero or less.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Maansy » Thu Aug 11, 2011 4:19 am


ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by phonepartsusa » Fri Aug 26, 2011 8:10 am

Hello All,

I added the vqmod on 1.5.1 and I noticed a few problems.

A few customers complained that the Payment Options were not showing up in the Check Out process. So, i removed the vqmod.

Now, Customers cannot apply any coupons in the regular shopping cart. ( it gives the error, the coupon is used / invalid coupon)

Anyone know what can be causing this? Thanks in advance!

New member

Posts

Joined
Thu Jul 28, 2011 9:42 am

Post by jomeza001 » Fri Aug 26, 2011 2:52 pm

Ok stupid question. I just installed this mod but i'm using Spanish Lang.

At storefront in final step before completing the payment i can see the Text box for the Coupon but it reads:

entry_payment_coupon
text_payment_coupon

How/where do i enable the equivalent value in Spanish for this variable???

User avatar
Active Member

Posts

Joined
Tue May 17, 2011 10:55 am

Post by nightcat » Tue Aug 30, 2011 4:51 pm

May I know how to use this "plugin", how to install?

User avatar
New member

Posts

Joined
Mon Aug 15, 2011 1:41 pm

Post by uksitebuilder » Tue Aug 30, 2011 5:23 pm

Firstly you need to install vQmod - see -> http://forum.opencart.com/viewtopic.php?f=23&t=24529

When vQmod is installed, then you can simply drop the download from this topic into your vqmod/xml folder

**Warning, If you have already modified core files, vQmod may not work correctly as it and the modules that can be used with it require the store files to be default.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by nightcat » Tue Aug 30, 2011 8:58 pm

Thanks! uksitebuilder, it's working very well !

User avatar
New member

Posts

Joined
Mon Aug 15, 2011 1:41 pm

Post by OpenM » Wed Aug 31, 2011 2:11 am

I successfully installed vQmod I made the change in the XML, as my template and my language, see below. It did not work, one could say what can be?

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']           = 'Informe o número do cupom (se disponível) e aclique "Aplicar Cupom"';
$_['text_payment_coupon']            = 'Cupom de Desconto:';
$_['text_payment_coupon_success']    = 'Cupom aplicado com sucesso!';
$_['button_coupon']                  = 'Aplicar Cupom';
			]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/bershka/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>

Newbie

Posts

Joined
Sun Aug 14, 2011 2:34 am

Post by uksitebuilder » Wed Aug 31, 2011 2:21 am

Have the vqmod/vqcache files been created that were referenced in the xml file ?

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by webpie it. » Wed Aug 31, 2011 1:26 pm

Just a quick one, it was brought to my attention that my cart did not work once it got the payment method using 1.5.0.5, wordked on all other browsers, just ie8, came up blank, took this mod away, and it worked.

I believe checkout coupon, needs to be tested in ie8 by some ohters to confirm this, as i have to remove this vqmod from all carts.

*Check your cart process in ie8 if you are running this*

Regards

Chris


Active Member

Posts

Joined
Mon Jan 31, 2011 7:28 pm

Post by JNeuhoff » Thu Sep 01, 2011 11:07 pm

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!

Attachments

VQmod to add coupon button on checkout page step 5


MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by webpie it. » Fri Sep 02, 2011 1:07 am

Thanks for that man!!

Regards

Chris


Active Member

Posts

Joined
Mon Jan 31, 2011 7:28 pm

Post by hcorobert » Fri Sep 02, 2011 6:58 am

jomeza001 wrote:Ok stupid question. I just installed this mod but i'm using Spanish Lang.

At storefront in final step before completing the payment i can see the Text box for the Coupon but it reads:

entry_payment_coupon
text_payment_coupon

How/where do i enable the equivalent value in Spanish for this variable???
I made the Spanish translation. In catalog > language > spanish > checkout > checkout.php

Add this:
$_['entry_payment_coupon'] = 'Ingrese su código (si está disponible) y haga clic en "Aplicar Cupón"';
$_['text_payment_coupon'] = 'Código de cupón:';
$_['text_payment_coupon_success'] = 'Su cupón de descuento ha sido aplicado exitosamente. Usted lo verá en el próximo paso a caja.';

I'm not a pro with PHP, but this worked for me. ;D

Newbie

Posts

Joined
Mon Aug 29, 2011 8:31 am

Post by dony_b » Thu Sep 08, 2011 3:19 am

How can I add this to confirm.tpl

I changed in <file name="catalog/view/theme/default/template/checkout/confirm.tpl"> but the coupon does not get applied.

Is there another way to do this ? Thanks

User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:56 pm
Location - Boston, MA

Post by michaelgbarnes » Sat Sep 10, 2011 8:17 am

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


Posts

Joined
Fri Sep 09, 2011 10:06 am
Who is online

Users browsing this forum: No registered users and 2 guests