Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Discount Coupons for Version 2.3.1


27 replies to this topic

#21 thatguy

  • Community Member
  • 7 posts
  • Real Name:Pat

Posted 12 June 2011, 06:49

Nevermind, I got it to work.

Now how can we apply this to also work with PayPal? :(

#22 DunWeb

  • Community Sponsor
  • 10,464 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 12 June 2011, 07:26

Pat,



It works with PayPal Standard, IPN and Pro. However, it will NOT work with Express because Express bypasses the Checkout Process.




Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:

#23 thatguy

  • Community Member
  • 7 posts
  • Real Name:Pat

Posted 12 June 2011, 19:58

View PostDunWeb, on 12 June 2011, 07:26, said:

Pat,



It works with PayPal Standard, IPN and Pro. However, it will NOT work with Express because Express bypasses the Checkout Process.




Chris

Really? I was up for a good 6-7 hours yesterday trying to find a solution, or something that works with PayPal and osCommerce 2.3.1, but wasn't able to find anything. Would you possibly be so kind and explain/show me where I can get this IPN and how to implement it? I do need it for 2.3.1.

Thank You so much!

#24 krys

  • Community Member
  • 18 posts
  • Real Name:Krystal

Posted 17 June 2011, 13:22

View Postthatguy, on 12 June 2011, 19:58, said:

Really? I was up for a good 6-7 hours yesterday trying to find a solution, or something that works with PayPal and osCommerce 2.3.1, but wasn't able to find anything. Would you possibly be so kind and explain/show me where I can get this IPN and how to implement it? I do need it for 2.3.1.

Thank You so much!

I'd be grateful also Chris :) Mine is all working just not showing up in pay pal..

#25 sedemik

  • Community Member
  • 30 posts
  • Real Name:Mikko
  • Gender:Male

Posted 14 November 2011, 08:02

I add Discount Code for osCommerce 2.3.1 in my store and now I need help with tax. This add-on counts discount form taxless price but total tax of purhase is still from original price:

Now it counts:
Product price with tax: 25.00 €
(tax 13%, price without tax 22,12 €)
Dicount 10%: 2.21 € (from taxless price)
Total tax 13%: 2.88 € (from full price product)


It should be:
Product price with tax: 25,00 €
Discount 10% = 2,50 €
(New price with tax = 22,50 €)
Total tax 13% (from new price) = 2,59 €

Can anybody help me with this? It might that I have to change code to ot_tax.php but I don't know what I have to write.

#26 sedemik

  • Community Member
  • 30 posts
  • Real Name:Mikko
  • Gender:Male

Posted 14 November 2011, 08:49

View Postsedemik, on 14 November 2011, 08:02, said:

I add Discount Code for osCommerce 2.3.1 in my store and now I need help with tax. This add-on counts discount form taxless price but total tax of purhase is still from original price:

Now it counts:
Product price with tax: 25.00 €
(tax 13%, price without tax 22,12 €)
Dicount 10%: 2.21 € (from taxless price)
Total tax 13%: 2.88 € (from full price product)


It should be:
Product price with tax: 25,00 €
Discount 10% = 2,50 €
(New price with tax = 22,50 €)
Total tax 13% (from new price) = 2,59 €

Can anybody help me with this? It might that I have to change code to ot_tax.php but I don't know what I have to write.


Now I get total tax right but how I can get discount sum with tax?

#27 birdrockdesigns

  • Community Member
  • 77 posts
  • Real Name:Dave

Posted 06 December 2011, 06:08

This code is incorrect for V2.3.1

FIND on line 327:
		$shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
		$this->info['subtotal'] += $shown_price;
REPLACE with this code:
		//kgt - discount coupons
		if( is_object( $this->coupon ) ) {
		  $applied_discount = 0;
		  $discount = $this->coupon->calculate_discount( $this->products[$index], $valid_products_count );
		  if( $discount['applied_discount'] > 0 ) $valid_products_count++;
		  $shown_price = $this->coupon->calculate_shown_price( $discount, $this->products[$index] );
		  $this->info['subtotal'] += $shown_price['shown_price'];
		  $shown_price = $shown_price['actual_shown_price'];
		} else {
		  $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
		  $this->info['subtotal'] += $shown_price;
		}
		/**************
		$shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
		$this->info['subtotal'] += $shown_price;
		**************/

The code in my includes/classes/order.php looks like this:

$shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']);
		$this->info['subtotal'] += $shown_price;

Can someone assist?

Thank you.

Edited by birdrockdesigns, 06 December 2011, 06:13.


#28 birdrockdesigns

  • Community Member
  • 77 posts
  • Real Name:Dave

Posted 16 December 2011, 08:31

*crickets*