If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)

NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)

Started by ajeh on 27 Nov 2010, 1:33 AM · Views: 15,603

Results 1 to 20 of 53
27 Nov 2010, 1:33 AM
#1
ajeh avatar

ajeh

Oba-san

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

Post #1 by ajeh

For those of you who have been anxious over needing a Discount Coupon that can be:

1 Free Shipping

2 Amount Off

3 Percentage off

4 Amount Off and Free Shipping

5 Percentage Off and Free Shipping

This is a test of the changes needed to allow this to work in v1.3.9h ...

This may work in other versions but it has not been tested nor will it be supported on older versions in any way ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Dec 2010, 12:41 PM
#2
simplemedia avatar

simplemedia

New Zenner

Join Date:
Nov 2008
Posts:
4
Plugin Contributions:
0

Post #2 by simplemedia

Hi Ajeh!

Thanks for this!

I replaced the files and nothing is working, shouldn't there be an update to the database as well?

Thanks!

2 Dec 2010, 12:45 PM
#3
simplemedia avatar

simplemedia

New Zenner

Join Date:
Nov 2008
Posts:
4
Plugin Contributions:
0

Post #3 by simplemedia

My bad... because of the new version the admin folder was chnaged to a new folder name, works fine now!

Thanks!

2 Dec 2010, 2:50 PM
#4
ajeh avatar

ajeh

Oba-san

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

Post #4 by ajeh

Thanks for the update that this is now working for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Mar 2011, 8:32 PM
#5
thegoodlifestore avatar

thegoodlifestore

New Zenner

Join Date:
Oct 2007
Location:
North Carolina
Posts:
102
Plugin Contributions:
0

Post #5 by thegoodlifestore

YES! This is just what we were needing. Thanks a bunch!!!

:bigups:

22 Mar 2011, 9:03 PM
#6
njka avatar

njka

New Zenner

Join Date:
Oct 2010
Posts:
18
Plugin Contributions:
0

Post #6 by njka

This is fantastic! Thank you Ajeh.

23 Mar 2011, 12:46 AM
#7
ajeh avatar

ajeh

Oba-san

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

Post #7 by ajeh

Thanks for the update that this worked for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Apr 2011, 11:37 PM
#8
bendersp avatar

bendersp

New Zenner

Join Date:
Apr 2011
Posts:
2
Plugin Contributions:
0

Post #8 by bendersp

This is a great contribution thank you.

7 Apr 2011, 4:42 AM
#9
ajeh avatar

ajeh

Oba-san

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

Post #9 by ajeh

Thanks for the update that this is working for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Apr 2011, 4:11 AM
#10
pentaxboise avatar

pentaxboise

New Zenner

Join Date:
Apr 2010
Posts:
10
Plugin Contributions:
0

Post #10 by pentaxboise

Ajeh,

Thank you!! Works perfectly for my client's application.

Where is that link to buy a cup of coffee (contribute to the project)?

Thanks! :clap:

21 Jun 2011, 9:51 PM
#12
greydayrecords avatar

greydayrecords

New Zenner

Join Date:
Oct 2008
Location:
Portland, OR
Posts:
16
Plugin Contributions:
0

Post #12 by greydayrecords

Just in case using this confuses anyone else, the admin interface does NOT change, so it'll still say the free shipping will override the discount, but if you test it it works exactly as it's supposed to...

19 Jul 2011, 3:02 AM
#13
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Post #13 by jeking

I've installed this but the discount amount is off. It's adding $6 to the discount and I'm not sure why.

Order Totals are:
Discount Coupo not_coupon 280
Group Discount ot_group_pricing 290
Gift Certificates ot_gv 840
Low Order Fee ot_loworderfee 400
Shipping ot_shipping 200
Sub-Total ot_subtotal 100
Tax ot_tax 300
Total ot_total 999

I'm not sure what to look for as the cause.

EDIT: The percentage off is the problem. The dollar off works.

Jim
Wheaton Website Services

19 Jul 2011, 3:38 AM
#14
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Post #14 by jeking

A little more testing and here's what is seems is happening. I was using a 50% coupon and free shipping. The shipping was $12 but the discount was 50% of the product cost, plus $12, plus $6 more dollars (50% of shipping). It seems to be applying the discount to the shipping AND giving free shipping.

