Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 08-17-2017 08:10:39

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Payment for quotes

Hi Nick

I am thinking it would be good if customers would have a click to pay option on quotes that we send out, instead of them having to phone up or make bank transfer.

Is it possible to include a checkout gateway form in the quote confirmation email so the user can click a link which will take them straight to the payment page, in our case sagepay form??


Rob

Offline

 

#2 08-17-2017 11:28:55

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19861
Website

Re: Payment for quotes

Are you using the POS to generate quotes?  You're looking to get those listed somewhere for the customer to pay on them?


Nick Hendler

Offline

 

#3 08-17-2017 12:26:18

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Re: Payment for quotes

Yes, pos generates quotes. Customers get quote confirmation emails which include ordersummaryxhtml.php.

I was looking at including the olpsetup namespace in the ordersummaryxhtml.php, so the payment form is generated with a Pay Now button.

Trying to work out if I can get the Crypt field populated for the form


Rob

Offline

 

#4 08-18-2017 07:22:21

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19861
Website

Re: Payment for quotes

To do this quickly, set up a 'Quote Payment' service product offer that's got a customer price input.  Add a product option to it for your quote id.  Target that offer from your link with the price and quote id embedded in CGI variables matching those on the offer detail page (just view it's source to figure out what they are).  You'll get a new order for a 'Quote Payment' when processed, and it will include a reference to the quote being paid.  You can then use the order manager to close that order out, and initialize the quote and mark it as paid.


Nick Hendler

Offline

 

#5 09-19-2017 06:45:09

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Re: Payment for quotes

HI Nick

I have added a link in ordersummaryxhtml.php for Quotes as follows:

Code:

https://www.mydomain.co.uk/index.php?app=ecom&ns=addcart&offerid=miscpayment&ecom--addcart--quantity=1&ecom--addcart--pricemapid=DEFAULT-miscpayment-DEFAULT-DEFAULT&ecom--addcart--servpriceinput=787.73&ecom--addcart--DEFAULT-miscpayment-DEFAULT-DEFAULT--miscpayment-desp=201709199

'miscpayment' is a valid service product offer with price input, and it has a option 'miscpayment-desp'. The 'miscpayment-desp' and the 'servpriceinput' values are populated correctly.

On receipt of email, quote customer clicks link and our website opens with correct product in shopping cart. They just need to go through to checkout.

This only eliminates adding item to cart, but it gets the customer closer to payment.

Are there any flaws in having such a link in an email?

Last edited by zanart (09-19-2017 09:22:37)


Rob

Offline

 

#6 09-19-2017 08:16:08

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19861
Website

Re: Payment for quotes

That would work fine.  If I were doing it, I'd consider a shorter URL and using Apache/.htaccess to recognize that URL and do the right thing.  Ie - use a URL like:

https://www.mydomain.co.uk/QuickPay/201709199/787.73

Then add this .htaccess rule above any K9 rules:

RewriteRule ^QuickPay/(.*)/(.*) index.php?app=ecom&ns=addcart&offerid=miscpayment&ecom--addcart--quantity=1&ecom--addcart--pricemapid=DEFAULT-miscpayment-DEFAULT-DEFAULT&ecom--addcart--servpriceinput=$2&ecom--addcart--DEFAULT-miscpayment-DEFAULT-DEFAULT--miscpayment-desp=$1 [L,PT]

Good work.


Nick Hendler

Offline

 

#7 09-19-2017 09:22:47

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Re: Payment for quotes

nice, never thought of that


Rob

Offline

 

#8 09-20-2017 08:07:30

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Re: Payment for quotes

Nick, you make my brain hurt with these tips you give me, and I keep coming up with new ideas!

Anyway based on the QuickPay link, I have added a table column in orderlist.php display for payonaccount users. New column shows if invoice is paid or not. If it isn't paid a 'Pay Now' checkbox is shown. User can select one or more from list of orders with outstanding balance. If any checkbox is checked, big button is displayed - 'Pay Invoices Now'. Button will add all selected invoices to cart in one line. Works perfectly.

Minor issue is, when they get to checkout, Pay On Account method is still displayed. Obviously I don't want them to select this option.
I can see where the method is shown in ECOM_Checkout cogateways function.
Is there anywhere I can set $this->globals('core_user.purchonacct') to 0 if cart contains prod id 'miscpayment' ??


Rob

Offline

 

#9 09-20-2017 09:44:23

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19861
Website

Re: Payment for quotes

Nothing exists that would do this for you.  The easiest thing to do is modify the SQL statement in the ECOM_Checkout class that pulls the gateways.  You've referenced it, so I know you've seen it.  Perhaps do a cart check and conditionally load that gateway if core_user.purchonacct=1 and cart doesn't contain 'miscpayment'.


Nick Hendler

Offline

 

#10 09-20-2017 13:00:53

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Re: Payment for quotes

Realised $this->cartids was available in ECOM_Checkout so just looped through the id's to check for 'miscpayment'.
All good.


Rob

Offline

 

Board footer