eCommerce construction > How-to questions

URL available in HTML block?

(1/2) > >>

jimcooncat:
I'd like to make a Facebook Share link on individual product pages, so visitors can share the product pages with their friends. Seems I could make a custom HTML block to show the link. Are there field codes available in the HTML editor that I can embed the current URL? Or another trick to accomplish something like the attachment here shows.

llegrand:
Perhaps our free AddThis extension  would be easier for you
Here's the MarketPlace link

http://marketplace.abantecart.com/addthis?keyword=addthis&category_id=0
This is our manual of how it workds
https://abantecartextensions.com/docs/addthis

jimcooncat:
Thank you. It looks like an easy implementation, but I'm hoping for something even simpler and without oversharing to fourth parties.

jimcooncat:
Stumbled across this code for a Wordpress implementation. Would something similar work with AbanteCart? Are php variables accessible in this manner?

<a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" title="<?php the_title(); ?>" target="_blank">Share on Facebook</a>

jimcooncat:
Found a solution, I think. Any drawbacks to this?

<a href="#" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),'facebook-share-dialog','width=626,height=436');return false;">Share on Facebook</a>

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Social Login Mod