Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Shipping adjusted after coupon discounted?

Shipping adjusted after coupon discounted?

Locked

Views: 3,942

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
23 May 2006, 9:16 PM
#1
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Shipping adjusted after coupon discounted?

When an international customer purchases over $200, they get free shipping (set up under Order Total > Shipping). But when they use a coupon code and it brings their total under $200, they are still getting free shipping.

I would like the free shipping to be based on the total after coupons are discounted, not before. I tried adjusting the sort order of the order total modules to no effect.

Example: a customer purchased a dress for $205 and used a coupon code which brought her total to $174.25. Because the original price was over $200, she did not get charged the $30 for us to ship to Europe.

Please let me know if there is a way to adjust this. Thanks!

28 Jul 2006, 6:55 AM
#2
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

I have a feeling bumping is discouraged, but I've waited months and haven't heard a peep... anyone?

This is also posted in the "commercial help wanted" forum, but no takers there either.

The cart in question is a 1.2 cart - any chance this is corrected/modifiable in 1.3?

Any tips at all would be appreciated!

6 Aug 2006, 9:06 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping adjusted after coupon discounted?

This does appear to work happily in Zen Cart v1.3.0.2 ... :smile:

7 Aug 2006, 5:24 PM
#4
cherylkemp avatar

cherylkemp

Zen Follower

Join Date:
Mar 2006
Posts:
179
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

I've noticed this too...so I just need to change the sort order? Currently it is:

Modules Sort Order Action
COD Fee ot_cod_fee Info
Discount Coupon ot_coupon 280
Group Discount ot_group_pricing 290 Info
Gift Certificates ot_gv 840 Info
Low Order Fee ot_loworderfee 400 Info
Shipping ot_shipping 200 Info
Sub-Total ot_subtotal 100 Info
Tax ot_tax 300 Info
Total ot_total 999 Info

11 Dec 2006, 12:55 AM
#5
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

I'm using 1.3.5 and it's not working...in my sort order shipping is after discount coupons...

13 Dec 2006, 3:40 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping adjusted after coupon discounted?

I would upgrade to v1.3.6 and then work on any issues ...

13 Dec 2006, 5:14 AM
#7
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

Is that a change in 1.3.6?

13 Dec 2006, 6:18 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping adjusted after coupon discounted?

I have free shipping on $500.00 order and a 25% Discount Coupon ...

Sub-Total: $525.00
Shipping: $0.00
Discount Coupon: 25OFFALL : -$131.25
Total: $393.75

20 Apr 2007, 7:06 AM
#9
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

Okay, same problem! I don't understand this.

I'm working on a 1.3.7 site (same site as last year, in fact, now upgraded).

The site has free shipping for orders over $225.00.

When I add a $231.00 item to my cart, I get free shipping. This is correct.

Then I apply a 15% discount coupon, which takes my order total below the $225.00 amount, so I should now not get free shipping, since I haven't spent enough. I see this on checkout:

Sub-Total: $231.00
Discount Coupon: -$34.65
Free Shipping: $0.00
Total: $196.35

It looks like it's still basing shipping off of the sub-total - how can I get it to base shipping on the sub-total minus the coupon?

I've tried changing the sort order so the coupon comes before the sub-total but that doesn't seem to have an effect, other than changing the order they're displayed in on the page. Here is my order total sort order in the admin:

Sub-Total: 200
Discount Coupon: 280
Tax: 300
Low Order Fee: 400
Shipping: 500
Total: 999

When I switch Sub-Total and Discount Coupon, I get the same results.

What can I do to get this working as described in my original message?

Thanks!

22 Apr 2007, 3:01 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping adjusted after coupon discounted?

I set mine up for Free Shipping on $500 or more in Shipping ot_shipping ... plus a 10% off Discount Coupon on orders over $75 ...

Sub-Total: 500
Shipping: $0.00
Discount Coupon: ABC500 : -$50.00
Group Discount: -$45.00
Total: $405.00

22 Apr 2007, 3:04 AM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping adjusted after coupon discounted?

Oh wait ... are you planning on penalizing me because I ordered so much and got the discount but you don't want me to get the Free Shipping because I bought how much was needed but then the discount coupon reduced my total so I am not not eligable for the Free shipping on that $500 order because you gave me a 10% discount? :blink:

25 Apr 2007, 7:28 PM
#12
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

Yes, exactly - this is how my client wants it to work.

25 Apr 2007, 11:38 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping adjusted after coupon discounted?

That is a horrible way to build good relations with customers ... :eek:

There is a way to do this nasty method, but I would really have to fool with some settings etc. on how to screw the customer on the deal ... :cry:

While I am thinking on how to do this ... perhaps someone else already knows a method to jip the customer out of Free Shipping on Orders of $500 or more except if they use the 10% Discount Coupon you gave them to encourage them to come to your store in the first place ...

20 Dec 2007, 1:36 AM
#14
silverzulu avatar

silverzulu

New Zenner

Join Date:
Nov 2007
Posts:
10
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

