Post by rhorne » Fri May 26, 2017 9:22 pm

I have just significantly upgraded our OpenCart installation from 2.0.x to 2.3.x but a few of my old VQMODS are no longer working.

One in particular that I'm having a problem solving is enabling bank transfer as a payment option only for a certain user.

Below is the code I used to use but it appears that bank_transfer.php is no longer in that location.

Code: Select all

     
 <file name="catalog/model/payment/bank_transfer.php">
	    <operation info="Only enable bank transfer as a payment method for Rosie. We check the current user id. If it's not 3 (Rosie/Telephone Sales) then we hide the bank transfer payment method by setting status to false.">
           <search position="replace"><![CDATA[
		   if ($status) {      
           ]]></search>
           <add><![CDATA[           
		if ($this->customer->getId() != 3) {
		$status = false;
		}

		if ($status) {]]></add>
       </operation>     
   </file>
   
Where is this file still saved and will the above still likely work?

Thanks in advance. You guys are an awesome resource.
Last edited by rhorne on Fri May 26, 2017 9:39 pm, edited 1 time in total.

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by Qphoria » Fri May 26, 2017 9:34 pm

In 2.3 its in
catalog/model/extension/payment/bank_transfer.php

That part of the code will likely still work but be careful to merge it into the new code correctly

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by rhorne » Fri May 26, 2017 9:39 pm

Perfect. Works just fine. Thanks, QPhoria. :)

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am
Who is online

Users browsing this forum: No registered users and 23 guests