Details button for multi-ship subscription

We have that fancy Custom Date Mask feature where we can change a next shipment date for subscription modification transactions. We noticed that the Details button will re-write the Next Charge date each time the Details button is pressed.

image
jQuery("#fc").on('click', "[data-fc-id=button-toggle-future-subscription-details]", function() {
var new_val = jQuery(".nextdate_mask").val();
jQuery(".next_charge_date").text(new_val);
})
doesn't do it. Never seems to fire. Mind pointing me in the right direction?

Thanks,
Jacob
Comments
  • fc_adamfc_adam FoxyCart Team
    @jacobdubail,

    Any dynamically made changes can potentially get blown away by a client-side render event. You could hook into the render event to simply re-apply that dynamically updated value:
    FC.client.on("render.done", function() {
    var new_val = jQuery(".nextdate_mask").val();
    jQuery(".next_charge_date").text(new_val);
    });
  • Thanks @fc_adam. I knew it was some render event. I really should have tried that first. I was thinking of render.done as more of a ready.done event. I didn't realize it fired so frequently, but makes sense now that you mention it.
Sign In or Register to comment.