Jim
Wheaton Website Services

26 Aug 2011, 5:05 PM
#15
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Post #15 by llynix

Just wanted to say thank you. I installed this and it worked perfectly. I'm not experiencing the problem jk was having.

One thing I did find.. if you want to remove the Note in the admin page that says Note. This overrides the coupon_amount figure but respects the minimum order value

It's in file admin/includes/languages/english/coupon_admin.php line 101

DentalPlanet Designed/Administrated by Falls Geek

30 Aug 2011, 3:19 PM
#16
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Post #16 by llynix

I spoke too soon. I ended up with an error:

PHP Warning: Missing argument 1 for currencies::get_decimal_places(), called in /var/www/vhosts/buydentalequipment.com/httpdocs/includes/modules/order_total/ot_coupon.php on line 507 and defined in /var/www/vhosts/buydentalequipment.com/httpdocs/includes/classes/currencies.php on line 108

It would appear as though get_decimal_places requires a parameter which isn't present.

In ot_coupon.php I found the bug and fixed it.. although I'm fairly sure I did it the wrong way :)

    // this line was coded wrong.. hard coded it to two for now until I can figure out what is supposed to be sent in with it.
    //$prec = $currencies->get_decimal_places();
    $prec = 2;

DentalPlanet Designed/Administrated by Falls Geek

26 Sep 2011, 3:29 PM
#17
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #17 by delia

Worked with $100 min, free shipping and 15%. Hope this is going into the next version. I was so irritated when I found zencart couldn't do what my customer wanted! Didn't realize she was asking too much at the time so egg got splattered on my face. Thanks for saving my bacon.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

22 Nov 2011, 6:51 AM
#18
sonic avatar

sonic

New Zenner

Join Date:
Mar 2006
Location:
Toronto, Ontario
Posts:
10
Plugin Contributions:
0

Post #18 by sonic

Ajeh,

I'm sorry for double posting. I previously posted a message regarding this same feature requirement but haven't seen a response as yet ...
http://www.zen-cart.com/forum/showthread.php?t=188630

Would it be difficult to modify this contribution to add the ability to create a discount coupon that would give a discount percentage off the retail price instead of the current special or salemaker price?

If we do an advertisement in a magazine, and get 200 people trying to buy something it would be chaos trying to communicate with each and add them to a group for "group pricing".

If we have 10% discount on the store product, and the 'coupon' is set to 20% off Retail, then they should get an additional 10% off. But if we go crazy and offer a Cyber Monday Special of 25% off, then the coupon should be ignored on that day, and they would get the current sale price of 25% off.

If an additional checkbox was added after Coupon Amount, that said "Discount off Retail Price" then an additional coupon_type could possibly be added to handle this situation?

Any thoughts would be greatly appreciated. I'm prepared to pay money to get this done. If you don't think this contribution is a good place to start, if you can point me in a different direction I would appreciate it.

We have Zen-Cart 1.3.9h.

28 Nov 2011, 5:03 AM
#19
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Post #19 by bi11i

is there an update on whether or not this is a fix? i like this addition and will use it frequently (and thought I was before;))

thanks!

llynix:

I spoke too soon. I ended up with an error:

PHP Warning: Missing argument 1 for currencies::get_decimal_places(), called in /var/www/vhosts/buydentalequipment.com/httpdocs/includes/modules/order_total/ot_coupon.php on line 507 and defined in /var/www/vhosts/buydentalequipment.com/httpdocs/includes/classes/currencies.php on line 108

It would appear as though get_decimal_places requires a parameter which isn't present.

In ot_coupon.php I found the bug and fixed it.. although I'm fairly sure I did it the wrong way :)

// this line was coded wrong.. hard coded it to two for now until I can figure out what is supposed to be sent in with it.
//$prec = $currencies->get_decimal_places();
$prec = 2;
20 Dec 2011, 7:32 PM
#20
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Post #20 by familynow

I imagine many figured this out on your own. But just for informational purposes, if you edit /includes/languages/english/coupon_admin.php you can remove the warning 'This overrides the coupon_amount figure' statement. Could be useful to avoid confusion when there's more that one person working on the store.