[Resolved] Woocommerce product display

Home Forums Support [Resolved] Woocommerce product display

Home Forums Support Woocommerce product display

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #970429
    Michel

    Hi,

    I have installed and imported the template options: niche

    But the product pages come out all out of phase, and even the photos don’t appear.

    example

    Thanks

    #970482
    David
    Staff
    Customer Support

    Hi there,

    can you go to Appearance > GeneratePress and check to see that the Elements module is activated. If it is then check the Appearance > Elements to see if there are these two hook elements published:

    Gallery Stack
    Close Summary Wrap

    #970492
    Michel

    in elements, there is nothing … empty 🙂

    #970514
    David
    Staff
    Customer Support

    OK so we need to create two hook Elememts:

    First Hook
    Title: Gallery Stack
    Content:

    <div class="woo-sumamry-wrap"><!-- open wrap -->
    	<div class="woo-gallery-stack hide-on-mobile">
    		<?php 
    		global $product;
    		
    		if ( has_post_thumbnail( $product->get_id() ) ) {
        	$attachment_ids[0] = get_post_thumbnail_id( $product->get_id() );
        	$attachment = wp_get_attachment_image_src( $attachment_ids[0], 'full' ); 
    			?>    
        	<img src="<?php echo $attachment[0] ; ?>"/>
    			<?php 
    		}
    
    		if ( method_exists( $product, 'get_gallery_image_ids' ) ) {
    			$product_image_ids = $product->get_gallery_image_ids();
    
    			foreach( $product_image_ids as $product_image_id ) {
    				$image_url = wp_get_attachment_url( $product_image_id, 'full' );
    				echo '<img src="' . $image_url . '">';
    			}
    		}
    	// Closing div found in Close Summary Wrap element
    	?>
    </div>

    Hook: woocommerce_before_single_product_summary
    Check Execute PHP
    Display Rules: Products > All Products

    Second Hook

    Title: Close Gallery Wrap
    Content:

    </div>
    <!-- Close gallery wrap -->

    Hook: woocommerce_after_single_product_summary
    Display Rules: Products > All Products

    #970741
    Michel

    Hi,

    Thanks

    I put the two Hooks

    But it gives me a mistake here it is:

    https://nerdpick.com/shop/action-figures/6x-connectors-matchbox-action-figures-perfetti-misb/

    In addition also related products, shop display, and in home page last 5 products, the layout layout of the theme niche is no longer present 🙁

    thanks

    #970939
    David
    Staff
    Customer Support

    On the first hook you created can you edit this and make sure the Execute PHP checkbox is checked.

    #970945
    Michel

    Unable to execute PHP as DISALLOW_FILE_EDIT is defined.

    #970949
    Michel

    commented

    define( ‘DISALLOW_FILE_EDIT’, false );

    ok

    #970966
    David
    Staff
    Customer Support

    Awesome – so product page is fixed 🙂
    So the home page is different because i assume when you imported the site you didn’t import the content or it didn’t load ( which is why those hook elements were missing).

    To match the home page you would need to build it from scratch. The page is really simple.
    At the top of the page is a 2 column section with the first column containing: Heading, Separator, Text and Button Blocks.

    The categories and products are being displayed using a Shortcode Block and the Woocommerce shortcodes found here:

    https://docs.woocommerce.com/document/woocommerce-shortcodes/

    #970980
    Michel

    thanks

    #971201
    David
    Staff
    Customer Support

    You’re welcome

    #1147471
    Edward

    Hi,

    I’m having the same problem here with my images.

    Unable to execute PHP as DISALLOW_FILE_EDIT is defined.

    in my wp-config there is define( ‘DISALLOW_FILE_EDIT’, false );

    Can you help?

    #1147586
    Leo
    Staff
    Customer Support

    Might be a security plugin that’s causing this as well.

    Have you tried disabling all plugins to test?

    If not any chance you can open a new topic for the question?

    Thanks 🙂

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.