VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Kuubs on June 20, 2022, 10:05:45 AM

Title: "refresh" cart data
Post by: Kuubs on June 20, 2022, 10:05:45 AM
Hello,

I have a bug in my plugin. It's a shipment plugin and it gets it price via an external service. This shipment plugin is an iframe and it sets the shipment costs dynamically. Works great except for one thing. When I change the shipment it will set the cost to 0. Because this shipment plugin has an initial cost in virtuemart of 0, so that the plugin iframe sets the shipment accordingly. But when you switch between the two it only gets updated when you for example set another payment option. Probably when you switch these payment or shipment options some sort of javascript function gets called so that the prices get updated. What is this method?




Title: Re: "refresh" cart data
Post by: pinochico on June 20, 2022, 10:45:05 AM
Send URL
I think you have to find ID or class element in all JS in eshop.
Title: Re: "refresh" cart data
Post by: Kuubs on June 22, 2022, 11:34:50 AM
I managed to fix this, it was a One Page Rupostel method I needed to exectute at selecting the shipment option.
Title: Re: "refresh" cart data
Post by: pinochico on June 23, 2022, 00:19:15 AM
If not fixed,

send your question right to Stano, not there :)