Forum Replies Created
-
AuthorPosts
-
September 24, 2014 at 1:03 pm in reply to: Woocommerce Upsells on Product Single Page doubled #324213
Hi Ismael,
this code didn´t work because the product tabs div is overlapping the whole page now. I found another solution which is working for me with a data table and custom fields instead. The div is overlapping the whole item-loop div too but it is a solution which I can live with…
The only problem is that the data table div isn´t after the item-loop and the sidebar which will cause problems if the item-div is too high so that the text in the item-loop div and the data-table div might overlap because they both come right after the breadcrumps div… This problems are caused because I´m working with Yigits code which puts the item image, the item-loop and the sidebar in different divs (to show a sidebar on single product pages). I´m thinking about a solution of closing out all divs of the shop-loop and then hook in the data table but the divs are opened in too many files and I would have to comment them out and close them before the function of the data table. Well, I´m going to use my solution now and thank you for your support :)
Regards, TobiasSeptember 20, 2014 at 11:13 pm in reply to: Woocommerce Upsells on Product Single Page doubled #322472Hi Ismael,
thank you for the hint which located the double output in James Kosters little plugin WooCommerce Product Details Customiser. The upsell-output was checked and therefore the config.php and the little plugin displayed the upsells. I unchecked the upsells in the plugin and removed the comments in the config.php so everything is fine except that I have to style the alternate div now ;)Do you have a further hint about the extra div for the tabs-content to bring it down under the rest of the single-product output and stretch it 100% under the two (in my case) other product-columns?
Thanks for your help so far!
Cheers,
TobiasSeptember 16, 2014 at 2:45 pm in reply to: Woocommerce Upsells on Product Single Page doubled #319887Okay guys I “solved” the problem but only with directly coding into config.php of parent-enfold, I comment out the folliwing passage with the result I wanted but I think there should be an update-secure opportunity too, maybe somebody can help me ;)
/* add_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_display_output_upsells', 30); //display the related products and upsells function avia_woocommerce_display_output_upsells() { global $avia_config; $products = $avia_config['woo_upsells'].$avia_config['woo_related']; if(!empty($products)) { $output = "</div></div></div>"; $output .= '<div id="av_section_1" class="avia-section alternate_color avia-section-small container_wrap fullsize"><div class="container"><div class="template-page content twelve alpha units">'; $output .= $products; echo $output; } } */
September 15, 2014 at 2:57 pm in reply to: Woocommerce Upsells on Product Single Page doubled #319219I forgot to tell you that I´m using some more code from Yigit in the functions.php to be able to show the categories on the single product page as well, here is the code from the functions.php as it is now:
<?php # # wrap single product image in an extra div # add_action( 'woocommerce_before_single_product_summary', 'avia_add_image_div', 2); add_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div', 20); function avia_add_image_div() { echo "<div class='four units single-product-main-image alpha'>"; } function avia_close_image_div() { global $avia_config; $avia_config['currently_viewing'] = "shop_single"; echo "</div>"; } # # wrap single product summary in an extra div # add_action( 'woocommerce_before_single_product_summary', 'avia_add_summary_div', 25); add_action( 'woocommerce_after_single_product_summary', 'avia_close_summary_div', 3); function avia_add_summary_div() { echo "<div class='five units single-product-summary'>"; } function avia_close_summary_div() { echo "</div>"; //close out the summary echo "<div class='three units single-product-sidebar'>"; get_sidebar(); echo "</div>"; } # end wrap single product image in an extra div # bring Woocommerce card to bottom on Single Product Pages remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 45 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 60 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 70 ); # remove related products on Single Product Pages function wc_remove_related_products( $args ) { return array(); } add_filter('woocommerce_related_products_args','wc_remove_related_products', 10);
There is a second question now watching my single product page. Is it possible to move the tabs-output in an extra container to show it under the rest of the product (image, name, price…) with alignment at the left border of the page with stretching 100% towards the sidebar. I´m thinking about css but php would be more appropriate regarding that the rest of the product-showing is also written in php ;)
Best regards and thank you for your reply,
TobiasSeptember 15, 2014 at 11:39 am in reply to: Woocommerce Upsells on Product Single Page doubled #319117Yes, I removed the output of the related products in the child´s function.php with the following code:
function wc_remove_related_products( $args ) { return array(); } add_filter('woocommerce_related_products_args','wc_remove_related_products', 10);
-
AuthorPosts