"Buy with Amazon" button not working
Permalink
If I paste their code into a block as HTML type or a CONTENT type, then hit the HTML tab in the editor, I can SEE the button, but hovering and clicking do nothing.
What do I have to do to make the button function properly in concrete5 with the Slate theme?
Here's the code they gave, with the merchant ID XXXXXX'ed out, and the huged hashed string of RenderCBAButton cut out.
What do I have to do to make the button function properly in concrete5 with the Slate theme?
Here's the code they gave, with the merchant ID XXXXXX'ed out, and the huged hashed string of RenderCBAButton cut out.
<p><img src="https://payments.amazon.com/gp/cba/button?cartOwnerId=XXXXXXXXXXXXXX&size=large&color=orange&background=white" alt="" /></p> <p><!-- RenderCBAButton = function(ordervalue) { var standard1 = new CBA.Widgets.StandardCheckoutWidget({ merchantId: "XXXXXXXXXXXXXXX", orderInput: { format: "XML", value: ordervalue} }).render("cbaxmlButton"); } // --></p> <table> <tbody> <tr> <td><!-- RenderCBAButton("type:cba-signed-order/sha1-hmac/2;order:<GIANT HASHED STRING HERE>"); // --></td> </tr> </tbody> </table>
Changing it this way locks up concrete5 with the "thinking circle" and I have to delete the block to stop it.
This is probably due to some kind or javascript error.
You should look at the messages on the console, if you are using Chrome, open the developers tools (Shift+Ctl+I), under firefox, you should install (if not done already) the firebug extension.
Once you have the error, you will be able to fix it.
You should look at the messages on the console, if you are using Chrome, open the developers tools (Shift+Ctl+I), under firefox, you should install (if not done already) the firebug extension.
Once you have the error, you will be able to fix it.
Got it. Just remade the button with Amazon. For some reason the code came out almost completely different the second time. Now it works!
Thanks.
Thanks.
That said, this code looks strange :
Might be better ?
(and this code seems to require a CBA object to be present, maybe you also need to include a js script for that :/ )
just googling, made me find a few answers, you probably need to add this as well :