-
AuthorPosts
-
June 19, 2016 at 7:43 pm #650468
Hi Support,
I would like to add the ‘Show Details’ button on the overview page back. At the moment, the shop overview page only shows the ‘Visit the storet’ button. I have this in affiliate mode and would like back the button, please?
Thanks
VincentJune 21, 2016 at 3:27 am #651191Hey Vincent,
Thank you for using Enfold.
Could you please provide a link to the page? How did you set the shop to affiliate mode?
Best regards,
IsmaelJune 21, 2016 at 11:47 am #651415Hi Ismael,
Hee is a link to the page (In private area).
Thanks
VincentJune 23, 2016 at 4:23 am #652442Hi,
I see. I totally forget about that type. Please add this in the functions.php file:
add_action('after_setup_theme', 'ava_product_mod', 50); function ava_product_mod() { remove_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button', 16); add_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button_mod', 16); } function avia_add_cart_button_mod() { global $product, $avia_config; if ($product->product_type == 'bundle' ){ $product = new WC_Product_Bundle($product->id); } $extraClass = ""; ob_start(); woocommerce_template_loop_add_to_cart(); $output = ob_get_clean(); if(!empty($output)) { $pos = strpos($output, ">"); if ($pos !== false) { $output = substr_replace($output,"><span ".av_icon_string('cart')."></span> ", $pos , strlen(1)); } } if($product->product_type == 'variable' && empty($output)) { $output = '<a class="add_to_cart_button button product_type_variable" href="'.get_permalink($product->id).'"><span '.av_icon_string("details").'></span> '.__("Select options","avia_framework").'</a>'; } if(in_array($product->product_type, array('subscription', 'simple', 'bundle', 'external'))) { $output .= '<a class="button show_details_button" href="'.get_permalink($product->id).'"><span '.av_icon_string("details").'></span> '.__("Show Details","avia_framework").'</a>'; } else { $extraClass = "single_button"; } if(empty($extraClass)) $output .= " <span class='button-mini-delimiter'></span>"; if($output && !post_password_required() && '' == avia_get_option('product_layout','')) { echo "<div class='avia_cart_buttons $extraClass'>$output</div>"; } }
Best regards,
IsmaelJune 23, 2016 at 3:19 pm #652624Thanks, Ismael, that looks nice :) and I appreciate your help.
All solved now.
Vincent
June 27, 2016 at 3:55 pm #653833Hi,
glad we could help. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.
Best regards,
Andy -
AuthorPosts
- The topic ‘Add Back 'Show Details' Button in Affiliate Mode’ is closed to new replies.