If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Payment Modules / Invoice Payment Method V 23Dec2018, Installation issue

Invoice Payment Method V 23Dec2018, Installation issue

Started by marton_1 on 7 Jan 2021, 9:31 PM · Views: 3,538

Results 1 to 15 of 15
7 Jan 2021, 9:31 PM
#1
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Post #1 by marton_1

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--

7 Jan 2021, 9:35 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #2 by dbltoe

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.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

7 Jan 2021, 10:35 PM
#3
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Post #3 by 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.

7 Jan 2021, 10:54 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #4 by dbltoe

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.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

7 Jan 2021, 11:29 PM
#5
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Post #5 by marton_1

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)
    {
        [B]return $this->currencies[$code]['value'];[/B]
    }

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

Thanks for your help

8 Jan 2021, 12:00 AM
#7
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Post #7 by marton_1

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.

8 Jan 2021, 12:54 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #8 by drbyte

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

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Jan 2021, 11:58 AM
#9
lat9 avatar

lat9

Administrator

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

Post #9 by lat9

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?
8 Jan 2021, 1:48 PM
#10
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Post #10 by marton_1

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.

8 Jan 2021, 3:05 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #11 by drbyte

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Jan 2021, 10:33 PM
#12
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Post #12 by marton_1

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, 3:59 PM
#13
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Post #13 by marton_1

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, 10:10 PM
#14
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #14 by schoolboy

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?

20 years a Zencart User

23 Apr 2021, 11:12 PM
#15
swguy avatar

swguy

Administrator

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

Post #15 by swguy

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.

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.