Home Page › Forums › WooCommerce Custom Tabs › Anchor link?
- This topic has 9 replies, 3 voices, and was last updated 9 years ago by
Paul.
-
AuthorPosts
-
Participant
Hi
First of all, thanks for the plugin, it works great, exactly what I was looking for!
There is a way to create a link at the bottom of a tab content, targeting another tab?
For ex. let’s say you have tabs “details”, and “video”. How to make a link at the end of “details” content to go/open “video” tab?Thanks!
KeymasterHi Alessio,
Tab handling is a WooCommerce feature, this plugin makes possible to add more WooCommerce tabs, but it does not change the basic mechanism of tab handling (e.g. how to get from one tab to another).
We have not found a solution for using links to get to other tabs.
Since product tab handling is a WooCommerce function, we recommend you to look around in WooCommerce topics if is there any solution for this question.
Best Regards,
Peter Rath
WebshopLogicKeymasterHi Paul and Alessio!
I could not find any solution on the web, but we will build this function in our WooCommerce Custom Tabs plugin.
It will be available in some days, we will let you know when the new version is ready.
Peter
KeymasterHi,
In WooCommerce Custom Tabs v1.0.13 this function is available from now, you can download this version from “MY ACCOUNT” menu in webshoplogic.com.
What is the format of the anchor links?
The format of the link to a product tab:
http://mysite.com/product/my-product/#tab-my-content
or
http://mysite.com/product/my-product/#tab-my-content&noscrollBoth format select the appropriate tab. If you are using &noscroll option (or other parameter after the anchor), the top of the page will be displayed, otherwise the browser will scroll down to the anchor (if there is nothing after the anchor).
How do you know the name of the anchor?
WooCommerce standard anchor names should be use in the end of the URL. The browser display them on the bottom, if you move the mouse over the appropriate tab. You should apply the part of the URL after the # mark. (e.g. #tab-my-content or #tab-faq)Two live examples:
http://webshoplogic.com/product/woocommerce-custom-tabs-pro-plugin/#tab-faq
http://webshoplogic.com/product/woocommerce-custom-tabs-pro-plugin/#tab-faq&noscrollWe hope this is a useful function.
Peter
ParticipantHi I can report this is partially working, at least from my inexperienced opinion.
Site in question (wifes side business)
http://www.drake.pro/?product=eat-drink-and-be-marriedThe “paper options” link in the form needs to anchor to the tabs labelled “paper options”.
http://www.drake.pro/?product=eat-drink-and-be-married#tab-paper-options
The link doesn’t seem to work. Im guessing, but from what i’ve read trying to fix this myself before you released 1.3 it may be because the tab (and therefore the anchor) doesn’t load until needed (clicked). I can prove this: by clicking on the tab manually (then clicking back to another tab) going back to top then re-trying the link which then works.
I hope this makes sense.
EDIT: Interestingly the anchor link works when clicked directly (i.e above) from external website. But not with the page itself. So perhaps my theory is wrong ?
KeymasterHi,
Thank you for let us know this behavior.
The cause of the problem was that the anchor links are handled differently by the browsers depending on if the links are on the same page than the anchor. (If a link is on the same page than the anchor, then the page is not reloaded.)
So different solution is needed for this two cases.
We have implement this, in v1.0.14 version. It is available under MY ACCOUNT menu in webshoplogic.comPlease let us know if you need some more refinement to make the perfect solution.
Peter
-
AuthorPosts
- You must be logged in to reply to this topic.