I am using Ecwid e-commerce on top of Drupal. Ecwid is widget based and its product browsing is completely based on url change after hash # sign. E. g. (domain.com#ecwid:category=663150&mode=product&product=2788636)

Now AddToAny ignores any url with hash included. It just simply cut it down, but it shouldn't. According to this config sttings: http://www.addtoany.com/buttons/customize/page_url_title. After trying to add blank config settings (see screen) as suggested it seems doesn't work at all.

Maybe I am doing wrong something. Please help mi figured it out. Thank you.

CommentFileSizeAuthor
addtoany-url-hash.png130.74 KBadvix

Comments

advix’s picture

Attaching link to Ecwid demo, to see what I am talking about. http://www.ecwid.com/demo-frontend.html#ecwid:category=1002&mode=categor...
This ajax based products browser is implemnted in one drupal page which doesn't change.

micropat’s picture

Title: AddToAny doesn't respect url hash » Method to use the hash in the URL
Category: bug » feature
Priority: Major » Normal

By design the URLs are hardcoded in the module to use either the current node or the homepage, so the module doesn't yet take advantage of AddToAny's anchor-grabbing functionality.

Did you implement AddToAny using blocks, or how so?

I'm thinking it might make sense for AddToAny blocks to use the default location.href in order to use the current location.hash upon sharing. Thoughts?

advix’s picture

Thank you for response and clarifying things. Curently I use AddToAny module using "Display in LINK section". In common Drupal pages it works good. Btw. I think your suggestion make sense. At least the a2a block should use the current (default) location.href, because of ajax pages. And that block you can easily stick where that ajax pages appears in your Drupal website.

But one question is unanswered for me: Should a2a module respect url hash all the times just as a2a service do? Or is it totally impossible by design as you wrote?

PS: As a workaround, the original snippet http://www.addtoany.com/buttons/ inserted in block works. But the above mentioned way would be cool more.