Forums / Developer / Let customers choose creditcard or invoice?

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

eZ debug

Timing: Jan 18 2025 15:13:02
Script start
Timing: Jan 18 2025 15:13:02
Module start 'content'
Timing: Jan 18 2025 15:13:02
Module end 'content'
Timing: Jan 18 2025 15:13:02
Script end

Main resources:

Total runtime0.1401 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 587.8438180.8125
Module start 'content' 0.00680.0055 768.656397.9297
Module end 'content' 0.01230.1277 866.5859526.1250
Script end 0.1400  1,392.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.3481200.0002
Check MTime0.00130.9297200.0001
Mysql Total
Database connection0.00070.524810.0007
Mysqli_queries0.099671.13481410.0007
Looping result0.00110.80031390.0000
Template Total0.127491.010.1274
Template load0.00060.457510.0006
Template processing0.126890.516010.1268
Override
Cache load0.00050.324110.0005
Sytem overhead
Fetch class attribute can translate value0.00070.528310.0007
XML
Image XML parsing0.00030.192010.0003
General
dbfile0.00362.5879200.0002
String conversion0.00000.005430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs