Forums / All Other Contributions/Addons / Newsletter Subscriber Discount

Newsletter Subscriber Discount

Views: 36,016

Results 21 to 40 of 120
10 Nov 2008, 11:27 PM
#21
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Newsletter Subscriber Discount

I just installed Mailchimp's Ecommerce 360 plugin into my Zen Cart install and I suspect that there might be a conflict with the Newsletter Discount plugin.

After I installed the Mailchimp plugin, I didn't get any errors reported when I started up my store. What did happen, though, was that the Checkout page failed to completed load when I tried to Checkout. It stopped loading right when it was computing the price (and I assume the discounts). As soon as I removed the Mailchimp 360 plugin files all was well again.

I have sent in a report of this to the MailChimp customer service, but I thought you might like to know that this was my experience.

(And if I had to choose, I'd choose your Newsletter Discount -- thank you for the lovely plugin. :smile:)

Here is the link to their plugin:

http://www.mailchimp.com/plugins/ecomm360.phtml

Cheers,

Alex

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

11 Nov 2008, 3:13 AM
#22
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

Investigating. Will respond ASAP.

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.

11 Nov 2008, 4:53 AM
#23
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

I'm also right now in email exchange with Mailchimp's API department. I'll let you know if anything comes of that. But part of the issue might be the MCAPI.class.php file -- they place it directly in the /includes folder (not in /includes/classes like Newsletter Discount does), thus leaving two MCAPI.class.php files...

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

11 Nov 2008, 6:59 AM
#24
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

That's the problem. I thought they fixed that.

The MailChimp guys have their own support thread for MailChimp 360 here:

http://www.zen-cart.com/forum/showthread.php?t=112837

I have posted some remarks in that thread.

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.

12 Nov 2008, 9:03 AM
#25
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

Their new version seems to work -- or at least no longer conflicts with Newsletter Discount -- I installed it and am no longer getting the crashes. So, thank you for getting them on the right track. :smile:

But in testing it, I found something that I had not noticed before. Right now, I am using Newsletter Discount to make certain of my downloadable comics free to my Mailchimp subscribers, thus I have set up one category of products (category "4") to give 100% discount to subscribers.

When I log in as with a subscriber email, everything works great. If I checkout with something from category 4, the plugin subtracts 100% of the product price -- I can see the discount during checkout -- and I can download the comic for free (it skips my one payment solution altogether -- PayPal --and just takes me to Checkout Success for download.)

But I just now tested a product from category 4 with a non-subscriber email. If I checkout with a product that's in category 4, it doesn't show me the discount during checkout -- which is good -- but it still skips my PayPal screen and let's me download the comic without paying! And the order shows up as "cc free" in my orders list -- the same code Newsletter Discount uses for my discounted subscribers! (Both use "cc free", even though I don't have credit card as an activated module, only PayPal. When I uninstalled the credit card module, it now shows "moneyorder free" for those transactions.)

When I change the Newsletter Discount to 50%, this no longer happens. Non-subscribers who checkout with downloadable comics from category 4 are taken to the PayPal screen for payment before they can download comics from this category.

So there seems to be some kind of problem with using a discount of 100%. Did I set things up wrong? Is there a way for this to be fixed?

Please let me know - and thank very much you for the great plug-in!

Alex

P.S. In case it helps, this is the code I used to tell Newsletter Discount to only apply to category 4:

  function exclude_category($category) {
        switch($category) {
           case 4:
                return false;
        }
        return true;
    }

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

12 Nov 2008, 10:18 PM
#26
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

Have not heard of this problem.

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.

12 Nov 2008, 11:33 PM
#27
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

swguy,

Thank you for your reply. I'm a little unclear as to how to proceed, however.

Should your plugin work in the manner I need it to? That is, should I be able to use a 100% discount with a specific category and have that 100% discount only be applied to newsletter subscribers and not everyone?

If so, are you going to investigate this further?

This is obviously important to me as the discount needs to only apply to newsletter subscribers. Your help in fixing this problem would be greatly appreciated. :smile:

Thank you for your excellent work on this plugin and for your support in helping me troubleshoot this. :smile:

Alex

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

12 Nov 2008, 11:57 PM
#28
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

alexwoolfson:

Should your plugin work in the manner I need it to? That is, should I be able to use a 100% discount with a specific category and have that 100% discount only be applied to newsletter subscribers and not everyone?

Yes. Please double check your settings under admin->modules->order totals->newsletter discount to be sure you're using mailchimp. Then double check the email address that you think is not subscribed and make sure it's not.

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.

13 Nov 2008, 4:13 AM
#29
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

OK. I double-checked those things.

Under admin->modules->order totals->newsletter discount, my newsletter type is listed as "mailchimp" and I can see that my mailchimp userid and password are filled in correctly.

When I log in with an email address that is on my list and I checkout with one of my downloadable products from category "4", I see the Newsletter Discount line item in the order total subtracting the exact dollar amount from the order total. As the order total then becomes "$0.00", I proceed to Checkout Success without going to PayPal and without having to pay and can download the comic.

