stuartgre
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Variable product, automatically select options with exact matchOk, for any one else looking for this kind of functionality, this is how I did it
$(‘select#name option’).each(function(i) {
$(this).attr(‘data-id’, i);
});$(‘select#name’).on(‘change’, function() {
$(‘select#dimensions’).find(‘option’).eq($(this).find(‘:selected’).data(‘id’)).attr(‘selected’, ‘selected’);
$(‘select#product-code’).find(‘option’).eq($(this).find(‘:selected’).data(‘id’)).attr(‘selected’, ‘selected’);
});I first gave each option a unique identifier (an ID) and then on change of the select passed in the ID to the eq() method and applied this to any variation I required be updated.
Hope this helps someone else out.
Forum: Plugins
In reply to: [WooCommerce] how to create multiple templates?If you haven’t already figured out a solution, I think the way I would do it would be to in the single-product.php file use the has_term() function. e.g.
if ( is_product() && has_term( ‘category’ ) ):
// use this
else
// use this
endif;Hope this helps.
Forum: Plugins
In reply to: [Gutenberg] Shortcode shows in GutenbergYes, I did a bit of research and found that you have to return values rather than printing them for the shortcodes to work properly in Gutenberg.
Forum: Plugins
In reply to: [Custom Post Type UI] 400 Bad Gateway with 2 or more categoriesThe link comes up as it should in the backend, it’s only when I view the actual page itself that I get the error and it says %product_categories% instead of the actual link
Forum: Plugins
In reply to: [Atomic Blocks - Gutenberg Blocks Collection] 2 Questions about Atomic BlocksGreat, thank you for your answers ?? In the meantime is there any way to update the custom color palette by any chance?
Forum: Plugins
In reply to: [WP Store Locator] name field not recognisedYeah I think that was the problem, the encoding ??
Thanks for the help anyway! Great plugin.
Forum: Plugins
In reply to: [WP Store Locator] name field not recognisedIt’s fine, figured it out
Have to export the csv from Google Docs not Excel
Btw I wasn’t asking for an addon–just if you or anyone else had seen something similar before.