Jump to content

Enable guests to see payment methos without sign in


Adi Coscai
 Share

Recommended Posts

Hi! I want to let my guests to see payment methos without sign in. 

I use one page checkout (One Step Checkout / One Page Checkout v1.6.7 - by best-kit.com) for prestashop 1.6.

I tried to edit OrderOpcController.php 

 

    protected function _assignPayment()
    {
        if ((bool)Configuration::get('PS_ADVANCED_PAYMENT_API')) {
            $this->context->smarty->assign(array(
                'HOOK_TOP_PAYMENT' => ($this->isLogged || $this->is_guest ? Hook::exec('displayPaymentTop') : ''),
                'HOOK_PAYMENT' => $this->_getPaymentMethods(),
                'HOOK_ADVANCED_PAYMENT' => Hook::exec('advancedPaymentOptions', array(), null, true),
                'link_conditions' => $this->link_conditions
            ));
        } else {
            $this->context->smarty->assign(array(
                'HOOK_TOP_PAYMENT' => ($this->isLogged || $this->is_guest ? Hook::exec('displayPaymentTop') : ''),
                'HOOK_PAYMENT' => $this->_getPaymentMethods()
            ));
        }
    }

    protected function _getPaymentMethods()
    {
        if (!$this->isLogged || !$this->is_guest) {
            return '<p class="warning">'.Tools::displayError('Please sign in to see payment methods.').'</p>';
        }

but... doesn't work.... Any help? please :D

Edited by Adi Coscai (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More