jpowersdev
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] to large tabs, to many charactersHi @streamcare2,
There is a length limit on meta fields, but it is very very large (4,294,967,295 characters). That is set by WordPress in your database, and it’s unlikely that you are reaching that limit.
Does the body of that text have any special characters in it? Is it regular text or does it contain HTML? If you right-click the page and click “Inspect”, you can see the browser developer tools. If you go to the “Console” and then try adding a tab again, do any error messages appear in the Console? Are you using the Save Tabs button underneath all of the product tabs, or are you just clicking Update on the entire product?
Let me know what you find,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Full width bug in first tabHi Daniele,
I see the problem. The LayerSlider is using JS to ensure that it is full-width. We need to trigger a resize event so it knows to update itself to full-width again when a tab is clicked. A quick way to do that is as follows:
Array.from(document.querySelectorAll('.tabs.wc-tabs > li > a')).map( element => element.addEventListener('click', () => window.dispatchEvent(new Event('resize'))));Let me know if that works,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Responsive for tabsHi @13patricia,
It looks like your tabs are expanding to the width of their content and not to the container. This can be changed using some CSS:
@media(max-width: 576px) { .tabs.wc-tabs { display: flex; flex-direction: column; padding: 0 1em; } }You may want to change the breakpoint to match the rest of your CSS, I just used Bootstrap’s 576px.
Let me know if that helps,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Link to open tabHi @sneike,
Awesome, I’m glad it’s working!
You can certainly remove the tab prefix, but I would suggest keeping it. Otherwise, other links that use hashes to jump to other locations on a given page would also trigger the same JS, and you’d need another way to filter out the non-tab links. Using the prefix is a quick and simple way to ensure that your JS is specific to tab links.
Let me know if you need anything else,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Link to open tabHi @sneike,
Try this instead:
document.addEventListener('click', function (event) { if (event.target.hash && event.target.hash.includes('tab-')) { // Ignore other click events event.preventDefault(); // Set up variables const tabName = event.target.hash.replace('#tab-', ''); const tabLink = document.getElementById('tab-title-' + tabName) const tab = document.getElementById('tab-' + tabName); // Click on tab title to display tab tabLink.getElementsByTagName('a')[0].click(); // Scroll to tab jQuery('html, body').animate({ scrollTop: tab.parentElement.offsetTop }, 300); } })Let me know if that helps,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Link to open tabForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Link to open tabForum: Plugins
In reply to: [Easy Forms for Mailchimp] Mailchimp Contact Form 7 integrationHi @vegagiga,
I just sent a test message and received the email. It’s double opt-in, so if I don’t click the link in the email to verify my subscription, my email address will not show up in your audience.
I went ahead and clicked the confirmation link. Can you check and see if jon@yikesinc.com is on your list?
Thanks,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Tab Content changes not SavingHi @barrettjason,
I’d love to help you but we can’t answer premium support questions on the free forums. Our plugin has a support page that will allow you to open a ticket, if you could please send your message through that.
I’ll see you over there,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Link to open tabHi @sneike,
You shouldn’t need to create a user for me to check the frontend, but if you want to send me something so I can view the page you can use my email jon@yikesinc.com
Chances are, if there are no errors, it isn’t finding any matching elements so the code to manage the scrolling etc. is not firing.
Thanks,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Link to open tabHi @sneike,
Could you provide a link to the page you are having trouble with? It probably needs a little customization to suit your theme.
As for the js error log, you can view that by right-clicking the page and selecting “Inspect” from the menu. Then if you navigate to the Console, you will see any errors the browser is reporting (along with other messages).
Jon
Forum: Plugins
In reply to: [Easy Forms for Mailchimp] Problems with Address FieldsForum: Plugins
In reply to: [Easy Forms for Mailchimp] Mailchimp Contact Form 7 integrationHi @how2conquer,
Try this instead:
const tabOpener = function(tab) { // Simulate a click on that tab. if ( typeof tab === 'string') { const currentTab = jQuery( '.' + tab + '_tab' ); currentTab.children('a').click() } // Scroll to that tab. jQuery('html, body').animate({ scrollTop: jQuery( '#tab-' + tab ).parent().offset().top }, 300); } jQuery(document).ready(function($) { const { hash } = window.location; let tab; // If a # exists in the url lets see if its a tab. if ( hash ) { tab = hash.replace('#tab-', ''); return tabOpener( tab ); } // On click we'll check to see if the event target has a tab hash. $('body').on('click', function(e) { if ( e.target.hash && ! e.target.hash.includes('#tab') ) { tab = e.target.hash.replace('#', ''); return tabOpener( tab ); } }); });Let me know if that helps,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] sql syntaxHi @edvardspektar,
The tab data is stored as serialized data, so it would be better to handle this in PHP (either as a wp-cli command or perhaps an admin page with some sort of trigger).
When loading the meta field (
yikes_woo_products_tabs) it will be accessible as an associative array, so you can check for the slug of the tab you need and add it if it doesn’t exist. I can’t speak to the WPML interaction or how that will change the strategy.As an alternative to the above strategy, our premium version of the plugin allows you to apply tabs to products based on taxonomy. In that scenario, you could add a product tag to those products and assign the tab via the global tabs interface.
Let me know if that helps,
Jon