I believe that if it is implemented correctly, then it's not such a horrible way of treating customers. One must make sure that when using a discount coupon, the final price is at least less than the final price of the free shipping order. Lets face it, offering free shipping etc. is just another form of discount. The wish to offer a coupon code is a form of marketing, but if you are offering free shipping, you might find that offering a meaningful discount value might be just to much discount to handle. This is definitely the case with my store. I believe that I have found a solution but this does require code changes.

First the theory behind the change. I use the zone table to calculate shipping and if a coupon is entered, I wanted to override this table with some other value. (I use all three zone definitions) so the first thing that I did was to add an extra values in the 'Zone 1, 2 and 3 Shipping Table' under the admin console ie.

*Zone 1 Shipping Table
100.00:6.50:6.75,200.00:0.00:6.75,300.00:0.00:9.75,400.00:0.00:11.00,10000.00:0.00:12.75

Zone 2 Shipping Table
100.00:15.00:18.50,200.00:13.00:18.50,300.00:11.00:22.50,400.00:9.00:23.50,500.00:0.00:18.50,10000.00:0.00:22.50

Zone 3 Shipping Table
100.00:25.00:26.50,200.00:17.50:20.00,300.00:10.00:17.50,400.00:5.00:15.00,10000.00:0.00:00.00
*

The price less than or equal to 100 would cost 6.50 without a coupon and 6.75 with a coupon for Zone 1 destinations. Thus instead of 2 values per record, there are 3.

Now edit includes/modules/shipping/zones.php at the following 5 places;
Near line 144

        $zones_table = split("[:,]" , $zones_cost);
to 
        $zones_table = split("[::,]" , $zones_cost);

Near line 147

        for ($i=0; $i<$size; $i+=2) {
to
        for ($i=0; $i<$size; $i+=3) {

Near line 151

                $shipping = $zones_table[$i+1];
to
                $shipping = ($order->info['coupon_code'] != '')? $zones_table[$i+2] : $zones_table[$i+1];

Near line 177

                $shipping = $zones_table[$i+1];
to
                $shipping = ($order->info['coupon_code'] != '')? $zones_table[$i+2] : $zones_table[$i+1];

Near line 186

                $shipping = $zones_table[$i+1];
to
                $shipping = ($order->info['coupon_code'] != '')? $zones_table[$i+2] : $zones_table[$i+1];

This means that whenever a coupon code is entered, the shipping will be adjusted to the second value, but here is the first problem that I had, the coupon code is entered on the page after selecting shipping. Ok, so wherever a coupon code is entered or removed, the user needs to be taken back to the 'shipping method' page and told to note the new shipping cost. This actually makes sense because some users might not notice the shipping cost changes if you took them directly to the third step and might later state that your site made an error in calculating the shipping costs.

You now need to change includes/modules/order_total/ot_coupon.php at 2 places. (This code takes the user back to the first step)
Near line 102

      unset($_SESSION['cc_id']);
      $messageStack->add_session('checkout_payment', TEXT_REMOVE_REDEEM_COUPON, 'caution');
to
      unset($_SESSION['cc_id']);
      zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, 'credit_class_error_code=123&credit_class_error='.TEXT_REMOVE_REDEEM_COUPON, 'SSL',true, false));

Near line 220

      $messageStack->add_session('checkout', TEXT_VALID_COUPON,'success');
to
      zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, 'credit_class_error_code=124&credit_class_error='.TEXT_VALID_COUPON, 'SSL',true, false));

Insert the following code near the top of includes/templates/{YOUR TEMPLATE NAME}/templates/tpl_checkout_shipping_default.php (For example, the line after '<div class="centerColumn" id="checkoutShipping">')

<?php if ($_GET['credit_class_error_code'] == 123 || $_GET['credit_class_error_code'] == 124) {?>
<div class="messageStackSuccess">

<?php echo zen_image($template->get_template_dir(ICON_IMAGE_SUCCESS, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_SUCCESS, ICON_SUCCESS_ALT); echo zen_output_string_protected($_GET['credit_class_error']); ?></div><br />

<div class="messageStackError">
<?php echo TEXT_RECHECK_SHIPPING; ?></div>
<?php } ?>

Now for the final change, add the following line in includes/languages/english.php (and any other language files in the same folder)

  define('TEXT_RECHECK_SHIPPING', 'Please recheck shipping as rates may have changed');
29 Dec 2007, 1:45 AM
#15
cienwen avatar

cienwen

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

This is a very interesting thread. Please post whether or not you have got it working Aeolidia.

As for the "Nastyness" of it, it may be so, but most of the big sites work this way. When I order something form Circuit City or JCPenny, I only get free shipping if my Total, not my sub-total meets the requirements.

Just my 2 cents.

10 Nov 2008, 8:15 PM
#16
shara avatar

shara

New Zenner

Join Date:
Jul 2005
Location:
Los Angeles
Posts:
50
Plugin Contributions:
0

Re: Shipping adjusted after coupon discounted?

After looking for a solution to this problem I've decided it's going to take re-writing the checkout pages to have the discount code be applied before the shipping method is chosen.

It's correct that most other places I shop apply my discount codes to my order before they offer me free shipping. My customers love free shipping of orders of $100 or more, but I also need to use coupon codes to entice them to come back to the store frequently. I'm not "penalizing" them if I want their product total to be over $100, I want to make a little money too!

If possible can this be something for the next version? I think it would be greatly appreciated.