Adding another payment option

In this board, we will periodically list various tips and tricks we find that may help in your use of PrestaShop. This will also include tips on the use of Agile modules. If you have a great tip, fix, or workaround for a PrestaShop feature, feel free to post it here...

Adding another payment option

Postby webmaster_15807 » Wed Feb 28, 2018 9:19 pm

I made a GoogleWallet payment option and this could be used for adding other payment options that just email the buyer the name and account info:

I copied the PS pay by check and renamed everything to be by googlewallet. Upload this folder to the modules folder but do not install it.

I copied the email html and txt files in the PS mail folder and changed the names and file text to by googlewallet.

Here is a list of files editted and other changes. Some might not be necessary and some steps confusing. This is not a start to finish write up and requires the Agile bankcheck module to edit to get to work. It should get someone started that would like to add this type of payment option.

text and files”
cheque
googlewallet

CHEQUE
GOOGLEWALLET

text only:
getSellerChequeInfoBySellerID
getSellerGoogleWalletInfoBySellerID

getSellerChequeInfo
getSellerGoogleWalletInfo

_displayCheque
_displayGoogleWallet

Please send your check with
Please send your payment with

AgilePaybyCheque
AgilePayByGoogleWallet


Pay by Check
Pay by GoogleWallet

Pay by Cheque
Pay by GoogleWallet

AgilePayByCheque
AgilePayByGoogleWallet


accepting payments by check.
accepting payments by GoogleWallet.

accept payments by check.
accept payments by GoogleWallet.

name and address to which customers must send their check.
name and address to which customers must send their payment.

check_name
googlewallet_name

check_address
googlewallet_address


in config/config.inc.php
line 256 add: define('_PS_OS_GOOGLEWALLET_’, Configuration::get('PS_OS_GOOGLEWALLET'));

~/Desktop/DAM 2-19-2018/controllers/admin/AdminOrdersController.php:249: $defaults_order_state = array('cheque' => (int)Configuration::get('PS_OS_CHEQUE'),

~/Desktop/DAM 2-19-2018/modules/ps_cashondelivery/ps_cashondelivery.php:53: $updateConfig = array('PS_OS_CHEQUE', 'PS_OS_PAYMENT', 'PS_OS_PREPARATION', 'PS_OS_SHIPPING', 'PS_OS_CANCELED', 'PS_OS_REFUND', 'PS_OS_ERROR', 'PS_OS_OUTOFSTOCK', 'PS_OS_BANKWIRE', 'PS_OS_PAYPAL', 'PS_OS_WS_PAYMENT');

~/Desktop/DAM 2-19-2018/modules/agilekernel/override/classes/module/Module.php:85: $modules2skip = array('agilebankwire','agilepaybycheque');

~/Desktop/DAM 2-19-2018/modules/agilekernel/shared_override/classes/Mail.php:21: $order_info_templates = array('order_conf','bankwire','cheque','new_order');

~/Desktop/DAM 2-19-2018/modules/agilemultipleseller/override/classes/order/OrderHistory.php:40: if(Module::isInstalled('agilemultipleseller') && in_array($result['module_name'], array('agilebankwire','agilepaybycheque')))

~/Desktop/DAM 2-19-2018/classes/Language.php:253: 'bankwire.html', 'bankwire.txt',

/home/digitalasset/testsite.digitalassetmarket.me/modules/agilemultipleseller/controllers/front/sellerorderdetail.php

~/Desktop/DAM 2-19-2018/override/classes/order/OrderHistory.php:31: if($result['module_name'] == 'ps_wirepayment' && Module::isInstalled('agilebankwire'))$result['module_name'] = 'agilebankwire';

~/Desktop/DAM 2-19-2018/override/classes/order/OrderHistory.php:34: if(Module::isInstalled('agilemultipleseller') && in_array($result['module_name'], array('agilebankwire','agilepaybycheque')))

~/Desktop/prestashop_1.7.2.4/prestashop/classes/Language.php:254: 'cheque.html', 'cheque.txt',

~/Desktop/DAM 2-19-2018/modules/agilekernel/override/classes/Mail.php:21: $order_info_templates = array('order_conf','bankwire','cheque','new_order');

~/Desktop/DAM 2-19-2018/modules/agilekernel/override/classes/Mail.php:41: if(Module::isInstalled('agileprepaidcredit') AND in_array($template,array('bankwire','cheque')))

~/Desktop/DAM 2-19-2018/modules/agilekernel/shared_override/classes/Mail.php:21: $order_info_templates = array('order_conf','bankwire','cheque','new_order');

~/Desktop/DAM 2-19-2018/modules/agilekernel/shared_override/classes/Mail.php:41: if(Module::isInstalled('agileprepaidcredit') AND in_array($template,array('bankwire','cheque')))

~/Desktop/DAM 2-19-2018/modules/ps_legalcompliance/ps_legalcompliance.php:167: 'bankwire', 'cheque', 'paypal',

INSERT INTO `ps_configuration` (`id_configuration`, `id_shop_group`, `id_shop`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, NULL, NULL, 'PS_OS_GOOGLEWALLET', '14', '0000-00-00 00:00:00', '0000-00-00 00:00:00');

UPDATE `ps_configuration` SET `value` = '14' WHERE `ps_configuration`.`id_configuration` = 775;
UPDATE `ps_order_state_lang` SET `template` = 'googlewallet' WHERE `ps_order_state_lang`.`id_order_state` = 14 AND `ps_order_state_lang`.`id_lang` = 1;

UPDATE `ps_order_state` SET `send_email` = '1' WHERE `ps_order_state`.`id_order_state` = 14;
UPDATE `ps_order_state` SET `module_name` = 'ps_googlewalletpayment' WHERE `ps_order_state`.`id_order_state` = 14;

~/Desktop/prestashop_1.7.2.4/prestashop/app/Resources/translations/default/EmailsBody.xlf:3: <file

~/Desktop/DAM 2-19-2018/modules/agilemultipleseller/controllers/front/sellerpayments.php:46: self::$smarty->assign(array('seller_tab_id' => 5, 'integratedModules' => $this->_integratedModules, 'is_agilebankwire_installed' => Module::isInstalled('agilebankwire'), 'is_agilecashondelivery_installed' => Module::isInstalled('agilecashondelivery'), 'is_agilegooglecheckout_installed' => Module::isInstalled('agilegooglecheckout'), 'is_agilepaybycheque_installed' => Module::isInstalled('agilepaybycheque')));

~/Desktop/testsite.digitalassetmarket.me/config/xml/tab_modules_list.xml:322: <module name="bankwire" position="60"/>

~/Desktop/testsite.digitalassetmarket.me/config/xml/themes/default.xml:47: <meta meta_page="module-bankwire-validation" left="0" right="0"/>

~/Desktop/testsite.digitalassetmarket.me/app/Resources/translations/en-US/EmailsBody.en-US.xlf:43: <file original="modules/ps_emailgenerator/templates/core/cheque.php" source-language="en" target-language="en" datatype="plaintext">

~/Desktop/testsite.digitalassetmarket.me/override/classes/Mail.php:18: $order_info_templates = array('order_conf','bankwire','cheque','new_order');

~/Desktop/testsite.digitalassetmarket.me/override/classes/Mail.php:38: if(Module::isInstalled('agileprepaidcredit') AND in_array($template,array('bankwire','cheque')))

~/Desktop/testsite.digitalassetmarket.me/override/classes/module/Module.php:111: $modules2skip = array('agilebankwire','agilepaybycheque');


/home/digitalasset/testsite.digitalassetmarket.me/modules/gamification/data/data_EN_USD_US.json
webmaster_15807
 
Posts: 67
Joined: Sat Jan 13, 2018 12:40 am

Return to Tips and Tricks for PrestaShop and Agile Modules

Who is online

Users browsing this forum: No registered users and 3 guests