-
AuthorPosts
-
September 20, 2016 at 5:30 pm #689447
Hi Team,
what I have to do for showing woocommerce product detail page as formated like themesettings “alternate content”?
Thank you for help!Best regards
MikeSeptember 21, 2016 at 1:57 pm #689797No one can help?
September 22, 2016 at 8:44 am #690154Hi,
Could you post a link to the site in question so that we can take a closer look please? Also try to explain a bit further what changes you would like to make, a screenshot highlighting them might help us understand better.
Thanks,
RikardSeptember 22, 2016 at 12:28 pm #690216Hi Rikard,
send you an Link with private content.
At the Screen you see an Product Detail Page automated formated in “Main Content” (Enfold -> Styles …)
but I need automated formated in “Alternate Content Area”.
September 23, 2016 at 6:53 pm #690977Hi,
because I got no answer I had a look more at your templates…
I found in /config-woocommerce/config.php at line 580 this:
echo "<div class='container_wrap container_wrap_first main_color {$sidebar_setting} template-shop shop_columns_".$avia_config['shop_overview_column']."'>";
When I change “main_color” with “alternate_color” I got the result what I need.
But this is not the rigth way because the next update of enfold will delete my work.
What can I do? An Filter? Any idea?Thank you!
MikeSeptember 27, 2016 at 3:50 am #692039Hi,
Thank you for the info. Please add this code in the functions.php file:
add_action('init', 'ava_woocommerce_mod', 100); function ava_woocommerce_mod() { remove_action( 'woocommerce_before_main_content', 'avia_woocommerce_before_main_content', 10); add_action( 'woocommerce_before_main_content', 'avia_woocommerce_before_main_content_mod', 10); } function avia_woocommerce_before_main_content_mod() { global $avia_config; if(!isset($avia_config['shop_overview_column'])) $avia_config['shop_overview_column'] = "auto"; $id = get_option('woocommerce_shop_page_id'); $layout = get_post_meta($id, 'layout', true); if(!empty($layout)) { $avia_config['layout']['current'] = $avia_config['layout'][$layout]; $avia_config['layout']['current']['main'] = $layout; } $avia_config['layout'] = apply_filters('avia_layout_filter', $avia_config['layout'], $id); $title_args = array(); if(is_woocommerce()) { $t_link = ""; if(is_shop()) $title = get_option('woocommerce_shop_page_title'); $shop_id = woocommerce_get_page_id('shop'); if($shop_id && $shop_id != -1) { if(empty($title)) $title = get_the_title($shop_id); $t_link = get_permalink($shop_id); } if(empty($title)) $title = __("Shop",'avia_framework'); if(is_product_category() || is_product_tag()) { global $wp_query; $tax = $wp_query->get_queried_object(); $title = $tax->name; $t_link = ''; } $title_args = array('title' => $title, 'link' => $t_link); } if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title($title_args); if(is_singular()) { $result = 'sidebar_right'; $avia_config['layout']['current'] = $avia_config['layout'][$result]; $avia_config['layout']['current']['main'] = $result; } $sidebar_setting = avia_layout_class( 'main' , false ); echo "<div class='container_wrap container_wrap_first alternate_color {$sidebar_setting} template-shop shop_columns_".$avia_config['shop_overview_column']."'>"; echo "<div class='container'>"; if(!is_singular()) { $avia_config['overview'] = true; } }
Please create a note or a change log in case you update the theme. We might make a few adjustments in the function.
Best regards,
IsmaelOctober 5, 2016 at 6:02 pm #695665Hey Ismael,
great, this work! Tank you!
Best regards
Mike -
AuthorPosts
- The topic ‘Product Detail as alternate content’ is closed to new replies.