Forums / Addon Payment Modules / Invoice Payment Method V 23Dec2018, Installation issue

Invoice Payment Method V 23Dec2018, Installation issue

Results 1 to 15 of 15
07 Jan 2021, 21:31
#1
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Posts:
568
Plugin Contributions:
0

Invoice Payment Method V 23Dec2018, Installation issue

ZC157, responsive classic.

I have been successfully using this plugin for some years.
Now my new 157b site is running commercially.

I installed the Invoice Payment plugin but "invoice" did not show up as a payment method.

I have the invoice customer group set up with id 2 and a 2% discount.
I tried setting the customers_group_pricing=2 in the db as default then the "invoice" did OK show up as a payment method.
The only problem is all payment methods are now giving 2% discounts.

My web site is https://www.simmar.ch, they are changing the servers now so please don't look for a couple of hours

The configuration looks like this
Group Pricing
ID Group Name % Discount
2 Invoice 2.00

Group Discount

This module is installed
true

Sort Order
290

Include Shipping
false

Include Tax
false

Re-calculate Tax
Standard

Tax Class
--none--
07 Jan 2021, 21:35
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Posts:
9,707
Plugin Contributions:
6

Re: Invoice Payment Method V 23Dec2018, Installation issue

If you have not already done so, go to Modules >> Plugin Manager and install the Display Logs Plugin. There's bound to be a log file out there that can provide you with more information.
07 Jan 2021, 22:35
#3
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Posts:
568
Plugin Contributions:
0

Re: Invoice Payment Method V 23Dec2018, Installation issue

Good idea, installed the Display Logs Plugin

I reset customers_group_pricing=0 in my xampp test site.

No error logs, some warnings.
I got one warning that I had not set up the "recalculate tax" correctly in modules/OT/GroupPricing that I could correct; I have no sales tax.
Fixing that did not cause "invoice" to be displayed as a payment option.

Three other "undefined index" warnings I do not understand
[07-Jan-2021 23:04:45 Europe/Berlin] PHP Notice:  Undefined index: spider_flag in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\observers\class.products_viewed_counter.php on line 37
[07-Jan-2021 23:04:45 Europe/Berlin] PHP Notice:  Undefined index: USD in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\currencies.php on line 142
[07-Jan-2021 23:04:45 Europe/Berlin] PHP Notice:  Undefined index: USD in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\currencies.php on line 151


I only have one currency set up; Swiss Franc CHF.

And a funny warning
Use of undefined constant DISPLAY_LOGS_MESSAGE_LOGS_PRESENT

Funny because the developer's tool kit does not find this constant but it must be in there somewhere.
07 Jan 2021, 22:54
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Posts:
9,707
Plugin Contributions:
6

Re: Invoice Payment Method V 23Dec2018, Installation issue

This is why we have the posting tips. Is this an upgrade or did you rebuild your site on the 1.5.7b version? The unfound constant may be a holdover from a previous version.

As to the USD error.. This seems to indicate that USD is still set as the default currency. Lines 142 and 151 of the currencies.php file are driven by what is set as the DEFAULT_CURRENCY.
07 Jan 2021, 23:29
#5
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Posts:
568
Plugin Contributions:
0

Re: Invoice Payment Method V 23Dec2018, Installation issue

I made a new rebuild of the 1.5.7.

I doubt the unfound constant is a holdover from a previous version since it only appeared after I turned on the Display Logs Plugin and it seems to be related to that plugin.

I have the currency set here as below, do you know if there is somewhere else to set it?
Currencies
Currency Code Value Last Updated Action
Swiss Franc (default) CHF 1.00000000 05/02/2013 15:38:51

The code it is complaining about is below in bold.
 function get_value($code)
    {
        return $this->currencies[$code]['value'];
    }

    /**
     * @param string $code currency code
     * @return int
     */
    function get_decimal_places($code)
    {
        return $this->currencies[$code]['decimal_places'];
    }


Thanks for your help
08 Jan 2021, 00:00
#7
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Posts:
568
Plugin Contributions:
0

Re: Invoice Payment Method V 23Dec2018, Installation issue

Great thanks.

My site is in two languages, English and German.

Both languages use the Swiss Franc currency.

If I understand the instructions correctly then I have to click both true and false ??

It is 1 am here, I will have to review this again when I am awake.

Thanks again and good night.
08 Jan 2021, 00:54
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Invoice Payment Method V 23Dec2018, Installation issue

marton_1:

