Pavel Siderov Posted February 3, 2017 Share Posted February 3, 2017 I am using the default social sharing buttons on the product page (presta 1.6.1.10 / default bootstrap theme). When I click on the facebook button it shares this url http://mysite.com/index.php?id_product=4741. But if you open this url it shows the home page. When I am browsing my site I can see that this product url is: http://mysite.com/index.php?id_product=4741&controller=product . I can edit the code and make it work but I want to know if this a configuration issue or a bug. Link to comment Share on other sites More sharing options...
Pavel Siderov Posted February 5, 2017 Author Share Posted February 5, 2017 I found that when I click on the share button it opens the fb window and in its address bar the product url is correct but not encoded. That caused fb to share only the url before the &. Added urlencode before addcslashes to modules/socialsharing/socialsharing.php 'sharing_url' => urlencode(addcslashes($this->context->link->getProductLink($product), "'")), And now it's working! When I click the share button the fb window that opens show the the url encoded "https://www.facebook.com/sharer.php?u=http%3A%2F%2Fmysite.com%2Findex.php%3Fid_product%3D4741%26controller%3Dproduct" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now