PaymentFilter icon indicating copy to clipboard operation
PaymentFilter copied to clipboard

Not all Payment Methods are listed under Customer Groups

Open Meistermickl opened this issue 10 years ago • 14 comments

Hi, I am using this extension very long now and it worked well. But I needed to Upgrade my Store to Magento 1.9.1 and depending on this I needed the newer Payment Extensions of different Payment Provider. No I have the Issue that not all Payments are listed at the Customer Groups, which means I cannot use all Payment Methods right now if the FilterExtension is enabled. I tried to cheat at the DB and add the missing Payment Method manually but there is a small ID for each Payment Method and I was not able to find out this ID at for this missing Payment Method.

I am talking about the Klarna Invoice Payment Method:

Name in Magento of this Payment is: vaimo_klarna_invoice

Extension of Klarna is called: klarnapayments (latest Version)

Meistermickl avatar Dec 11 '15 13:12 Meistermickl

Could you give the following fix a try:

change /Helper/Data.php on line 217

if ($methodConfig['active']) {

to be

if ((isset($methodConfig['active']))&&($methodConfig['active'])) {

Does it work?

riconeitzel avatar Dec 11 '15 13:12 riconeitzel

Thanks for the follow up!

I went to the suggest file/code area but didn't find any such lines to change. from 195 to 225, I have:

/**
 * Load the product_payment_methods attribute on all quote item products.
 *
 * @param Mage_Catalog_Model_Product $productModel
 * @return RicoNeitzel_PaymentFilter_Helper_Data
 */
public function loadProductPaymentMethodsOnCartItemProducts(Mage_Catalog_Model_Product $productModel = null)
{
    if (!isset($productModel)) {
        $productModel = Mage::getModel('catalog/product');
    }

    $attribute = $productModel->getResource()->getAttribute('product_payment_methods');
    $select = $productModel->getResource()->getReadConnection()->select()
        ->from($attribute->getBackendTable(), array('entity_id', 'value'))
        ->where('attribute_id=?', $attribute->getId())
        ->where('entity_type_id=?', $productModel->getResource()->getTypeId());
    $values = $productModel->getResource()->getReadConnection()->fetchPairs($select);
    foreach (Mage::getSingleton('checkout/cart')->getQuote()->getAllItems() as $item) {
        $product = $item->getProduct();
        if (isset($values[$product->getId()])) {
            $value = explode(',', $values[$product->getId()]);
        } else {
            $value = array();
        }
        $product->setProductPaymentMethods($value);
    }

    return $this;
}
}

I believe I should have the latest version, so am I missing something?

ne0nlight avatar Dec 11 '15 15:12 ne0nlight

Hi,

thanks for letting me know … I'll have to look into it later.

Best, Rico

riconeitzel avatar Dec 11 '15 15:12 riconeitzel

Great, thank you!

ne0nlight avatar Dec 11 '15 15:12 ne0nlight

Thank you, but my data.php dont have 217 Lines, just 206 Lines, but anyway I looked for $methodConfig and was not able to find it. I checked the Version here of the data.php and this File does contain as well no $methodConfig (but the File have 226 Lines :) ).

Via Magento Connect I just got Version 0.1.6beta (beta) installed and no updates are showing up, so I believe you have a newer, different Version at your Lap. Thx Michael

Meistermickl avatar Dec 11 '15 16:12 Meistermickl

Rico, are there any news on this? I tried to play around a littlebit with the data.php but was not able to solve the Issue, so any kind of hint would be very helpful. Thank you and Happy Holidays....

Meistermickl avatar Dec 18 '15 13:12 Meistermickl

I can second this notion! Me and Meister would greatly appreciate any kind of point in the right direction for this already great extension. Thanks for the consideration and assistance! Happy holidays as well!

ne0nlight avatar Dec 18 '15 19:12 ne0nlight

A colleague of me made the following change:

diff --git a/app/code/community/RicoNeitzel/PaymentFilter/Helper/Data.php b/app/code/community/RicoNeitzel/PaymentFilter/Helper/Data.php
index 6607508..5eb6b35 100644
--- a/app/code/community/RicoNeitzel/PaymentFilter/Helper/Data.php
+++ b/app/code/community/RicoNeitzel/PaymentFilter/Helper/Data.php
@@ -48,7 +48,7 @@ class RicoNeitzel_PaymentFilter_Helper_Data extends Mage_Core_Helper_Abstract
         */
        public function getPaymentMethodOptions($storeId, $quote = null)
        {
-               $methods = Mage::helper('payment')->getStoreMethods($storeId, $quote);
+               $methods = Mage::getSingleton('payment/config')->getActiveMethods($storeId);
                $options = array();
                foreach ($methods as $method)
                {

for Magento CE 1.9 which results in listing all active payment methods of store 0

borriglione avatar Oct 19 '16 07:10 borriglione

I'm still having trouble reproducing it. We're still using this extension in its current version even with 1.9.3.2 :-/

riconeitzel avatar Apr 12 '17 00:04 riconeitzel

The fix of Andre Herr helped and solved the Issue for me as well. Not sure if that helps to find the cause of it.

Am 12.04.2017 um 02:48 schrieb Rico Neitzel [email protected]:

I'm still having trouble reproducing it. We're still using this extension in its current version even with 1.9.3.2 :-/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/riconeitzel/PaymentFilter/issues/24#issuecomment-293440822, or mute the thread https://github.com/notifications/unsubscribe-auth/APgLFgEoQcv_IGidM2zHaBw0i6VrytFfks5rvB9JgaJpZM4GzkMY.

Meistermickl avatar Apr 12 '17 06:04 Meistermickl

@Meistermickl thanks. I will investigate!

riconeitzel avatar Apr 12 '17 06:04 riconeitzel

I am having the same issue. We use Charge Logic for our credit cards and can't find it as a payment options. I am looking at using the fix but can't find the code to replace. Is this what I replace-

public function getPaymentMethodOptions($storeId, $quote = null) { return Mage::helper('payment')->getPaymentMethodList(true, true, true); }

niners52 avatar Apr 13 '17 17:04 niners52

Hi @niners52 that code sample is not valid anymore … I recently merged some pullrequest – do you use the latest version?

Would you perhaps mind to work together with me to finally track it down and provide an anonymized dump of your shop?

Best, Rico

riconeitzel avatar Apr 13 '17 18:04 riconeitzel

@niners52 any plans to help here?! :-) I would really appreciate!

riconeitzel avatar May 08 '17 10:05 riconeitzel