View Single Post
  #7  
Old 11-23-2009, 05:35 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Pulling my hair out ... Following Coupon Code

Ok I took it a little bit further because I don't want to force customers to login, register or fillout checkout info just to see how much they can save with the coupon (I know they can do simple math but still...). So I wanted the coupon discount form on cart page and last checkout page.

Thanks to David and Ralph. Here is my customization

1. Open skin1/customer/main/cart.tpl, find
Code:
{include file="modules/Discount_Coupons/add_coupon.tpl"}
and change to
Code:
{include file="modules/Discount_Coupons/add_coupon.tpl" ch_step="0"}

2. Open skin1/modules/Fast_Lane_Checkout/checkout_step_3.tpl, insert the discount coupon code (you can take it from the file above) and change the line with include file to
Code:
{include file="modules/Discount_Coupons/add_coupon.tpl" ch_step="1"}

3. Open modules/Discount_Coupons/discount_coupons.php, find (in 2 places)
Code:
func_header_location("cart.php");
and change to
Code:
if ($ch_step == 1) func_header_location("cart.php?mode=checkout&paymentid=".$cart["paymentid"]."&keep_https=yes"); else func_header_location("cart.php");

4. Open skin1/modules/Discount_Coupons/add_coupon.tpl, find
Code:
<form action="cart.php" name="couponform"> <input type="hidden" name="mode" value="add_coupon" />
and after it insert
Code:
<input type="hidden" name="ch_step" value="{$ch_step}" />

5. Open skin1/customer/main/cart_total.tpl, find (in 2 places)
Code:
<a href="cart.php?mode=unset_coupons" alt="{$lng.lbl_unset_coupon|escape}"><img src="{$ImagesDir}/spacer.gif" alt="{$lng.lbl_unset_coupon|escape}" /></a>
and change to
Code:
<a href="cart.php?mode=unset_coupons&ch_step=1" alt="{$lng.lbl_unset_coupon|escape}"><img src="{$ImagesDir}/spacer.gif" alt="{$lng.lbl_unset_coupon|escape}" /></a>

6. Run cleanup.php
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote