Hello @tarikbisevac,
Thank you for choosing our product and writing in!
You can easily change that using the Loco Translate plugin.
You can find the “Add” string in CartFlows Pro.
Read more: https://cartflows.com/docs/change-cartflows-strings-using-loco-translate/
Best,
Thank you, but I have solved the issue on the harder way.
I would give you one advice, since that I couldn’t find this article in the documentation: change the name or something. Since that ‘change strings’ is not very intuitive.
Here is my harder solution, since that I had to override the function that does change the string in the button. This is just a showoff, hahah.
Here is the code:
`document.addEventListener(‘DOMContentLoaded’, function() {
var orderButton = document.getElementsByClassName(‘wcf-bump-add-to-cart’)[0];
var isOrdered = false;
orderButton.textContent = ‘YES! ADD TO MY ORDER’;
const config = { attributes: true };
function callback(mutationList, observer) {
var target = mutationList[0].target
if (mutationList[0].attributeName === ‘class’) {
if (isOrdered) {
target.textContent = ‘YES! ADD TO MY ORDER’
isOrdered = false;
} else {
target.textContent = ‘ADDED TO ORDER’
isOrdered = true;
}
}
}
const observer = new MutationObserver(callback);
observer.observe(orderButton, config);
});
Plugin Support
Aamir
(@aamiribsf)
Hello @tarikbisevac,
Glad that you were able to sort it OUT.
Thanks for sharing the code. That will really help others having the same issue.
Please feel free to get in touch if you need help with anything.
Thank you & Have a great day ahead!