0

I have a big problem - I copied the archive-product.php of my shop - and I something get wrong!! my Shop is not working anymore - now I get the ERROR:

Parse error: syntax error, unexpected end of file in /home/autocen5/www/autocen5.myhostpoint.ch/wordpress/wp-content/themes/royal/woocommerce/archive-product.php on line 63

I think I forget something in the end ?? here is my code - what did I wrong??

<?php                   
/**                 
 * The Template for displaying product archives, including the main shop page which is a post type archive.                 
 *                  
 * Override this template by copying it to yourtheme/woocommerce/archive-product.php                    
 *                  
 * @author      WooThemes           
 * @package     WooCommerce/Templates               
 * @version     2.0.0                   
 */                 

    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly                

    get_header( 'shop' );               

    $l = et_page_config();              

    $full_width = etheme_get_option('shop_full_width');             

    if($full_width) {               
        $l['content-class'] = 'col-md-12';          
        $l['sidebar'] = 'without';          
    }               

    /**             
     * woocommerce_before_main_content hook             
     *              
     * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)               
     * @hooked woocommerce_breadcrumb - 20              
     */             

    do_action( 'woocommerce_before_main_content' );             
?>                  


<div class="<?php echo (!$full_width) ? 'container' : 'shop-full-width'; ?>">                   
    <div class="page-content sidebar-position-<?php echo esc_attr( $l['sidebar'] ); ?> sidebar-mobile-<?php esc_attr_e( $l['shop-sidebar-mobile'] ); ?>">               
        <div class="row">           

            <div class="content main-products-loop <?php esc_attr_e( $l['content-class'] ); ?>">        
                <div class="<?php echo ($full_width) ? 'container' : ''; ?>">                   
                    <?php etheme_category_header();?>
                    <?php do_action( 'woocommerce_archive_description' ); ?>
                </div>                  

                <div class="shop-filters-area"> 
                    <?php if(!function_exists('dynamic_sidebar') || !dynamic_sidebar('shop-widgets-area')): ?>
                    <?php endif; ?>
                </div>  


                <?php if ( have_posts() ) : ?>  

                    <?php if (woocommerce_products_will_display()): ?>
                        <div class="filter-wrap">               
                            <div class="filter-content">            
                                <?php       
                                    /** 
                                     * woocommerce_before_shop_loop hook    
                                     *  
                                     * @hooked woocommerce_result_count - 20    
                                     * @hooked woocommerce_catalog_ordering - 30    
                                     * @hooked et_grid_list_switcher - 35           

or here with the picture: enter image description here

thank you for helping me!!!

Sabrina

  • please show your full file code with line no. 63 – Jignesh Patel Dec 18 '17 at 8:59
  • above - there is the whole file code - LINE no. 63 - is the last one with the * @hooked et_grid_list_switcher - 35 – Sabrina Dec 18 '17 at 9:25
  • Well a huge chunk of the file is missing. Only the theme developer could tell you what's missing. If you have the original, try copying it again, or download the theme again and copy from there. – Jacob Peattie Dec 18 '17 at 12:43
  • but there is just a little thing in the end missing - not?? I copied everything in the question again - can you have a look again - you should see the whole code now - I put a picture of it on the top. Thank you so much Jacob. – Sabrina Dec 18 '17 at 13:04
  • @Sabrina I strongly recommend you install Atom/SublimeText, both can be used for free and are significantly better at reading or editing code than Spreadsheet software. However it looks like you only copied part of the code, not all of it – Tom J Nowell Dec 18 '17 at 13:15
0

Your copy of archive-product.php is incomplete, notice the PHP comment at the end that talks about something, but the comment is cut off and never gets closed, and the thing it talks about never appears? Deleting the copied file will unbreak your site.

Then copy it again in full. Ideally, do it via filesystem copy, e.g. right click copy and paste on the file, rather than opening the file and copying its contents in a text editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.