Hi,
To auto capture orders in DIBS eCom v2 I need to add a parameter called "capturenow" in the checkout formuler.
I was hoping that I could do this on specific products only. But I cant see how?
Any ideas?
Can I by converting the template to xslt include a orderlist loop and then check the product parrent group, or something?
Or even 2 different shops?
/Rasmus
Developer forum
E-mail notifications
Auto Capture eCom v2
Posted on 29/11/2010 16:15:59
Replies
Nicolai Høeg Pedersen
Posted on 29/11/2010 21:55:42
You have the dibs template in which you can loop through the order lines so thats an option.
Another option would be using OrderIsPassedToCheckoutHandler which is passed the checkouthandler instance (Dibs checkout handler) and the order instance:
http://engage.dynamicweb-cms.com/api/ecommerce/?Dynamicweb~Dynamicweb.Ecom7.Cart.Notifications~OrderIsPassedToCheckoutHandler.html
You can then take a look at the orderlines and change the PostTemplate property runtime if requirements are met, to a version that has that extra parameter.
Another option would be using OrderIsPassedToCheckoutHandler which is passed the checkouthandler instance (Dibs checkout handler) and the order instance:
http://engage.dynamicweb-cms.com/api/ecommerce/?Dynamicweb~Dynamicweb.Ecom7.Cart.Notifications~OrderIsPassedToCheckoutHandler.html
You can then take a look at the orderlines and change the PostTemplate property runtime if requirements are met, to a version that has that extra parameter.
Nicolai Høeg Pedersen
Posted on 29/11/2010 21:57:39
I can also provide you with the source for the DIBS checkout handler - then you can manipulate it to accomodate your needs.
Posted on 29/11/2010 23:45:03
Hi Nicolai,
Thank you 4 your quick reply.
When I insert the dwtemplatetags on the checkup template "eCom7\CheckoutHandler\DIBS\Post\Post.html" I only see Dibstags.
No loops are available...-
Thank you 4 your quick reply.
When I insert the dwtemplatetags on the checkup template "eCom7\CheckoutHandler\DIBS\Post\Post.html" I only see Dibstags.
No loops are available...-
Posted on 29/11/2010 23:51:44
That I wont say no to. :)
Nicolai Høeg Pedersen
Posted on 30/11/2010 07:55:35
Attached all our checkout handlers. You just need the DIBS. Remember to rename namespace and add-in.
Posted on 30/11/2010 09:39:36
Isn't it possible with out making custom code?
You where talking about looping orderlines in the dibs templates?
You where talking about looping orderlines in the dibs templates?
Nicolai Høeg Pedersen
Posted on 30/11/2010 09:53:59
No - the standard DIBS checkout handler does not render the order.
But you can add it yourself:
But you can add it yourself:
case PostModes.Template:
LogEvent(order, "Render template");
// Get template
var formTemplate = new Templatev2.Template(PostTemplate);
// Render tags
foreach (var x in formValues)
{
formTemplate.SetTag(string.Format("Dibs.{0}", x.Key), x.Value);
}
var r = new eCommerce.Frontend.Renderer(Dynamicweb.Frontend.PageView.Current());
r.RenderOrder(order, formTemplate);
// Render and return
return formTemplate.Output();
I've added it to our version of DIBS checkout handler, but it is not available untill 7.2 release.
Posted on 02/12/2010 13:47:37
What if I wanted to base my check on witch product-group the product was located?
What approach would you recommended?
In the future would it be possible to change the checkout template? And fx. replace it with a xslt-template?
What approach would you recommended?
In the future would it be possible to change the checkout template? And fx. replace it with a xslt-template?
Nicolai Høeg Pedersen
Posted on 02/12/2010 14:09:51
You can change the checkout template from management center where you set up the different gateways. And you can use XSLT as well as HTML.
If you need that specific handling of the checkout you need to either do a custom checkout handler, or handle it on the step just before checkout.
In that step you can do either some code or some template work that makes sure that a proper gateway setup is chosen.
You can setup multiple DIBS checkouts with different templates - one with autocapture and one without. Then in the step just before the payment, you can do some magic choosing the right one...
If you need that specific handling of the checkout you need to either do a custom checkout handler, or handle it on the step just before checkout.
In that step you can do either some code or some template work that makes sure that a proper gateway setup is chosen.
You can setup multiple DIBS checkouts with different templates - one with autocapture and one without. Then in the step just before the payment, you can do some magic choosing the right one...
You must be logged in to post in the forum