Jump to content

[solved] Need cash, check, and credit card payment methods for back office ONLY


Recommended Posts

Hi everybody, what I'm looking for seems simple but after a couple hours of research I can't find the answer.

 

I want to use PrestaShop's back office "create order" feature to sell products in our physical store (in addition to online).

 

So for the in-store sales, I want to be able to mark orders as paid by cash, check, or credit card (in-store, processed via terminal) but not show these options for the online customers. They need to be visible in the back-office "create order" page only. 

 

Online customers will only use the standard online payment options of credit card (i.e. Authorize.net) or PayPal.

 

e.g. when I enable the Check module, it appears in both the front-office and back-office but I only want it to appear in the back office. I supposed if I can get that figured out, I can duplicate it for the other modules I need (cash, in-store cards).

 

I'm thinking it may be related to hooks but I'm just learning about them. I see the hookPayment and hookPaymentReturn functions in cheque.php but I'm not sure if it's possible to specify front vs. back office or if I'm barking up the wrong tree altogether.

 

Thanks for any advice!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

If you do not want a module to be shown (but still installed/enabled) then you would unhook it.  It would still be available for services that do not require the hook for display, i.e. back office.

-----the above in incorrect

 

see post below

http://www.prestashop.com/forums/topic/295940-need-cash-check-and-credit-card-payment-methods-for-back-office-only/?p=1619348

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

We are looking for the same functionality (having a payment method usable in the back office only through the Orders->Add New screen).  I have tried removing the hooks for the payment module in question and while this does remove the module from the cart it also seems to remove it from the back office order screen.

 

Does anyone know if there is a setting or a way to modify the module in question to behave in the desired fashion?

 

Thanks.

Edited by whish (see edit history)
Link to comment
Share on other sites

Hi,

 

We are looking for the same functionality (having a payment method usable in the back office only through the Orders->Add New screen).  I have tried removing the hooks for the payment module in question and while this does remove the module from the cart it also seems to remove it from the back office order screen.

 

Does anyone know if there is a setting or a way to modify the module in question to behave in the desired fashion?

 

Thanks.

 

You are correct, just tested which I should have done in my original post...

 

if I remove the hook, it is not available in back office add order payment option.

 

here is a very simple way to modify your payment module hooks to not display unless from back office, (tested with bank wire)

 

add these two lines to see if _PS_ADMIN_DIR_ (only defined when in back office)

	public function hookPayment($params)
	{
		if (!defined('_PS_ADMIN_DIR_'))
			return;

Link to comment
Share on other sites

 

You are correct, just tested which I should have done in my original post...

 

if I remove the hook, it is not available in back office add order payment option.

 

here is a very simple way to modify your payment module hooks to not display unless from back office, (tested with bank wire)

 

add these two lines to see if _PS_ADMIN_DIR_ (only defined when in back office)

	public function hookPayment($params)
	{
		if (!defined('_PS_ADMIN_DIR_'))
			return;

 

 

Thanks a lot!  Works brilliantly.

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

 

You are correct, just tested which I should have done in my original post...

 

if I remove the hook, it is not available in back office add order payment option.

 

here is a very simple way to modify your payment module hooks to not display unless from back office, (tested with bank wire)

 

add these two lines to see if _PS_ADMIN_DIR_ (only defined when in back office)

	public function hookPayment($params)
	{
		if (!defined('_PS_ADMIN_DIR_'))
			return;

I have tried the above instructions to no avail.

 

I am not 100% sure which file to edit and where to insert the lines mentioned.

 

I think my problem may be with the bolded red text in the quote above.

 

I have tried adding the mentioned lines to cashondelivery.php file right after "public function hookPayment($params)" as mentioned. But this does nothing for me.

 

Any help would be grealty appreciated.

Link to comment
Share on other sites

  • 2 years later...

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
×
×
  • Create New...