Home › Forums › WoodMart support forum › error size guide
error size guide
- This topic has 7 replies, 2 voices, and was last updated 3 years, 3 months ago by Artem Temos.
-
AuthorPosts
-
September 10, 2021 at 8:09 am #317639
camilo517ParticipantThere is an error with the size guide If you assign a size guide to a category, but the product has two categories assigned, the size guide will not be displayed. It should be shown since that size guide is assigned to that category and that product has that category assigned even if there is another
September 10, 2021 at 9:11 am #317654
Artem TemosKeymasterHello,
Try to add the following PHP code snippet to the child theme functions.php file to fix this
function woodmart_sguide_display( $post_id = false ){ $post_id = ( $post_id ) ? $post_id : get_the_ID(); $sguide_post_id = get_post_meta( $post_id, 'woodmart_sguide_select' ); if ( isset( $sguide_post_id[0] ) && $sguide_post_id[0] === 'disable' ) { return; } if ( isset( $sguide_post_id[0] ) && !empty( $sguide_post_id[0] ) && $sguide_post_id[0] != 'none' ){ $sguide_post_id = $sguide_post_id[0]; }else{ $terms = wp_get_post_terms( $post_id, 'product_cat' ); if ( $terms ) { foreach( $terms as $term ){ if ( get_term_meta( $term->term_id, 'woodmart_chosen_sguide', true ) ) { $sguide_post_id = get_term_meta( $term->term_id, 'woodmart_chosen_sguide', true ); } } } } if ( $sguide_post_id ) { $sguide_post = get_post( $sguide_post_id ); $size_tables = get_post_meta( $sguide_post_id, 'woodmart_sguide' ); woodmart_sguide_display_table_template( $sguide_post, $size_tables ); } }
Kind Regards
September 10, 2021 at 11:11 am #317679
camilo517Participantfails
The code snippet has been disabled due to an error on line 2:Unable to redeclare the woodmart_sguide_display function.
September 10, 2021 at 11:35 am #317690
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?
Thank you in advance
September 12, 2021 at 8:48 pm #318025
camilo517ParticipantIt is a web in production
It does not allow to redeclare the function
Can you add this as an option within the theme settings?September 13, 2021 at 6:09 am #318076
Artem TemosKeymasterYes, this bug will be fixed in our next theme update as well.
September 13, 2021 at 10:13 am #318151
camilo517ParticipantEstimated date? Thanks
September 14, 2021 at 6:09 am #318347
Artem TemosKeymasterWe hope to release the update next month.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register