Archived topic
add to cart error 500
9 replies · Started by Jean on August 25, 2020
Hi there,
I use a generatepress child theme & gp premium, with woocommerce and MultiEventCalendar plugin and his Woocommerce addon.
When I purchase an event, the add-t-cart function doesn't works neither the cart page.
When I deactivate generatepress, it work's fine.
I've activaded and deactivated woocommerce element. No change.
Can I have some help please ?
Thaks for help
Hi there,
can you try it without your child theme?
Hi David,
mmm I tried and... it work's.
Where can be the problem ?
Do you have any custom templates or functions in your child theme?
Yes, only theese one :
//-------------------------------------------------------------------------------//
// Templates
//-------------------------------------------------------------------------------//
function oueb_content() {
ob_start();
if(is_front_page()) {
//echo get_the_content();
get_template_part('templates/content_home');
} else {
echo get_the_content();
get_template_part('templates/content_home');
}
$apply_content = ob_get_clean();
return $apply_content;
//return $content;
}
add_filter('the_content','oueb_content');
function oueb_before_page_title(){
ob_start();
$postID = get_the_ID();
$thumbnailID = get_post_thumbnail_id($postID);
$featured_image_src = wp_get_attachment_image_url($thumbnailID,'full');
$title = esc_html(get_the_title($postID));
?>
<div class="latelier_featured_image" style="background-image: url('<?= $featured_image_src;?>');padding: 100px 0">
<div class="latelier_entry_title">
<h1 class="entry-title" itemprop="headline"><?= $title;?></h1>
</div>
</div>
<?php
$apply_content = ob_get_clean();
echo $apply_content;
}
add_action('generate_before_page_title','oueb_before_page_title');
Can you try removing them to see if they are the issue ?
OK... thnks to you, I found the problem. It was a jquery enqueue script.
Aha - glad to hear you found the issue :)
Thanks again
You're welcome