Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

Pascal,

 

At a quick guess this could be down to the order total modules sequence. See previous pages for peoples lists.

 

HTH

 

Si.

Share this post


Link to post
Share on other sites

Hello Simon,

 

I can't change the order of the modules, as they must be like that (the client demands it).

I will hack up the ot_coupon.php file, so that it just adds the VAT to the diplay ;-)

 

Cheers,

 

Pascal

Share this post


Link to post
Share on other sites
Nate,

 

Dont think anyone has looked into this, most people just changed the sequence around so that the redeem box is before the payment module. See the contribution for the checkout changes.

 

HTH

 

Si.

 

You are ALOT more familiar with this contribution than me, but do you think it would work if I had the redeem button also echo the cc fields and post the variable?

 

Thanks,

 

Nate

Share this post


Link to post
Share on other sites
Molafish,

JovaRoasters and I had started to create a new full release so please speak to him. I have found and fixed 5 minor bits and was going to add them in.

 

Yes, I was working with him as well. But alas he, as well as I, have been busy with real life.

 

Hopefully soon we'll get a new install up (one of us).

Share this post


Link to post
Share on other sites

Good news.

 

I think I am about 80% done with what I'll call ccgv 5.15.

 

It's taking so stinking long becuase I'm compiling an exhaustive changelog since rigaden's 5.13 full package release for every subsequent release.

 

Dozens of fixes, and detailed instructions for installation and a log of which releases I incorporated along the way to 5.15.

 

There's a lot of stuff that was 'forgotten' about along the way, because people would post changes without incorporating previous fixes. This release hopes to fix all that, and add some nifty admin panel controls as well.

Share this post


Link to post
Share on other sites
Good news.

 

I think I am about 80% done with what I'll call ccgv 5.15.

 

It's taking so stinking long becuase I'm compiling an exhaustive changelog since rigaden's 5.13 full package release for every subsequent release.

 

Dozens of fixes, and detailed instructions for installation and a log of which releases I incorporated along the way to 5.15.

 

There's a lot of stuff that was 'forgotten' about along the way, because people would post changes without incorporating previous fixes. This release hopes to fix all that, and add some nifty admin panel controls as well.

 

Sounds good. Can you take a guess as to how long it will be before you have something posted? I'm not trying to make you commit to anything its just I want to get the feature in before Xmas so have to decide as to whether to wait for the shiny new 5.15 or think about taking the 5.13 for now

 

Cheers

Steve

Share this post


Link to post
Share on other sites

Fast Easy Checkout Contrib

 

Hello all, i've installed everything but am stuck on the checkout side of things.

 

When i go to checkout i don't see an option to use the Gift Voucher. I have a contrib installed call Fast Easy Checkout, this is conflicting with it.

 

Just wondering if anyone using Fast Wasy Checkout and Gift Vouchers could post their checkout_shipping.php code up for me to look at.

 

Of if you know what i'm doing wrong please just tell me :).

 

 

Regards,

Scott

 

P.S i have overwriten checkout_shipping.php with the one supplied from 5.14 and it seems to work. But i loose the fast & easy checkout.

Share this post


Link to post
Share on other sites
Good news.

 

I think I am about 80% done with what I'll call ccgv 5.15.

 

It's taking so stinking long becuase I'm compiling an exhaustive changelog since rigaden's 5.13 full package release for every subsequent release.

 

Dozens of fixes, and detailed instructions for installation and a log of which releases I incorporated along the way to 5.15.

 

There's a lot of stuff that was 'forgotten' about along the way, because people would post changes without incorporating previous fixes. This release hopes to fix all that, and add some nifty admin panel controls as well.

 

Credit where credit is due. Molafish and Si; thanks. I'm sure more than a few of us have thought about going through the process of updating this contrib but knew we'd halfass it :lol:

 

Thanks for taking it on!

 

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

molafish,

 

B***** >_< wish you had responded sooner, I have spent a load of time testing JavaRoasters 5.13 and putting together another easy install. PM me with you email and well combine info.

 