When I log in using an email that I have confirmed is NOT on my list, and I checkout with the same downloadable product from category "4", I do NOT see any Newsletter Discount from the order total. I see the full charge for my product.

However, if I proceed through Checkout, I am again taken to the Checkout Success page WITHOUT being sent to PayPal and WITHOUT having to pay.

In both cases, the orders show up as "moneyorder free" in my orders screen.

(They were showing up as "cc free" but I uninstalled the credit card module in trying to troubleshoot this.)

Interestingly, if I change my Discount Amount from "100" to "50", then I am sent to PayPal for payment regardless of which email I use (in the case of the Subscriber Email, I receive the expected 50% discount and in the case of the Non-Subscriber Email, I receive no discount.) Thus, it seems that somehow it is the entering of "100" that is causing the problem.

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

13 Nov 2008, 6:55 AM
#30
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

What flavor of PayPal are you using?

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.

13 Nov 2008, 6:57 AM
#31
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

I am using "PayPal IPN - Website Payments Standard".

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

13 Nov 2008, 7:14 AM
#32
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

Version of Zen Cart? Have you verified that your copy of ipn_main_handler.php is current and has not been modified?

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.

13 Nov 2008, 7:32 AM
#33
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

I am running

Zen Cart 1.3.8a
Database Patch Level: 1.3.8
PHP Version 5.2.6

My copy of ipn_main_handler.php is dated 11/27/07 (long before my fresh install of this September) -- I haven't touched or altered it in any way.

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

13 Nov 2008, 7:54 AM
#34
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

Somehow the order object that's created in ipn_main_handler.php does not contain the correct customer email address, or this address is not getting passed to the order total process function. Don't know why.

You could try printing session variables and the order object after it's instantiated using ipn_debug_email to see what you have if you want to track this down.

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.

13 Nov 2008, 8:07 AM
#35
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

If you think we might be able to get this to work, then I am happy to work with you to track this down. :smile:

You could try printing session variables and the order object after it's instantiated using ipn_debug_email to see what you have if you want to track this down.

I'm afraid that I've never done that before. Is it as simple as me turning the debug mode to "Log and Email" in the PayPal module? After doing that, would I just try checking out with one of these 100% discount products and then post the results of the debug file here? (Are there any security concerns -- meaning is there anything from the debug logs I SHOULDN'T post here?)

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

13 Nov 2008, 8:50 AM
#36
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

OK, I went ahead and turned on the Log and Email debug mode. Here is what happened:

When I used a non-subscriber email account and checked out with an item that would get 100% discount for a subscriber, it skipped PayPal, just like before, even though it did not indicate any discount. More importantly, I didn't get a debug email. It was like PayPal was bypassed altogether when I set my discount to 100%.

Just to check it, though, I then changed the discount amount to 50% while still logged in with this non-subscriber email. I then checked out with the same product. Just like the last time I did this, this time I was taken to PayPal AND a debug email was immediately sent to me.

So the debug feature seems to be working, but it's as if PayPal is bypassed altogether when the Discount Amount is set to 100, so I'm not even getting debug reports in this case.

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

13 Nov 2008, 12:12 PM
#37
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

In the file includes/modules/order_total/ot_newsletter_discount.php find

function calculate_deductions() {
global $db, $order, $currencies;

right underneath this, add

   if (!$this->is_subscriber()) {
         return;
   }

and retest with 100%.

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.

13 Nov 2008, 7:23 PM
#38
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

:clap: That seems to have done it. I tested with both a subscriber email and a non-subscriber email, with both category 4 products and non-category 4 products and the behavior is exactly as it should be.

I'll keep testing over the next few days to be sure, but everything seems to work now.

Thank you for your help! :smile:

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

13 Nov 2008, 7:35 PM
#39
alexwoolfson avatar

alexwoolfson

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Newsletter Subscriber Discount

Well... it's not like I spoke too soon.... the most important thing is working, but I just looked over the order confirmation that is sent to the customer who just had a successful checkout with a free (100% discount) product and under payment method it is says:

Payment Method
Check/Money Order
Please make your check or money order payable to:

the Store Owner/Website Name

Mail your payment to:
The Yaoi 911™ Store
2370 Market Street
Suite 339
San Francisco, CA
94114
U.S.A.
(206) 202-3243

Your order will not ship until we receive payment.

It seems like it is using Money Order for 100% discounts (and probably would be using Credit Card if I had not uninstalled that module.) It's not the end of the world I suppose but it would probably be a little confusing for the customer. :(

This seems like a much harder fix, but is there a way for Newsletter Discount to use The Zen Cart FREE CHARGE CARD for 100% discount transactions? I think if it did that it would create the order confirmations you would expect in such cases...

Zen Cart 1.3.8a - Database Patch Level: 1.3.8 - PHP Version 5.2.6

13 Nov 2008, 8:56 PM
#40
swguy avatar

swguy

Administrator

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

Re: Newsletter Subscriber Discount

The question of which payment method to use is made by Zen Cart, not the Newsletter Discount.

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.