Discount Coupon Guide?!

Sticky

Views: 94,860

Results 181 to 199 of 199
22 Mar 2016, 11:32 PM
#181
jpda avatar

jpda

Zen Follower

Join Date:
Jun 2014
Posts:
157
Plugin Contributions:
0

Discount Coupon Guide?!

Ajeh:

If the Store Owner marks the Discount Coupon as Inactive by deleting it, then it is flagged deleted ...

If it just expires, that is not being marked as Deleted, just as not being usable ... if the Store Owner changes the expiration date, then the Discount Coupon is valid ... to this is purely a Store Owner choice to mark the Discount Coupon as Deleted ...

Once the Store Owner marks the Discount Coupon as Deleted, there is NOT an option to Un-delete the Discount Coupon by the Store Owner. This is when the database would need to be hacked ...
Hi Linda,
Because I needed to be able to reactivate discount coupons from admin, I made a few simple changes to do the job.
In ZC1.5.4 admin/coupon_admin.php around line 112:

//jpda: bof toggle coupon_active instead of setting to 'N' always
      // get current status
      $ca_sql = $db->Execute("select coupon_active from " .TABLE_COUPONS . " where coupon_id = '" . $_GET['cid'] . "'");
      $new_coupon_active = ($ca_sql->fields['coupon_active'] == 'N') ? '"Y"' : '"N"'; 

//      $messageStack->add_session('$ca_sql=' . $ca_sql->fields['coupon_active'], 'caution');
        $db->Execute("update " . TABLE_COUPONS . "
                      set coupon_active = $new_coupon_active
                      where coupon_id='".$_GET['cid']."'");
       $messageStack->add_session(($new_coupon_active == '"N"') ? SUCCESS_COUPON_DISABLED : 'Success! Discount Coupon was set to Active ...!', 'success');
// replacing
//        $db->Execute("update " . TABLE_COUPONS . "
//                      set coupon_active = 'N'
//                      where coupon_id='".$_GET['cid']."'");
//        $messageStack->add_session(SUCCESS_COUPON_DISABLED, 'success');
// replacing
//jpda: eof toggle coupon_active instead of setting to 'N' always

Now the delete button will toggle the status. Need to make some changes to the button texts and add some language defines etc., but it works.
Questions:
Is this acceptable?
Could the code at $ca_sql be done easier?

On the side, not really related to the subject, the selection character '' to display all discount coupons does not work, I replaced it by 'A'. The '' is still present in the ZC1.5.5 version.

Background:
A client of mine is using the Autoresponder+ mod, which sends emails to customers, asking them to write a review. The email contains an active discount coupon. Thus, the customer might use the coupon and forget all about the review.
I change the mod to send an inactive discount coupon, my client needs to be able to reactivate the coupon when the review arrives.

Thanks in advance,

jpda

22 Mar 2016, 11:38 PM
#182
ajeh avatar

ajeh

Oba-san

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

Re: Discount Coupon Guide?!

jpda:

On the side, not really related to the subject, the selection character '' to display all discount coupons does not work, I replaced it by 'A'. The '' is still present in the ZC1.5.5 version.

The code has been updated in v1.6, for the ALL Discount Coupons ...

I have not had time to checkout your code changes ...

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!

22 Mar 2016, 11:51 PM
#183
jpda avatar

jpda

Zen Follower

Join Date:
Jun 2014
Posts:
157
Plugin Contributions:
0

Re: Discount Coupon Guide?!

Thank you for replying quickly! :-)

jpda

27 Dec 2016, 8:49 PM
#184
seattleannie avatar

seattleannie

Zen Follower

Join Date:
Oct 2005
Posts:
151
Plugin Contributions:
0

Re: Discount Coupon Guide?!

Is there a way to set up a discount coupon that does NOT apply the discount to the shipping cost of the order? In other words, a discount that is applied to the items in the cart - the subtotal amount - before shipping is added?

21 Mar 2017, 5:53 PM
#185
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: Discount Coupon Guide?!

Quick question. I'm using ZC 1.5.4x. I've created a discount coupon which I am printing on business cards to hand out to potentially new customers. I want the discount code to only work for first-time purchasers! I don't care if they already have an account, but they must not have had any previous purchases.

Is there a way to do this?

Thanks :smile:

Experience is what you get when you don’t get what you want…

24 Nov 2017, 9:36 PM
#186
debbiew4960 avatar

debbiew4960

New Zenner

Join Date:
Mar 2009
Location:
Canada
Posts:
6
Plugin Contributions:
0

Re: Discount Coupon Guide?!

Hi Everyone :)

I've just made an adjustment to my Discount Coupons and see that there is no option to extend them past Dec 31, 2018. These are an ongoing thing for me and so I would like them to be available for many years to come. Is there an easy way to extend them past 2018?

I'm using V1.5.4.

Thanks in advance :blink:
Debbie

24 Nov 2017, 10:55 PM
#187
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Discount Coupon Guide?!

Debbiew4960:

Hi Everyone :)

