Let customers choose creditcard or invoice?

Author Message

Petter Arneson

Monday 24 July 2006 1:40:13 am

Hi!

I have a shop (ezpublish 3.7.5) set up with paynet gateway. Now the customer wants to let the resellers to have a choice between payment via creditcard or ordermail.

I've added a usergroup for discount etc., and put a radiobutton in confirmorder (creditcard/invoice), but I dont know how to skip the payment redirecting.

I tried exiting the workflow, but then the process/order is not completed. Any tips?

www.vzt.no

Stuart Fenton

Monday 24 July 2006 2:04:43 am

I think you should probably write a workflow to allow you to choose the type of payment you want to take.

The workflow would look at a radio select button (with multiple choices) then after the user continues makes the choice of which workflow to run next.

This would be triggered after confirm order but if you hit any obstacles you could create a new trigger after confirm order that allows you to hook the other workflows to.

A different approach would be to use the multiplexer to test for a variables (perhaps stored in the session variable) to decide on which workflow to run.

Of course both of these approaches would need you to create a workflow for payment by invoice instead of by card.

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Petter Arneson

Monday 24 July 2006 6:42:11 am

Thanks!

Your second suggestion seems like the best way to do it.

I didn't have the time to do this, but I managed to get it working with a radiobutton, setting a sessionvariable and a dirty fix in ezredirectgateway's execute function where I set the event_state and status manually.

www.vzt.no

Mike Coker

Sunday 30 December 2007 3:00:59 am

Petter, how did you get the selection option and which files were needed to be edited in order for the end user to get an invoice emailed to them. I have a client now that is asking for PayPal or Direct Debit (invoice effectively) which sounds similar to your CC or Invoice solution. Can you explain?

Many thanks,

Mike Coker, BFA (Hons.)
Senior Designer & Strategist | Director

Quiqcorp Ltd | Web and Brand Development | Quiqcorp.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:34:14
Script start
Timing: Jan 18 2025 18:34:14
Module start 'layout'
Timing: Jan 18 2025 18:34:14
Module start 'content'
Timing: Jan 18 2025 18:34:16
Module end 'content'
Timing: Jan 18 2025 18:34:16
Script end

Main resources:

Total runtime1.7703 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 588.0469152.6406
Module start 'layout' 0.00770.0027 740.687539.4766
Module start 'content' 0.01041.7581 780.1641587.4922
Module end 'content' 1.76850.0018 1,367.656312.1250
Script end 1.7702  1,379.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2015160.0002
Check MTime0.00130.0739160.0001
Mysql Total
Database connection0.00100.053810.0010
Mysqli_queries1.704996.3050620.0275
Looping result0.00070.0370600.0000
Template Total1.730797.820.8653
Template load0.00210.120420.0011
Template processing1.728597.643020.8643
Template load and register function0.00020.012210.0002
states
state_id_array0.00190.105610.0019
state_identifier_array0.00270.150420.0013
Override
Cache load0.00180.1017240.0001
Sytem overhead
Fetch class attribute can translate value0.00100.055530.0003
Fetch class attribute name0.00140.079260.0002
XML
Image XML parsing0.00940.531030.0031
class_abstraction
Instantiating content class attribute0.00000.000760.0000
General
dbfile0.00910.5132230.0004
String conversion0.00000.000440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs