News:

Support the VirtueMart project and become a member

Main Menu

integrate Insurance into the onepagecheckout

Started by FDT, July 29, 2019, 10:08:28 AM

Previous topic - Next topic

FDT

Hello,
If it possible integrate Insurance into the onepagecheckout plugin here prntscr.com/ok70fs ? In the plugin we want to set the value as a percentage and in the shop cart the buyer can check the checkbox. If buyer choose the insurance, then our percentage is added to the final amount. if he doesn't want it, nothing is added. Plus, the name itself at the shop cart should be with reference to familiarization with the terms of insurance. Waiting for reply

StefanSTS

I don't think, that will be easy to add into VM or VirtuePlanet OPC, it is acually independent from the cart extension you use.

You need a switch in the tax/rules calculation function. The switch has to react on the status of your calculation rule/insurance checkbox. I don't think there is a hook for that yet.
If I would need that, I guess I would ask iStraxx if they could develop a plugin for me or add it to the core to avoid future hickups.

You can probably also achieve the display of that by adding a calculation rule and show the added value only if the checkbox is ticked, but that will be messy with the prices in DB. So I would not recommend to tweak it looking right in the views.
A maybe better idea would be to add a trigger to change the/add a shopper group on checking that checkbox. And then define that rule only for that triggered shopper group.

Just a few ideas thrown in
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.