Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PWA isn't working after discount coupon codes installation


Recommended Posts

I just installed the discount coupon codes and now my PWA contribution isn't working. It doesn't carry the shipping address and amount over to the checkout_shipping.php. It also will not leave the checkout_shipping.php page to go to the checkout_payment.php page. Exactly what codes do I need to insert to get the PWA working again? I'm really new at this and have no clue as to how to fix this.

Link to comment
Share on other sites

I just installed the discount coupon codes and now my PWA contribution isn't working. It doesn't carry the shipping address and amount over to the checkout_shipping.php. It also will not leave the checkout_shipping.php page to go to the checkout_payment.php page. Exactly what codes do I need to insert to get the PWA working again? I'm really new at this and have no clue as to how to fix this.

 

I've figured out which page it is that's causing the problem but have no idea how to fix it. It's the catalog/includes/classes/order.php. Can someone please help me out? Here is the discount coupon scripts on that page:

 

 

 

 

//kgt - discount coupons

global $coupon;

if( tep_session_is_registered( 'coupon' ) && tep_not_null( $coupon ) ) {

require_once( DIR_WS_CLASSES.'discount_coupon.php' );

$this->coupon = new discount_coupon( $coupon, $this->delivery );

$this->coupon->total_valid_products( $products );

$valid_products_count = 0;

}

//end kgt - discount coupons

 

 

 

 

 

//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;

**************/

//end kgt - discount coupons

 

 

 

//kgt - discount coupon

if( is_object( $this->coupon ) ) {

$this->info['total'] = $this->coupon->finalize_discount( $this->info );

}

//end kgt - discount coupon

Link to comment
Share on other sites

I've figured out which page it is that's causing the problem but have no idea how to fix it. It's the catalog/includes/classes/order.php. Can someone please help me out? Here is the discount coupon scripts on that page:

 

 

 

 

//kgt - discount coupons

global $coupon;

if( tep_session_is_registered( 'coupon' ) && tep_not_null( $coupon ) ) {

require_once( DIR_WS_CLASSES.'discount_coupon.php' );

$this->coupon = new discount_coupon( $coupon, $this->delivery );

$this->coupon->total_valid_products( $products );

$valid_products_count = 0;

}

//end kgt - discount coupons

 

 

 

 

 

//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;

**************/

//end kgt - discount coupons

 

 

 

//kgt - discount coupon

if( is_object( $this->coupon ) ) {

$this->info['total'] = $this->coupon->finalize_discount( $this->info );

}

//end kgt - discount coupon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...