Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all Payment Methods are listed under Customer Groups #24

Open
Meistermickl opened this issue Dec 11, 2015 · 14 comments
Open

Not all Payment Methods are listed under Customer Groups #24

Meistermickl opened this issue Dec 11, 2015 · 14 comments

Comments

@Meistermickl
Copy link

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)

@riconeitzel
Copy link
Owner

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?

@ne0nlight
Copy link

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?

@riconeitzel
Copy link
Owner

riconeitzel commented Dec 11, 2015 via email

@ne0nlight
Copy link

Great, thank you!

@Meistermickl
Copy link
Author

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
Copy link
Author

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

@ne0nlight
Copy link

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!

@borriglione
Copy link

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

@riconeitzel
Copy link
Owner

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

@Meistermickl
Copy link
Author

Meistermickl commented Apr 12, 2017 via email

@riconeitzel
Copy link
Owner

@Meistermickl thanks. I will investigate!

@niners52
Copy link

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);
}

@riconeitzel
Copy link
Owner

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants