So, the only choice (unless I decide to modify rendered DOM HREF attribute directly) is to tweak 'receipt.inc.twig' which I cannot find :-)
var FC = FC || {};
FC.onLoad = function () {
FC.client.on('ready.done', function () {
FC.json.continue_url = 'http://google.com';
});
};
On the FoxyCart cart, checkout and receipt templates - you don't need to wrap the event code in an onLoad() function call - that's just for code on your own website.
For editing the continue_url, I'd recommend approaching that with Twig: You can include that right at the top of your receipt template to change that value.
For accessing the custom value in Twig, you can do that like this, assuming a custom field of "my_custom_field=true"
How do I pass value from FC.json.custom_fields to twig world?
This does not work: Thanks!
But what I could not achieve is string concatenation:
{% set continue_url = custom_fields.url_continue.value + '/' + custom_fields.order_id.value %}
You're very close there! In Twig, you concatenate with the
~
character - so it would be: