Hello I know this site is intended to be for wordpress questions, but maybe someone can figure this out. On my magento site when I click add to cart "ajax function" if someone isn't logged in, it echos the facebook login button, each time I press to add to cart it will add another duplicate facebook login button until the person logs in.
Gabriel Reguly answers:
The issue does not exist at the plugin demo site http://store.belvg.com/demo/facebookfree/checkout/cart/[[LINK href="http://store.belvg.com/demo/facebookfree/checkout/cart/"]][[/LINK]]
Perhaps it is something else?
Anyway, as a solution I would add a cookie to avoid displaying twice the Facebook login button.
But, sorry, $10 is not much of a prize for this task.
No-one is forcing you to help for $10 Gabriel.
I was assuming it just just a small issue with code that was echoing it when the ajax function is submitted.
Gabriel Reguly comments:
Thanks for assuring me that I am not forced to help you.
Yes, it probably is a small issue with the code, and a cookie would be my solution for it.
Other experts might suggest to just check if some ID is already present at the DOM.
See, the original author most likely has assumed that people would be logging in at the first button and did not bothered to check if it was already displayed or not.
That is not an uncommon thing to happen with AJAX.
How much would it cost you for you to create this cookie my good sir.
Pavel Petrov answers:
If I were to fix this I`d find the ajax response(The easiest way to do this is Network tab in Firebug). If you give me the link to your site I can take a look and try to find the problem, I have some previous experience in magento...