Zen Cart Logo
Forums / Addon Order Total Modules / Quantity Discounts for 1.3

Quantity Discounts for 1.3

Views: 226,324

Results 841 to 847 of 847
11 Mar 2021, 12:22 PM
#841
philibel avatar

philibel

Zen Follower

Join Date:
Mar 2008
Location:
Belgium
Posts:
120
Plugin Contributions:
3

Quantity Discounts for 1.3

Hi Scott,
As a loyal user of quantity discounts I want give you a heads-up about a warning I found in the logs.

[08-Mar-2021 09:03:55 Europe/Brussels] Request URI: /index.php?main_page=checkout_process, IP address: *.*.*.*
#1  ot_quantity_discount->__construct() called at [*/www/includes/classes/order_total.php:51]
#2  order_total->__construct() called at [*/www/includes/modules/checkout_process.php:60]
#3  require(*/www/includes/modules/checkout_process.php) called at [*/www/includes/modules/pages/checkout_process/header_php.php:14]
#4  require(*/www/includes/modules/pages/checkout_process/header_php.php) called at [*/www/index.php:35]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_COUNTING_METHOD - assumed 'MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_COUNTING_METHOD' (this will throw an Error in a future version of PHP) in */www/includes/modules/order_total/ot_quantity_discount.php on line 117.

I'm using v1.5.7c on PHP 7.4.15 and presume it's neglectable for now because "future versions" must be PHP 8.x.x
Also the sale went along just fine.

Is there a "quick fix" for it or does it require "thorough" editing?

11 Mar 2021, 1:10 PM
#842
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

a) Go to the Plugins area and be sure you have the latest copy of Quantity Discounts.
b) Go to Admin > Modules > Order Total > Quantity Discounts, note your settings, then do a REMOVE and INSTALL of the module.

12 Mar 2021, 8:06 PM
#843
philibel avatar

philibel

Zen Follower

Join Date:
Mar 2008
Location:
Belgium
Posts:
120
Plugin Contributions:
3

Re: Quantity Discounts for 1.3

The same admin warnings were given when I went to order total page, select the module, remove and confirmed remove.
It's the most recent version: 1.14

In the original file the troubled line in question is on 91
Extra lines because I did edit in some extra custom discounts in line 51

Once reinstalled without changing any files, no more warnings. I guess this falls under: "Did you try rebooting it?"

Thanks!

12 Mar 2021, 8:19 PM
#844
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

You updated the module (presumably a while back) but didn't do a REMOVE/INSTALL - which was required because there were new config values added.
That's what caused the warning -that's why I wanted you to do a remove and reinstall.

I'm working on some infrastructure for the modules script to handle things like this better so a remove/reinstall isn't required.

12 Mar 2021, 11:42 PM
#845
philibel avatar

philibel

Zen Follower

Join Date:
Mar 2008
Location:
Belgium
Posts:
120
Plugin Contributions:
3

Re: Quantity Discounts for 1.3

I updated Zen Cart from v1.5.3 starting last January. I missed the requirement of REMOVE/INSTALL going from v1.12.1 to v1.14 Learned something extra again.

13 Mar 2021, 12:10 AM
#846
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

Not Zen Cart - Quantity Discounts. But no worries - soon this step will be done automatically, and now you know what to do.

12 Feb 2022, 5:43 PM
#847
swguy avatar

swguy

Administrator

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

Re: Quantity Discounts for 1.3

Updated for PHP8.