Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #839805

    Hi,
    Thank you for a great theme.
    I enabled a right sidebar on single product pages to make it easier to navigate. But doing that moved cross-sells and related products beneath the sidebar which means that customers probably don’t see them. Is it possible to move cross-sells up underneath the product?

    #839808

    Hi,

    Could you post a link to the page please.

    I’d hazard a guess that you may have used a full width element in the layout builder. This will have the effect of moving the sidebar below such elements to preserve the full-widthness. (not the best explanation I know)

    Thanks

    TJ

    #839826

    Hi,
    I did post a link in the private data section, but in case you can’t see it here is a link: http://www.nederkjaersholm.dk/shop/hvid-keramik-skaal/

    I don’t use the advanced layout builder.

    I implemented this code in my function file:

    add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_image_div’, 2);
    add_action( ‘woocommerce_before_single_product_summary’, ‘avia_close_image_div’, 20);
    function avia_add_image_div()
    {
    echo “<div class=’single-product-main-image alpha’>”;
    }

    function avia_close_image_div()
    {
    global $avia_config;
    $avia_config[‘currently_viewing’] = “shop_single”;

    echo “</div>”;
    }

    add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_summary_div’, 25);
    add_action( ‘woocommerce_after_single_product_summary’, ‘avia_close_summary_div’, 3);
    function avia_add_summary_div()
    {
    echo “<div class=’single-product-summary’>”;
    }

    function avia_close_summary_div()
    {
    echo “</div>”; //close out the summary
    get_sidebar();
    }

    #841248

    Hi,

    Sorry for the late reply. Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #843792

    of course

    #845384

    Hi,

    Sorry for the late reply!

    Login credentials did not work for me. Please try using the code as following

    add_action( 'woocommerce_before_single_product_summary', 'avia_add_image_div', 2);
    add_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div', 20);
    function avia_add_image_div()
    {
    echo "<div class='single-product-main-image alpha'>";
    }
    
    function avia_close_image_div()
    {
    global $avia_config;
    $avia_config['currently_viewing'] = "shop_single";
    
    echo "</div>";
    }
    
    add_action( 'woocommerce_before_single_product_summary', 'avia_add_summary_div', 25);
    add_action( 'woocommerce_after_single_product_summary', 'avia_close_summary_div', 3);
    function avia_add_summary_div()
    {
    echo "<div class='single-product-summary'>";
    }
    
    
    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 20);
    add_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 2);
    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_upsells', 21);
    add_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_upsells', 2);
    remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_display_output_upsells', 30);
    add_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_display_output_upsells_new', 2);
    function avia_woocommerce_display_output_upsells_new()
    {
    	global $avia_config;
    
    	$products = $avia_config['woo_upsells'].$avia_config['woo_related'];
    
    	if(!empty($products))
    	{
    
    		$output  = "</div>";
    		$output .= '<div class="main_color avia-section-small"><div class="container"><div class="template-page content  twelve alpha units">';
    		$output .= $products;
    
    		echo $output;
    	}
    }
    
    function avia_close_summary_div()
    {
    echo "</div></div></div>"; //close out the summary
    		get_sidebar();
    }

    Best regards,
    Yigit

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