PHP Notice: Undefined index: spider_flag in \Zencart157b\catalog\includes\classes\observers\class.products_viewed_counter.php on line 37

This is entirely unrelated to the module you're posting about.

To fix, try this version of the file mentioned: https://github.com/zencart/zencart/blob/v158/includes/classes/observers/class.products_viewed_counter.php
08 Jan 2021, 11:58
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Posts:
13,980
Plugin Contributions:
46

Re: Invoice Payment Method V 23Dec2018, Installation issue

marton_1:

Good idea, installed the Display Logs Plugin

I reset customers_group_pricing=0 in my xampp test site.

No error logs, some warnings.
I got one warning that I had not set up the "recalculate tax" correctly in modules/OT/GroupPricing that I could correct; I have no sales tax.
Fixing that did not cause "invoice" to be displayed as a payment option.

Three other "undefined index" warnings I do not understand
[07-Jan-2021 23:04:45 Europe/Berlin] PHP Notice:  Undefined index: spider_flag in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\observers\class.products_viewed_counter.php on line 37
[07-Jan-2021 23:04:45 Europe/Berlin] PHP Notice:  Undefined index: USD in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\currencies.php on line 142
[07-Jan-2021 23:04:45 Europe/Berlin] PHP Notice:  Undefined index: USD in C:\xampp73a\htdocs\Zencart157b\catalog\includes\classes\currencies.php on line 151


I only have one currency set up; Swiss Franc CHF.

And a funny warning
Use of undefined constant DISPLAY_LOGS_MESSAGE_LOGS_PRESENT

Funny because the developer's tool kit does not find this constant but it must be in there somewhere.

Hmm, it sounds like the Developer's Tool Kit isn't considering the /zc_plugins sub-directory during its search. When you receive that warning, is the store running in German instead of English?
08 Jan 2021, 13:48
#10
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Posts:
568
Plugin Contributions:
0

Re: Invoice Payment Method V 23Dec2018, Installation issue

As mentioned, I ran the tests on my xampp test site.

Now my provider has finished the server hardware upgrade I ran the tests on my commercial site and got no more "undefined index" warnings.

I still have my core problems that all payment methods have a 2% discount and I have to set the table column group pricing to the invoice group index 2.
08 Jan 2021, 15:05
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Invoice Payment Method V 23Dec2018, Installation issue

marton_1:


I still have my core problems that all payment methods have a 2% discount and I have to set the table column group pricing to the invoice group index 2.


Something to explore: where is that 2% coming from?
- is it from the group-pricing settings? Change your percentages in there and check what the effect is
- is it actually a currency-exchange difference?

My point: there's no value exploring in the wrong direction.
08 Jan 2021, 22:33
#12
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Posts:
568
Plugin Contributions:
0

Re: Invoice Payment Method V 23Dec2018, Installation issue

Seems you are correct the Developer's Tool Kit isn't considering the /zc_plugins sub-directory during its search, I added a language/german folder and fixed the problem.
25 Jan 2021, 15:59
#13
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Posts:
568
Plugin Contributions:
0

Re: Invoice Payment Method V 23Dec2018, Installation issue

In another thread Dr Byte wrote "This works fine with v1.5.7: Offsite Payment
It offers the payment option for everyone, based on Geo Zone, not based on Group Pricing. Otherwise does basically the same thing.
Depends on your needs."

It is very easy and simple to install so I am now using Offsite Payment and have abandoned Invoice Payment Method V 23Dec2018, thanks.
23 Apr 2021, 22:10
#14
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: Invoice Payment Method V 23Dec2018, Installation issue

I need the "Invoicing" (offsite payment) facility applicable only to certain customers (not a "generally available" payment option open to anyone). SWGUY's invoice mod permits categorisation of approved customers by allowing the creation of a discount pricing group, and configuring any given customer to be part of that group. This makes the "invoice" option visible and usable only by "approved" customers when they checkout.
Can this "customer selective" feature be configured in the offsite payment module?
23 Apr 2021, 23:12
#15
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Invoice Payment Method V 23Dec2018, Installation issue

Based on this:

I have the invoice customer group set up with id 2 and a 2% discount.
I tried setting the customers_group_pricing=2 in the db as default then the "invoice" did OK show up as a payment method.
The only problem is all payment methods are now giving 2% discounts.


It sounds like you need to reset all customers.customers_group_pricing to 0, then set this field SELECTIVELY on the people you want to give the 2% discount to.
And if you want some customers to be able to use invoice with no discount, create customer group 3 invoice_nodiscount with discount = 0, and put those customers in group 3.