I've just made an adjustment to my Discount Coupons and see that there is no option to extend them past Dec 31, 2018. These are an ongoing thing for me and so I would like them to be available for many years to come. Is there an easy way to extend them past 2018?

I'm using V1.5.4.

Thanks in advance :blink:
Debbie
Known bug in ZC 1.5.4 and earlier, corrected in ZC 1.5.5. See this GitHub commit by DrByte that corrects the issue.

27 Nov 2017, 5:06 PM
#188
debbiew4960 avatar

debbiew4960

New Zenner

Join Date:
Mar 2009
Location:
Canada
Posts:
6
Plugin Contributions:
0

Re: Discount Coupon Guide?!

Thank you so much lat9! I'm on it :blush:

17 Dec 2021, 2:17 PM
#189
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Discount Coupon Guide?!

I'm currently chasing a zc157c issue with ot_coupon on a site that uses multiple tax rates and has the ot_coupon settings Include tax = 'true' and Re-calculate Tax set to 'None'.

That leads me to the question: How are those ot_coupon tax settings *supposed *to work? What is the expected difference using the above settings and when Re-calculate Tax is set to 'Standard'?

17 Dec 2021, 3:51 PM
#190
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,970
Plugin Contributions:
8

Re: Discount Coupon Guide?!

lat9:

I'm currently chasing a zc157c issue with ot_coupon on a site that uses multiple tax rates and has the ot_coupon settings Include tax = 'true' and Re-calculate Tax set to 'None'.

That leads me to the question: How are those ot_coupon tax settings *supposed *to work? What is the expected difference using the above settings and when Re-calculate Tax is set to 'Standard'?

i hate coupons.

looking at this outstanding PR here:

https://github.com/zencart/zencart/pull/4324

i wanted the coupon amount to be included into the order info array.

this amount would then be used in any of your various ot tax modules to reduce said tax by that rate * the coupon amount.

i am not sure if that helps with your question, as i am not in a position to answer how it is 'supposed to work' nor what are the 'expected differences'.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

17 Dec 2021, 4:51 PM
#191
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,725
Plugin Contributions:
56

Re: Discount Coupon Guide?!

ReCalculate Tax = None vs Standard

For Standard, it goes through the products list and for taxable products, computes the updated tax based on the discount provided by the coupon.
Finally, the tax line(s) are updated based on the new computation.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

17 Dec 2021, 5:16 PM
#192
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Discount Coupon Guide?!

carlwhat:

i hate coupons.

looking at this outstanding PR here:

https://github.com/zencart/zencart/pull/4324

i wanted the coupon amount to be included into the order info array.

this amount would then be used in any of your various ot tax modules to reduce said tax by that rate * the coupon amount.

i am not sure if that helps with your question, as i am not in a position to answer how it is 'supposed to work' nor what are the 'expected differences'.

best.
They're not my favorite, either.
swguy:

ReCalculate Tax = None vs Standard

For Standard, it goes through the products list and for taxable products, computes the updated tax based on the discount provided by the coupon.
Finally, the tax line(s) are updated based on the new computation.
I got that, I'm looking for the processing difference between the "None" and "Standard" settings since "None" is how the client's got their coupons currently set up.

I'll note that the coupon calculations are off using the "Standard" setting as well when a site's products have multiple, additive tax rates that apply.

8 Jan 2022, 3:14 PM
#193
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Discount Coupon Guide?!

Here's another "How is it supposed to work?" question:

The base ot_coupon configuration contains a setting: Include shipping (true or false). Coupons can (since zc152) be defined to include free shipping and I'm wondering if this setting was created for pre-zc152 coupons.

Does anyone have a clue as to what processing is expected when "Include shipping" is set to true?

8 Jan 2022, 7:19 PM
#194
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,725
Plugin Contributions:
56

Re: Discount Coupon Guide?!

Include shipping just means the amount that a percent off coupon will apply to is grossed up by the shipping cost. (Without this, it's just the cost of all items which are valid for this coupon.)

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

8 Jan 2022, 7:44 PM
#195
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Discount Coupon Guide?!

swguy:

Include shipping just means the amount that a percent off coupon will apply to is grossed up by the shipping cost. (Without this, it's just the cost of all items which are valid for this coupon.)
I saw that, but what's the setting's "business" purpose? You can create individual coupons that do/don't include shipping.

8 Jan 2022, 8:45 PM
#196
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,725
Plugin Contributions:
56

Re: Discount Coupon Guide?!

I think it's vestigial code. :)

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

9 Jan 2022, 12:49 PM
#197
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Discount Coupon Guide?!

swguy:

I think it's vestigial code. :)
If that's the case, shouldn't it be removed (before it becomes cancerous)?

9 Jan 2022, 1:45 PM
#198
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,725
Plugin Contributions:
56

Re: Discount Coupon Guide?!

I think it still works and serves a purpose - you are right, there are now other ways of doing this but the old way also works.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

9 Jan 2022, 2:15 PM
#199
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Discount Coupon Guide?!

swguy:

I think it still works and serves a purpose - you are right, there are now other ways of doing this but the old way also works.
I'm questioning 'works' ...