-
1 Attachment(s)
NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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 ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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!
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
My bad... because of the new version the admin folder was chnaged to a new folder name, works fine now!
Thanks!
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Thanks for the update that this is now working for you ... :smile:
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
YES! This is just what we were needing. Thanks a bunch!!!
:bigups:
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
This is fantastic! Thank you Ajeh.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Thanks for the update that this worked for you ... :smile:
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
This is a great contribution thank you.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Thanks for the update that this is working for you ... :smile:
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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:
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
I found the link and contributed. Thanks again!
For anyone else reading this thread:
http://www.zen-cart.com/index.php?ma...es&pages_id=14
thanks!
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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 :)
PHP Code:
// 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;
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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!
Quote:
Originally Posted 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 :)
PHP Code:
// 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;
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
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.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Firstly, I want to thank you for this great contribution!
However, Im having a little trouble as to why the taxes aren't calculating properly...
Sub-Total:
43.99
Free Shipping Options (Free Shipping):
$0.00
Discount Coupon:
-$40.00
13% HST (ON) #81836 3517 RT0001:
$0.26
Total:
$4.25
I've given a coupon for the following criteria:
Spend over $40, receive $40 off. Restriction of Ontario.
Spend over $40, get free shipping, which they will have to click on when the shipping options appear.
Based on that:
43.99 - 40 = 3.99 x 1.13 = 4.51.....not $4.25....
Could someone shed some light on this? I've done a few scenarios where I remove the shipping FREE option and just use the coupon version... I still have this problem...
Thank you very much! This is a great community.
Zencart V1.3.9h
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Alright... I believe that I solved my problem....
I filled out what need to be done on the coupon, but don't enable the free shipping... I had to enable that through admin>modules>shipping>free shipping option
For some reason when I enable that, the taxes are included in the calculations...Even when Order total>Discount coupon> Include shipping is set to false
Include Shipping
false
Include Tax
false
Re-calculate Tax
Credit Note
I needed the coupon to minus the discount and recalculate tax based on the remaining amount. For some reason, it was calculating based on the original amount...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
:P
I want to thank Ajeh for the coupon code. On my cart 1.39h I was having a math problem, a very smart shopper found it.
What I traced it to was a rounding problem.
On line 519 ( function get_order_total() ) the function zen_round() was being used and supplying a precision. What I found was my install was not providing any number for curreny->prec.
So I just eliminated the rounding and all is well now.
************ORIGINAL CODE*****************
$order_total = array('totalFull'=>zen_round($orderTotalFull, $prec), 'total'=>zen_round($order_total, $prec), 'tax'=>zen_round($order_total_tax, $prec), 'totalInclusive'=>zen_round($orderTotalInclusive, $prec));
********* CHANGED TO *******************
$order_total = array('totalFull'=>$orderTotalFull, $prec, 'total'=>$order_total, $prec, 'tax'=>$order_total_tax, $prec, 'totalInclusive'=>$orderTotalInclusive, $prec);
Bernie...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Just wanted to say thank you for this mod. I do have a question from a client that has this on his store. He was telling me that as customer goes through the checkout process and puts in their discount coupon code, it shows shipping cost, even though free shipping is included, but once the final transaction has been done, the shipping ends up being free. He was curious as to why it does this. I think it is confusing his customers.
Any ideas?
webmiss
-
1 Attachment(s)
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
This is a test Discount Coupon Combo for v15 to allow for:
1 Free Shipping
2 Amount Off
3 Percentage off
4 Amount Off and Free Shipping
5 Percentage Off and Free Shipping
Feedback is welcome ...
NOTE: File updated check you have DiscountCombo_v15B.zip
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
MAYDAY
I thought this worked when I tested it on 1.3.8a yesterday. Come to find out it doesn't - and my boss is down south at a convention vendor fair where we have advertised 5% and free shipping! HELP!
It's somehow miscalculating the % off with shipping and seems to be doubling the final discount, but not exactly 100% doubled.
Anyone using this on 1.3.8a?
Example:
Sub-Total: $118.97
Economy Shipping : $3.99
Discount : -$9.64
Shipping Insurance: $0.00
Signature Required: $0.00
Total: $103.18
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
This is not designed for v1.3.8 ... I have no idea if you can adapt it for that ...
I would only use the 1 of the 3 choices and not try to combine them in v1.3.8 ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
The fix is working great for me.
Thanks Ajeh for the help. The only thing I would suggest is that the discount seperate the % off and the subtraction of the shipping cost. so that the client can see that they are getting x%off plus the free shipping. I do not know how hard that would be to show, but it might be nice.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
At this time, Discount Coupons only show the total amount of the Discount ...
We will keep it in mind as an idea for the future ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
We had a problem that the taxes were not calculated properly. The shop is displaying taxes like normally in EU it is the way in consumer business, and the shipping has also sales taxes in it. Previously a discount coupon given to FREE shipping (only that, no amounts), gave the discount amount as the shipping amount minus taxes. Now after installing this "module" or "fix", it goes correctly.
PREVIOUSLY:
Shipping fee: 16.00 euro
Discount coupon: -13.01 euro (missing the 23% of tax compared for the sh
NOW CORRECTLY:
Shipping fee: 16.00 euro
Discount coupon: -16.00 euro
Just wanted to report that people who had similar problems knows that this fix helps on those cases. We have version: v1.3.9h.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Hi Ajeh,
I am new to this and have ecommerce website with zencart. I was trying to have this option Free-Shipping-and-Amount or Free-Shipping-and-Percentage, i tried to down load your link to find out how we can do, but somehow i was unable to download anything, the files in the zip, will not open, can you pls help!
Cheers
sandy
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
I just tried the download from post #25 and I am not having any errors with it ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Hi Ajeh,
I am still having problem, can you send me the link again. I need the files urgently, pls.Thanks in advance.
-
1 Attachment(s)
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
See if this link works any better for you:
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Hi Ajeh,
I installed this and it works great with everything except the local sales tax. I have the Local Sales Tax Mod installed. Your DiscountCombo takes the discount and the shipping off, also the taxes on the product for state tax are taken off but not the local 2% tax. I have tried every configuration.
I understand it wasn't designed with the local tax mod in mind but if you or anyone else could offer any suggestion it would be greatly appreciated.
Thx
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Will this work on a 1.3.8 store?
And if so, which one should I download given that it is a very old thread ;)
I need to do just a weekend run of a free order plus free shipping for a small group of folks.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
That is a very old version of Zen Cart and you should really upgrade it at least to v1.3.9h or higher ...
I would have to really look at the code if I have time to setup a v1.3.8 on a server and re-write that, most likely ... but I won't know until I can really look at it ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Can I exclude discount coupon when a product have free shipping?
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Can't you just add the products with Free Shipping to the restriction list?
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Yes, sure, but those are about 70 products. I thought there might be a quicker way to do this.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
I have downloaded the modification for 1.5 but the current version that I am on is 1.5.4. Have this modification been carried over to the latest version of the software?
Thanks in advance.
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Free Shipping for Discount Coupon for Amount or Percentage is built in to v1.5.4 ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
I am unable to get discounts to work at all. I have gone into the coupon admin
Coupon Name Coupon Amount Coupon Code Status Starts Expires Action
Groupon 15.0000%
Free Shipping BY2260 Y 04/01/2015 04/01/2016
www.silkybrazilianhair.com
when item is placed in cart there is no option to enter coupon code.
What am I missing
Coupon Name :: Groupon
Coupon Amount :: 15.0000% Free Shipping
Start Date :: 04/01/2015
End Date :: 04/01/2016
Uses per Coupon :: Unlimited
Uses per Customer :: 3
Valid Product List :: Restrictions Apply
Valid Categories List :: Restrictions Apply
Date Created :: 04/03/2015
Date Modified :: 04/03/2015
Thanks for any help!
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Are your Product Restrictions causing an issue?
What settings do you have for restrictions?
Are the Use per Customer causing an issue?
How many times have you tried this on your Test Customer Account?
So far I am not able to reproduce the issue ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Quote:
Originally Posted by
juggernautsei
I am unable to get discounts to work at all. I have gone into the coupon admin
Coupon Name Coupon Amount Coupon Code Status Starts Expires Action
Groupon 15.0000%
Free Shipping BY2260 Y 04/01/2015 04/01/2016
www.silkybrazilianhair.com
when item is placed in cart there is no option to enter coupon code.
What am I missing
Coupon Name :: Groupon
Coupon Amount :: 15.0000% Free Shipping
Start Date :: 04/01/2015
End Date :: 04/01/2016
Uses per Coupon :: Unlimited
Uses per Customer :: 3
Valid Product List :: Restrictions Apply
Valid Categories List :: Restrictions Apply
Date Created :: 04/03/2015
Date Modified :: 04/03/2015
Thanks for any help!
In Admin>Modules>Order Total, is Discount Coupon enabled?
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
What Zen Cart version are you using?
Can you post some products_id that are valid for the Discount Coupon?
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
My apologies for just getting back.
I have reconfigured the coupon to this
Coupon Name :: Groupon
Coupon Amount :: 15.0000%
Start Date :: 04/01/2015
End Date :: 04/01/2016
Uses per Coupon :: Unlimited
Uses per Customer :: 3
Valid Product List :: --none--
Valid Categories List :: --none--
Date Created :: 04/18/2015
Date Modified :: 04/18/2015
Coupon Zone Restriction: :: 0
I am using the cart 1.5.4
I checked the Admin>Module>Order_total Discount coupon is enabled.
The coupon should be applied to all 3 products.
http://www.silkybrazilianhair.com/in...roducts_id=195
Does a person has to be logged in to see the coupon button?
Thanks for the help!
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
What shipping modules are installed?
Do you have Zones on them? What are valid Zones that you ship to? I cannot get a valid shipping for either OH or VA so I cannot test a checkout ...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
I only have the free shipping and shipping options installed.
No other shipping modules are installed.
What shipping modules do I need to have installed?
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
I do not know ... how do you want to ship things?
Are you shipping everything for Free?
What settings are on FREE SHIPPING! freeshipper do you have any Zones set?
What settings are on the Free Shipping Options freeoptions? Do you have any Zones set?
What are your settings in the Configuration ... Shipping/Packaging ...?
Do your Products have Weight set on them?
Are your Products marked as Always Free Shipping?
Do you want shipping quotes from USPS? FedEx? UPS?
You are the Store Owner, so you kind of have to fill me in here ... :lookaroun
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Quote:
Originally Posted by
Ajeh
I do not know ... how do you want to ship things?
Are you shipping everything for Free?
What settings are on FREE SHIPPING! freeshipper do you have any Zones set?
What settings are on the Free Shipping Options freeoptions? Do you have any Zones set?
What are your settings in the Configuration ... Shipping/Packaging ...?
Do your Products have Weight set on them?
Are your Products marked as Always Free Shipping?
Do you want shipping quotes from USPS? FedEx? UPS?
You are the Store Owner, so you kind of have to fill me in here ... :lookaroun
Yes everything has free shipping.
Will be shipping via US Mail.
I have no Zones set?
None of the products have weight to them.
None of the products were marked Always Free Shipping.
We don't need to use shipping quotes.
I hope these answer your questions.
Thanks again...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Quote:
Originally Posted by
Ajeh
I do not know ... how do you want to ship things?
Are you shipping everything for Free?
What settings are on FREE SHIPPING! freeshipper do you have any Zones set?
What settings are on the Free Shipping Options freeoptions? Do you have any Zones set?
What are your settings in the Configuration ... Shipping/Packaging ...?
Do your Products have Weight set on them?
Are your Products marked as Always Free Shipping?
Do you want shipping quotes from USPS? FedEx? UPS?
You are the Store Owner, so you kind of have to fill me in here ... :lookaroun
Yes everything has free shipping.
Will be shipping via US Mail.
I removed the Virginia Zone from the Free Shipping Options.
None of the products have weight to them.
None of the products were marked Always Free Shipping. I marked them Always free.
We don't need to use shipping quotes.
Every product has a weight to them.
I still do not see box to enter the coupon in the cart.
I hope these answer your questions.
Thanks again...
-
Re: NEW! -- Free-Shipping-and-Amount or Free-Shipping-and-Percentage (for v1.3.9h)
Ok I finally got it to work.
All of the things in the last message I changed.
It would be nice if the coupon could be used with out having to create an account.