Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Coupon redirection issues

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-21-2008, 04:26 PM
 
Chrisb Chrisb is offline
 

Member
  
Join Date: Jan 2008
Posts: 25
 

Default Coupon redirection issues

I have managed to move the coupon entry box to the final submit order page however when I type the coupon code in it redirects me to the previous page. How can I get it to stay on the current page?

The code to redirect to page after coupon has been entered from discount_coupon.php
if($my_coupon > 0) {
$cart["discount_coupon"] = "";
$cart["coupon_type"] = "";
$top_message['type'] = 'E';
}
func_header_location("cart.php?mode=checkout");
}
elseif ($mode=="unset_coupons") {
$cart["discount_coupon"]="";
$cart["coupon_type"] = "";
func_header_location("cart.php?mode=checkout");
}


The code I pasted into checkout.tpl to bring up coupon box

{if $cart.coupon_discount eq 0 and $products ne ""}
<p />
{if $active_modules.Discount_Coupons ne ""}
{include file="modules/Discount_Coupons/add_coupon.tpl}
{/if}
{/if}
__________________
www.easycoffee.com.au
Version 4.1.9
Reply With Quote
  #2  
Old 02-21-2008, 07:22 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Coupon redirection issues

Look at what the url is on the last page of your checkout and put that in the header_location instead of cart.php?mode=checkout
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-22-2008, 01:55 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: Coupon redirection issues

For example instead 'func_header_location("cart.php?mode=checkout");' in your code:

Code:
$cart['checkout_step']=4; func_header_location("cart.php?mode=checkout&paymentid=4");

Note: You should to know paymentid of the selected payment method (if you have more than one payment method).

But this is another question...
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote
  #4  
Old 02-24-2008, 02:07 PM
 
Chrisb Chrisb is offline
 

Member
  
Join Date: Jan 2008
Posts: 25
 

Default Re: Coupon redirection issues

Hey guys thanks for the reply I have tried numerous header locations but none of them seem to work. I have tried:

("cart.php?mode=checkout&$paymentid")
("cart.php?mode=checkout&paymentid=4")
and more.
And the address in the address bar is http://easycoffee.com.au/cart.php which just bings me back to the start of the checkout process?
__________________
www.easycoffee.com.au
Version 4.1.9
Reply With Quote
  #5  
Old 02-25-2008, 04:23 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Coupon redirection issues

Perhaps this won't work with Fast Lane
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 02-25-2008, 12:11 PM
 
Chrisb Chrisb is offline
 

Member
  
Join Date: Jan 2008
Posts: 25
 

Default Re: Coupon redirection issues

That is what I am beginning to think All I need is the coupon to be on a page that is not skipped by the user. As it is when the user clicks on checkout they go straight past this point
__________________
www.easycoffee.com.au
Version 4.1.9
Reply With Quote
  #7  
Old 02-27-2008, 08:14 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: Coupon redirection issues

I've wrote "You should know paymentid of the selected payment method (if you have more than one payment method)."
Paymentid must be equal of selected by customer. Otherwise this will not work.
I've tested this at your site and I'm sure that this method working properly.
I've registered in your shop as Holub_from_forum. At 'Select payment method'checkout step I've selected 'Money Order' (from HTML source - paymentid=7). At last step I've returned to home.php and try to use url `http://easycoffee.com.au/cart.php?mode=checkout&paymentid=7` - and I was redirected to last checkout step 'Place order'.
Therefore, your shop should to `remember` selected paymentid and redirects customer to cart.php?mode=checkout&paymentid=(selected_payment _method_id)
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote
  #8  
Old 03-02-2008, 04:23 PM
 
Chrisb Chrisb is offline
 

Member
  
Join Date: Jan 2008
Posts: 25
 

Default Re: Coupon redirection issues

OK I see it does work when you enter the specific URL. But unfortunatelly as you said if you have multiple payment options this will not work. Is there a way to pass the payment ID into the URL depending on what is selected?
__________________
www.easycoffee.com.au
Version 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:07 AM.

   

 
X-Cart forums © 2001-2020