Si.

 

molafish,

 

B***** >_< wish you had responded sooner, I have spent a load of time testing JavaRoasters 5.13 and putting together another easy install. PM me with your email and well combine info.

 

Si.

Share this post


Link to post
Share on other sites

Another question about the placement of the coupon box... can it be put on the checkout_shipping.php page?

 

Has anyone done so and if so are they willing to offer their code/ checkout_shipping.php page for help....

 

Thanks in advance,

 

Nate

Share this post


Link to post
Share on other sites

UPD8: It seems that the meat of this problem lays in whats getting taxed vs. whats getting displayed.

 

Sub-Total: $100.00

United Parcel Service (1 x 10.307lbs) (Ground): $11.75

Discount Coupons:FAM: -$20.00

Sales Tax: $5.80 (7.25%)

Total: $99.00

 

no matter how u add it, if you try doing so it doesn't work out... until you try it with sales tax on unmodified subtotal [$100, making tax $7.25] and things start to click. so! the tax is being computed for the non-discounted subtotal. can anyone assist here?

 

NEWS FLASH- I set config modules -> order total -> discount -> include tax to true, and now due to the Order of Operations, I'm getting a proper total of 97.55 (see below)... however, tax is still showing at $5.80 when clearly 7.25% tax on 100 is $7.25. I believe this is the problem when I try to import the related .iif file, which is at http://nettrip.org/temp/qbi_orders-20051121.iif , into quickbooks: it detects that the tax was figured wrong so the tax should be different or the total should be different. Does that sound right? Anyone know of any way around this? Do you, in fact, think thats why quickbooks chokes.. and perhaps some other peoples stuff as well? Am I mad to think that the invoice total should tally up properly anyway, and that anything else is a symtom of an unsolved problem that could spring up for anyone??

 

Thanks in advance

Allen

--

 

Sub-Total: $100.00

United Parcel Service (1 x 8.25lbs) (Ground): $11.75

Discount Coupons:FAM: -$21.45

Sales Tax: $5.80

Total: $97.55

 

(welp sorry I couldn?t help you guys more- now back to MY problem! ;)

 

I became aware of this problem while I was working on exporting orders to Quickbooks. On import, QB reported that the transaction was not in balance.

 

I hunted around and finally I found that there was a discrepency between the totals it gave and the totals I made on the calculator even when I messed with the order of operations...and this only appears to be an issue when a coupon was redeemed during the course of the order. I THINK some funky rounding is to blame somewhere (in this module, i presume) but I don't know where. Certianly, no matter what, the program should show the correct total or some total that makes sense given the other values...

 

Sub-Total: $10.00

United States Postal Service (1 x 0.363lbs) (First-Class Mail):

$2.77

Discount Coupons:DEBN473: -$1.00

Sales Tax: $0.65

Total: $12.50

 

(debn473 is a 10% off coupon. Sales tax here is 7.25%.)

 

And when I do this math, I get $12.42, not $12.50! (subtot -

disc) + tax-on-(subtot - disc) + shipping... (10-1) + .65 + 2.77 = 12.42 every time I do it.

 

Here's my module sort order.. tho I don?t think it should matter, since this -only- happens with discount coupons, and if I actually take ((subtotal+shipping)-discount) * tax[1.0725] I get 12.63.

 

Discount Coupons 760

Gift Vouchers 740

Shipping 2

Sub-Total 1

Tax 800

Total 900

 

Can anyone help me??

 

Thanks in advance-

allen

 

 

hy,

 

yep, im basically in the same boat as you. i finally arranged it so that i can get the correct total, but the tax percentage is off.. which means i'm improperly recording how much tax to pay later for each contribution -- dangerous waters....

 

hopefully we can get some answers on this one!

 

solidarity,

allen

 

Hello,

 

I'm having some troubles with the correct settings of the tax in the order total settings.

 

Here's my problem:

 

Subtotal (incl. VAT): 4.50 EUR

Discount Coupon:xxxx: -0.90 EUR

VAT 19.6%: 0.74 EUR

Shipping: 6.00 EUR

Total: 9.60 EUR

 

The settings in the admin interface are:

 

Discount Coupon

 

Display Total

true

Sort Order

4

Include Shipping

false

Include Tax

true

Re-calculate Tax

None

Tax Class

Taxable Goods

 

But the VAT is calculated from the original price (4.50 EUR), instead of the discounted price.

 

If I change the re-calculate tax to this value: Re-calculate Tax Standard

 

Then I get this output in the order confirmation page:

 

Subtotal (incl. VAT): 4.50 EUR

Discount Coupon:xxxx: -0.90 EUR

VAT 19.6%: 0.59 EUR

Shipping: 6.00 EUR

Total: 9.45 EUR

 

The VAT is based on the correct discounted price, but the Total is to low, it subtracts 0.15 EUR of the discount coupon value from the total.

 

How must I change the module, so that correct VAT is displayed, but the total amount is calculated correctly (without subtracting the VAT from the discount coupon value)?

 

Thanks a lot for your answers.

Share this post


Link to post
Share on other sites
Another question about the placement of the coupon box... can it be put on the checkout_shipping.php page?

 

Has anyone done so and if so are they willing to offer their code/ checkout_shipping.php page for help....

 

Thanks in advance,

 

Nate

 

This is actually something I'm considering as well except it needs to go even further up the checkout chain.

 

Here's the deal. It's REALLY easy to skip the shipping and checkout pages by seeing if you have a product with 0 weight and/or a cart with $0 so moving the coupon/GV entry before those pages would be an easy fix to the whole issue. Of course this is a bit of a hassle given that there's only the signup and login pages before that.

 

What do you guys with a little more time staring at the CCGV process think about moving the input and/or adding a page to the process. Would really appreciate some input on that.

 

Thanks,

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

I think it needs to stay on the payment page, unless we add a step to the checkout. Adding a step IMHO would cause more harm than good. Most issues are corrected by properly ordering the text field before the payment information. What I WOULD like to see is the "Redeem" button disappear. One shouldn't need to click two buttons when one will suffice.


Quidquid latine dictum sit, profundum viditur.

Share this post


Link to post
Share on other sites
I think it needs to stay on the payment page, unless we add a step to the checkout. Adding a step IMHO would cause more harm than good. Most issues are corrected by properly ordering the text field before the payment information. What I WOULD like to see is the "Redeem" button disappear. One shouldn't need to click two buttons when one will suffice.

 

Agreed. I can't think of a way to do it that makes sense in the current process or doesn't require another page. But there's no logic in there to apply a 100% coupon discount and the process would have to be retooled a bit (if I'm understanding it properly) to add the coupon code directly with the payment info.

 

Which still begs the question; How do you let someone checkout with a 100% coupon without having to enter a credit card number? Which brings me back to wanting to place the redeem before the payment page, which leads to more pages, which makes me want to put it on the payment page which...

 

You get the idea,

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites
Agreed. I can't think of a way to do it that makes sense in the current process or doesn't require another page. But there's no logic in there to apply a 100% coupon discount and the process would have to be retooled a bit (if I'm understanding it properly) to add the coupon code directly with the payment info.

 

Which still begs the question; How do you let someone checkout with a 100% coupon without having to enter a credit card number? Which brings me back to wanting to place the redeem before the payment page, which leads to more pages, which makes me want to put it on the payment page which...

 

You get the idea,

Iggy

 

I have created a checkout_payment page skip feature which you could envoke if your value left to pay is zero.

 

Si.

Share this post


Link to post
Share on other sites
Sounds good. Can you take a guess as to how long it will be before you have something posted? I'm not trying to make you commit to anything its just I want to get the feature in before Xmas so have to decide as to whether to wait for the shiny new 5.15 or think about taking the 5.13 for now

 

