Yes it will.
Printable View
Yes it will.
I've run into a problem with this plug in and the Edit Orders plug in. Making a change in Edit Orders results in a blank screen when the change is saved. The change takes effect, but the screen refresh isn't happening. Here's the error I'm getting. Can this be fixed? I really need both modules.
[26-Apr-2022 14:07:51 UTC] Request URI: /Zentest-CHAR-jasPe/index.php?cmd=edit_orders&page=1&oID=9989&action=update_order, IP address: 67.44.192.73
--> PHP Fatal error: Uncaught Error: Call to undefined function mailchimp_check() in /home/newnatur/zentest/includes/modules/order_total/ot_newsletter_discount.php:209
Stack trace:
#0 /home/newnatur/zentest/includes/modules/order_total/ot_newsletter_discount.php(44): ot_newsletter_discount->is_subscriber()
#1 /home/newnatur/zentest/includes/classes/order_total.php(65): ot_newsletter_discount->process()
#2 /home/newnatur/zentest/Zentest-CHAR-jasPe/includes/functions/extra_functions/edit_orders_functions.php(1431): order_total->process()
#3 /home/newnatur/zentest/Zentest-CHAR-jasPe/includes/modules/edit_orders/eo_update_order_action_processing.php(453): eo_update_database_order_totals(9989)
#4 /home/newnatur/zentest/Zentest-CHAR-jasPe/edit_orders.php(84): require('/home/newnatur/...')
#5 /home/newnatur/zentest/Zentest-CHAR-jasPe/index.php(11): require('/home/newnatur/...')
#6 {main}
thrown in /home/newnatur/zentest/includes/modules/order_total/ot_newsletter_discount.php on line 209.
You have to pull in the storefront functions files in your admin.
Create a file called admin/includes/functions/extra_functions/mailchimp.php that contains:
<?php
require DIR_FS_CATALOG . DIR_WS_FUNCTIONS . '/extra_functions/mailchimp.php';
require DIR_FS_CATALOG . DIR_WS_FUNCTIONS . '/extra_functions/mailchimp_discount_functions.php';
Thanks, that appears to have taken care of it. I added the closing ?> also
Where are the constants initially defined that are used in the Newsletter Discount (MODULE_ORDER_TOTAL_NEWSLETTER_DISCOUNT_INC_SHIPPING et al)? I have this installed in my 1.5.7d live store and have no errors there, but in my test install (also 1.5.7d, but a newer PHP version), I'm getting an undefined constant warning for each of them where they're called in \ADMIN\modules.php. I've looked in my live installation but don't see them defined anywhere before they're used.
I do see that these are named in a class constructor in /includes/modules/order_table/ot_newsletter_discount.php. But it was my understanding that you could not instantiate a constant that way (or at least that one should not do so). Or is this another of those PHP-version-dependent things? My test install is running 7.4.33 now, and I can't back down to a lower level without also going back to an earlier version of wamp, which I'm reluctant to do.
This is the warning I'm getting (repeated for each of the constants):
[10-May-2023 17:23:56 America/New_York] Request URI: /newnaturals/ADMIN/index.php?cmd=modules&set=ordertotal, IP address: 127.0.0.1
#1 ot_newsletter_discount->__construct() called at [C:\wamp64\www\newnaturals\ADMIN\modules.php:204]
#2 require(C:\wamp64\www\newnaturals\ADMIN\modules.php) called at [C:\wamp64\www\newnaturals\ADMIN\index.php:11]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_NEWSLETTER_DISCOUNT_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_NEWSLETTER_DISCOUNT_SORT_ORDER' (this will throw an Error in a future version of PHP) in C:\wamp64\www\newnaturals\includes\modules\order_total\ot_newsletter_discount.ph p on line 20.
I thought I had updated this module but I guess not. Grab the latest from plugins; should fix this issue.