Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #816025

    Is there a trick to get the PRODUCTS display in WooCommerce to use the correct sidebar?

    On all the other pages of my demo website, the sidebar displays correctly:
    http://jewellery.waltoncreative.com

    BUT on all of the PRODUCT pages, the sidebar displays below the image in wrong formatting:
    http://jewellery.waltoncreative.com/product/silver-heart-shaped-earrings/

    As far as I can see the only way to get the sidebar to display correctly is to use Enfold’s “Advanced Layout Editor” but this then means each product (of 5000) needs to be created from scratch rather than using the WooCommerce image features.

    Any thoughts or suggestions?

    • This topic was modified 7 years, 4 months ago by ColinWalton.
    #817153

    Hey ColinWalton,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #817159

    Great – here we are…

    #817481

    Hi ColinWalton,

    Please refer to this thread for a possible solution.

    Best regards,
    Victoria

    #817498

    Great thank you that’s very good. For the rest of the website I think the sidebar looks best on the LEFT.

    Is there anyway of altering the function / CSS to place the sidebar on the LEFT instead of the right?

    #817655

    Hi ColinWalton,

    The way people assess information on the web is left to right, top to bottom and the left top-center should be your product, not the sidebar info. The way it is now, looks very natural, but if you really need to have it on the left, we’ll try to come up with something.

    Let me know what you think.
    Best regards,
    Victoria

    #817702

    That may well be true. But for me the sidebar in this instance is meant to be read first – so really HAS to be on the left.

    I have every faith you can work a miracle! thank you x

    #817750

    Hi ColinWalton,

    You could try a different action

    
    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }
    

    and adjust float to right, if left does not work for you. (Keep all the code form before)

    Best regards,
    Victoria

    #817801

    Sorry, I can’t get this to work. Where EXACTLY should this extra function go?

    If I put it at the end I either get a blank screen or the loading icon continues and page does not load. I have tried replacing the previous function about the right hand side bar and this has the same effect.

    Can you possibly give me the whole script with the LEFT sidebar function in position please?

    Sorry to be a pain!

    #818065

    Hi Colin,

    The code Victoria sent you in her last reply should go into the end of the functions.php file in your child theme, please try that out.

    Best regards,
    Rikard

    #818139

    Hiya, as I said, I have already tried that. If I put if after THE PREVIOUS CODE Victoria said to keep in – all I get is a blank screen.

    This is the code I have already:

    // fixes the sidebar to add correctly to PRODUCTS PAGES
    add_action('init','ava534345953_init', 50);
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    }
    
    function avia_close_image_div() {
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    
    }

    If I add THIS afterwards:…

    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }

    I end up with a blank screen. I think the various functions are fighting against each other somehow?

    TO SUM UP – THIS IS THE CODE AS I HAVE IT NOW…

    // fixes the sidebar to add correctly to PRODUCTS PAGES
    add_action('init','ava534345953_init', 50);
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    }
    
    function avia_close_image_div() {
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    
    }
    
    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }
    #818751

    Hi ColinWalton,

    Function with adding the action has to be only one. Sorry, if I wasn’t clear enough.
    Remove this one:

    
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    }
    

    So you should get this:

    
    // fixes the sidebar to add correctly to PRODUCTS PAGES
    add_action('init','ava534345953_init', 50);
    
    function avia_close_image_div() {
    	echo "</div>";
    }
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    
    }
    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }
    

    Best regards,
    Victoria

    #818754

    Hi Victoria,

    Thank you for your work on the problem.

    I have changed the function file as suggested. But I am afraid things go a bit weird:

    http://jewellery.waltoncreative.com/product/silver-st-christopher/

    • This reply was modified 7 years, 4 months ago by ColinWalton.
    #818767

    I have changed the CSS, so it almost works now.

    All I need to do is to float the product text panel to the right of the main image.

    http://jewellery.waltoncreative.com/product/silver-necklace/

    #818773

    PS – I think you have sorted it now for me – THANK YOU !

    I think I can fix the other odd things with CSS.

    Thanks again.

    Colin x

    #819303

    Hi ColinWalton,

    Glad we got it working for you! :)

    I looked at you page, looks just like you wanted! Great job!

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #819323

    Thanks to you! It’s amazing what can be done with CSS.

    Let’s hope the client realises all the effort that has gone into it!

    Thanks again Colin x

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