How to assign HTML-Code to a button
Posted: Mon Sep 20, 2021 7:20 am
Hello together,
I actually try to switch from the paypal-add-to-cart-button to Ecwid e-commerce.
Ecwid holds on their website a generator to generate code which can be embedded on every website to add items to the Ecwid cart
this button for example, I created there.
But when I add this code to a button, it does not work
how do i have to assign such code to a button, that this code is executet by clicking the button?
thx in advance
Herbert
I actually try to switch from the paypal-add-to-cart-button to Ecwid e-commerce.
Ecwid holds on their website a generator to generate code which can be embedded on every website to add items to the Ecwid cart
Code: Select all
<div class="ecsp ecsp-SingleProduct-v2 ecsp-Product ec-Product-395410332" itemtype="http://schema.org/Product" data-single-product-id="395410332"><div class="ecsp-title" itemprop="name" style="display:none;" content="FFP2-CE0370"></div><div customprop="addtobag"></div></div><script data-cfasync="false" type="text/javascript" src="https://app.ecwid.com/script.js?65626913&data_platform=singleproduct_v2" charset="utf-8"></script><script type="text/javascript">xProduct()</script>
But when I add this code to a button, it does not work

how do i have to assign such code to a button, that this code is executet by clicking the button?
thx in advance
Herbert