Cheers

Steve

 

I hope to work on it heavily over this weekend. A nice four days should bring it very close to completion.

 

molafish,

 

B***** >_< wish you had responded sooner, I have spent a load of time testing JavaRoasters 5.13 and putting together another easy install. PM me with you email and well combine info.

 

Si.

 

Yeah, me too. I wanted to have this done in October. I also spend a lot of time with JavaRoaster's stuff too. I'll set up an ftp and we can play with it. PM coming.

Share this post


Link to post
Share on other sites
I have created a checkout_payment page skip feature which you could envoke if your value left to pay is zero.

 

Si.

 

Bring forth the code! :lol:

 

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

This question has been asked here, but I haven't seen an answer. When I click redeem button, I am taken to login page. I have CCGV 5.14 (edited) and also PWA (Purchase Without Account) installed. Did anyone figure out a solution to this?

 

Dan

Share this post


Link to post
Share on other sites

I have PWA, and this doesn't happen to me. Ensure that you've made all required changes to checkout_payment.php and then tell us what version of PWA you installed.

 

I know there's code that needed to be changed for PWA which normally would redirect to the login (That is, needed to be changed for PWA, not for CCGV).

Share this post


Link to post
Share on other sites
I have PWA, and this doesn't happen to me. Ensure that you've made all required changes to checkout_payment.php and then tell us what version of PWA you installed.

 

I know there's code that needed to be changed for PWA which normally would redirect to the login (That is, needed to be changed for PWA, not for CCGV).

I am using 0.82. It worked fine before I installed CCGV, and it works fine now, if I don't use any coupons/discounts. But, if I hit redeem, I am sent to the login page. If after that I go back and refresh, the coupon applied to the account.

Anyone know the reason for this? It seems the redeem button invokes a javascript, but I am not sure how it acts in the form submission.

I've been messing with this contribution for a few days now, and this is the only major problem left...

Share this post


Link to post
Share on other sites

does CCGV work with paypal payment pro payment module ?

 

I was planning to install CCGV but then i came to know it doesnt work with pay pal pro payments module ( removed from OSC Site).

 

Anyone has any info on this ?

Share this post


Link to post
Share on other sites

Ok

 

I've added the osCommerce Credit Class and Gift Voucher "Easier to Understand" Payment Addon v1.2

 

Everything works as far as can be seen, but this is the error........i've tried searching for the function on line 84 with this part of the function flagging the error

 

Warning: Missing argument 1 for javascript_validation() in /homepages/2/XXXXXXXXXXX/htdocs/GForce/shopping/includes/classes/payment.php on line 84..........Line 84 is where the function javascript_validation($coversAll) { begins

 

 

// #################### Begin Added CGV JONYO ######################
//	function javascript_validation() {
 function javascript_validation($coversAll) {
//added the $coversAll to be able to pass whether or not the voucher will cover the whole
//price or not.  If it does, then let checkout proceed when just it is passed.
  $js = '';
  if (is_array($this->modules)) {
if ($coversAll) {
  $addThis='if (document.checkout_payment.cot_gv.checked) {
  payment_value=cot_gv;  alert (\'hey yo\');
  } else ';
  } else {
$addThis='';
  }
	$js = '<script language="javascript"><!-- ' . "\n" .
		  'function check_form() {' . "\n" .
		  '  var error = 0;' . "\n" .
		  '  var error_message = "' . JS_ERROR . '";' . "\n" .
		  '  var payment_value = null;' . "\n" .$addThis . //added by jonyo, yo
		  '  if (document.checkout_payment.payment.length) {' . "\n" .
		  '	for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" .
		  '	  if (document.checkout_payment.payment[i].checked) {' . "\n" .
		  '		payment_value = document.checkout_payment.payment[i].value;' . "\n" .
		  '	  }' . "\n" .
		  '	}' . "\n" .
		  '  } else if (document.checkout_payment.payment.checked) {' . "\n" .
		  '	payment_value = document.checkout_payment.payment.value;' . "\n" .
		  '  } else if (document.checkout_payment.payment.value) {' . "\n" .
		  '	payment_value = document.checkout_payment.payment.value;' . "\n" .
		  '  }' . "\n\n";

	reset($this->modules);
	while (list(, $value) = each($this->modules)) {
	  $class = substr($value, 0, strrpos($value, '.'));
	  if ($GLOBALS[$class]->enabled) {
		$js .= $GLOBALS[$class]->javascript_validation();
	  }
	}

// ############ Added CCGV Contribution ##########
//		$js .= "\n" . '  if (payment_value == null) {' . "\n" .
	$js .= "\n" . '  if (payment_value == null && submitter != 1) {' . "\n" . // CCGV Contribution
// ############ End Added CCGV Contribution ##########
		   '	error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" .
		   '	error = 1;' . "\n" .
		   '  }' . "\n\n" .
// ############ Added CCGV Contribution ##########
//  ICW CREDIT CLASS Gift Voucher System Line below amended
//			   '  if (error == 1) {' . "\n" .
		   '  if (error == 1 && submitter != 1) {' . "\n" .
// ############ End Added CCGV Contribution ##########
		   '	alert(error_message);' . "\n" .
		   '	return false;' . "\n" .
		   '  } else {' . "\n" .
		   '	return true;' . "\n" .
		   '  }' . "\n" .
		   '}' . "\n" .
		   '//--></script>' . "\n";
  }

  return $js;
}
// #################### End Added CGV JONYO ######################

 

Thanks

Share this post


Link to post
Share on other sites

I found that if I used another version that is slightly modified to a "purer" form?? that it kills the error.......it seems the java arguement is invalid or I missed something. Here is the code that kills the error but I'm sure the mod isn't 100%...........any ideas ......???

 

   function javascript_validation() {
 $js = '';
 if (is_array($this->modules)) {
   $js = '<script language="javascript"><!-- ' . "\n" .
		 'function check_form() {' . "\n" .
		 '  var error = 0;' . "\n" .
		 '  var error_message = "' . JS_ERROR . '";' . "\n" .
		 '  var payment_value = null;' . "\n" .
		 '  if (document.checkout_payment.payment.length) {' . "\n" .
		 '	for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" .
		 '	  if (document.checkout_payment.payment[i].checked) {' . "\n" .
		 '		payment_value = document.checkout_payment.payment[i].value;' . "\n" .
		 '	  }' . "\n" .
		 '	}' . "\n" .
		 '  } else if (document.checkout_payment.payment.checked) {' . "\n" .
		 '	payment_value = document.checkout_payment.payment.value;' . "\n" .
		 '  } else if (document.checkout_payment.payment.value) {' . "\n" .
		 '	payment_value = document.checkout_payment.payment.value;' . "\n" .
		 '  }' . "\n\n";

   reset($this->modules);
   while (list(, $value) = each($this->modules)) {
	 $class = substr($value, 0, strrpos($value, '.'));
	 if ($GLOBALS[$class]->enabled) {
	   $js .= $GLOBALS[$class]->javascript_validation();
	 }
   }

   $js .= "\n" . '  if (payment_value == null) {' . "\n" .
		  '	error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" .
		  '	error = 1;' . "\n" .
		  '  }' . "\n\n" .
		  '  if (error == 1 && submitter != 1) {' . "\n" . // GV Code Start/End
		  '	alert(error_message);' . "\n" .
		  '	return false;' . "\n" .
		  '  } else {' . "\n" .
		  '	return true;' . "\n" .
		  '  }' . "\n" .
		  '}' . "\n" .
		  '//--></script>' . "\n";
 }

 return $js;
  }

Share this post


Link to post
Share on other sites

kittmaster,

 

You need to reread his instrutions in the 1.2 notes and check you have made the mods correctly, as it has mods to this function and they now pass in this variable.

 

HTH

 

Si.

Share this post


Link to post
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

×