Tagged: related products, woocommerce
-
AuthorPosts
-
July 27, 2015 at 4:29 pm #479145
Hi,
I’d like to put the related products and “You may also like” section above the tab section. Is there any way to do that in the functions.php of the child theme, so that it is update secure?
BTW: I use a sidebar on the right.
Thank you
WolframJuly 28, 2015 at 8:21 am #479494Hey gagern!
Could you provide us with a link to the site in question so that we can take a closer look please?
Cheers!
RikardJuly 28, 2015 at 9:23 am #479519Ok, I provide the link in the private content…
July 28, 2015 at 2:47 pm #479737Just to make it clear: I have no tabs on my product page. But nevertheless the “You may also like”/Upsells section should be above the position where the tabs normally are ;-) It should be on the left of the sidebar, not under the sidebar.
Thank you ;-)
August 2, 2015 at 5:22 am #481739Hey!
Can you post a screenshot/mockup of what would you want to achieve?
Best regards,
JosueAugust 3, 2015 at 12:31 pm #482045Hi Josue,
now it’s like this:
And that’s how it should look like:
Any help appreciated ;-)
Best regards
WolframAugust 3, 2015 at 6:37 pm #482354Hi,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueAugust 4, 2015 at 1:41 pm #482660Hi Josue,
pls. see private content
Regards
WolframAugust 6, 2015 at 9:23 am #483747Any idea?
August 6, 2015 at 10:58 am #483781I solved it with this code in the functions.php. The upsells/”you may also like” section than is in a tab:
/* Upsell Hook */ // Remove the WooCommerce Upsell hook remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); // Add a custom action to display Upsells add_action( 'growdev_after_single_product_summary', 'woocommerce_upsell_display', 15 ); if ( ! function_exists( 'woocommerce_output_upsells' ) ) { function woocommerce_output_upsells() { woocommerce_upsell_display( 10,5 ); // Display 10 products in rows of 5 } } // A filter to add a custom tab add_filter('woocommerce_product_tabs','growdev_add_tab'); // Callback for add_filter that defines the filter. You can change 'New tab' to the desired // tab title // growdev_custom_tab is the function callback function growdev_add_tab( $tabs ) { $tabs['upsell_tab'] = array( 'title' => 'Passende Produkte:', 'priority' => 29, 'callback' => 'growdev_custom_tab'); return $tabs; } // The function callback for the custom tab. // This does the display upsells action inside of the tab function growdev_custom_tab( $key, $tab ) { do_action('growdev_after_single_product_summary'); }
Little problem: the tab title stays there even if there is no upsell product. Do you have a solution for that?
August 7, 2015 at 2:23 am #484243Hey!
Can you post a link to a Product where this (no upsell product) occurs?
Cheers!
JosueSeptember 1, 2015 at 12:05 pm #496370Hi Josue,
sorry for the late answer. You’ll find the link in the private content.
Regards
WolframSeptember 1, 2015 at 11:27 pm #496767Hey!
Try adding this code to the Quick CSS:
#tab-upsell_tab:empty { background-color: white; height: 30px; position: relative; z-index: 10; top: 0; }
Cheers!
JosueSeptember 2, 2015 at 9:47 am #496935Hi Josue,
thank you, worked for all browsers but FF. But I could resolve it this way:#tab-upsell_tab:empty, #tab-upsell_tab:-moz-only-whitespace {
background: white none repeat scroll 0% 0% !important;
height: 30px !important;
position: relative !important;
top: 0px !important;
z-index: 10 !important;
}Regards
Wolfram -
AuthorPosts
- The topic ‘Woo: Related products .. above tabs’ is closed to new replies.