Archived topic
Woocommerce product display
12 replies · Started by Michel on July 29, 2019
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
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
in elements, there is nothing ... empty :-)
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
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
On the first hook you created can you edit this and make sure the Execute PHP checkbox is checked.
Unable to execute PHP as DISALLOW_FILE_EDIT is defined.
commented
define( 'DISALLOW_FILE_EDIT', false );
ok
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/
thanks
You're welcome
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?
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 :)