Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › product and 1st gallery images displayed instead of Product Image Only
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › product and 1st gallery images displayed instead of Product Image Only
- This topic has 35 replies, 5 voices, and was last updated 10 years by Kyle – SUPPORT.
-
Posted in: Neighborhood
-
September 11, 2014 at 12:18 pm #109544
Hi,
Open a new support topic, so you can provide us the details with total security in a private reply.
-Rui
September 11, 2014 at 12:18 pm #109545@jakekeeling1981 no need to create a new ticket, please post your login credentials via private reply
– Kyle
September 11, 2014 at 12:41 pm #109554This reply has been marked as private.September 11, 2014 at 4:28 pm #109728We have content-product.php in public_html/wp-content/themes/neighborhood-child/woocommerce and a new version in public_html/wp-content/themes/neighborhood/woocommerce after update today.
Please be specific regards what needs copying, e.g. complete file or just some code.
September 11, 2014 at 4:34 pm #109731@4boards will forward to the developer so he can reply you.
-RuiSeptember 11, 2014 at 9:37 pm #109821This is the code that has changed:
Line 54+
<?php if ($product_overlay_transition) { if ($overlay_transition_type == "slideleft") { ?> <figure class="product-transition-alt"> <?php } else if ($overlay_transition_type == "fade") { ?> <figure class="product-transition-fade"> <?php } else { ?> <figure class="product-transition"> <?php } ?> <?php } else { ?> <figure class="no-transition"> <?php } ?>
Line 103+
if ( version_compare( WOOCOMMERCE_VERSION, "2.0.0" ) >= 0 ) { $attachment_ids = $product->get_gallery_attachment_ids(); $img_count = 0; if ($attachment_ids) { echo '<div class="product-image">'.$image_html.'</div>'; foreach ( $attachment_ids as $attachment_id ) { if ( sf_get_post_meta( $attachment_id, '_woocommerce_exclude_image', true ) ) continue; echo '<div class="product-image second-image">'.wp_get_attachment_image( $attachment_id, 'shop_catalog' ).'</div>'; $img_count++; if ($img_count == 1) break; } } else { echo '<div class="product-image">'.$image_html.'</div>'; echo '<div class="product-image second-image">'.$image_html.'</div>'; }
– Ed
September 11, 2014 at 9:38 pm #109822@jakekeeling1981 – checking your site and all looks good here? https://www.dropbox.com/s/sh25m4yulxncfti/Screenshot%202014-09-11%2022.38.46.png?dl=0
– Ed
September 12, 2014 at 9:52 am #110010Ed
It looks good because my developer added this code to the CSS.
.product-details img
{
display:none !important;
}Kyle said this isn’t a reliable workaround. Can you suggest something better?
Ed, please read the topic from the start, then we won’t have to go over the same ground to bring you up to speed.
September 12, 2014 at 9:58 am #110012Apologies, I was looking at the wrong site. That works fine 🙂
– Kyle
September 13, 2014 at 12:03 am #110274I did check the topic – just your issue is different it seems.
The image there is being output by a WooCommerce function which we remove from the action hook – so unless you are adding this back in, or have removed our code, it wouldn’t appear with the default Neighborhoood theme..
– Ed
September 13, 2014 at 10:13 am #110316Here is function.php in the child theme;
<?php
add_filter(‘comment_form_default_fields’, ‘unset_url_field’);
function unset_url_field($fields){
if(isset($fields[‘url’]))
unset($fields[‘url’]);
return $fields;
}add_action(‘after_setup_theme’, ‘remove_admin_bar’);
function remove_admin_bar() {
if (!current_user_can(‘administrator’) && !is_admin()) {
show_admin_bar(false);
}
}add_filter( ‘woocommerce_price_trim_zeros’, ‘wc_hide_trailing_zeros’, 10, 1 );
function wc_hide_trailing_zeros( $trim ) {
// set to false to show trailing zeros
return true;
}add_filter( ‘wc_product_enable_dimensions_display’, ‘__return_false’ );
Please advise if this is OK or should additional code be added.
September 13, 2014 at 8:53 pm #110369@4boards – That seems fine to me. Do you have any other template files in your child theme?
– Ed
September 14, 2014 at 12:51 pm #110417Here is structure and files in child theme folders;
public_html/wp-content/themes/neighborhood-child
Files; functions.php
Style.csspublic_html/wp-content/themes/neighborhood-child/woocommerce
Files; content-product.php
public_html/wp-content/themes/neighborhood-child/woocommerce/cart
Files; cart-shipping.php
cart.phpCopies of the files attached.
Attachments:
You must be logged in to view attached files.September 14, 2014 at 12:55 pm #110419As PHP upload not allowed, have submitted as .TXT
Attachments:
You must be logged in to view attached files.September 14, 2014 at 8:45 pm #110443See my code here: http://support.swiftideas.net/forums/topic/product-and-1st-gallery-images-displayed-instead-of-product-image-only/page/2/#post-109821
You need to update your content-product.php file.
– Ed
-
Posted in: Neighborhood
You must be logged in to reply to this topic.