New Landing How can we help? Cardinal Global single product sidebar not working

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Cardinal
  • #311149
    lessormore
    Member
    Post count: 5

    Hi there,

    I know I can set a sidebar for specific product pages in the product meta, however, I want to use a global sidebar for all single product pages.

    In the Theme options under ‘Woocommerce Options -> Product Options’ I can see the options ‘Default Product Sidebar Config’, which I’ve set to ‘Right Sidebar’ and the option ‘Default Product Right Sidebar’ to ‘Sidebar One’.

    However, the sidebar does not appear on single products. I’ve disabled my child theme templates and even disabled my child theme but to no avail; no sidebar appears.

    Please advice.

    Kind regards,

    Koen

    #311305
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you update your theme version?

    https://www.dropbox.com/s/qzzpbsyru5w405u/Screenshot%202017-01-24%2018.46.25.png?dl=0

    I’m seeing the sidebar. Can you provide an example where it isn’t showing?
    https://www.dropbox.com/s/kzwogdsxvxxgyf2/Screenshot%202017-01-24%2018.47.42.png?dl=0

    -Rui

    #311342
    lessormore
    Member
    Post count: 5

    Hi Rui,

    Thanks for your response.

    The Napsack is actually the only product that has a sidebar because I’ve set it manually in the product’s meta options. Good catch though 😉

    All other products to not have a sidebar (e.g. http://monk.lessormore.nl/shop/product/boeken/espresso-lessons-rock-warriors-way/)

    I’ve also just updated the theme, but to no avail.

    Please advice.

    Kind regards,

    Koen

    #311606
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Just checked with the development team and the default sidebars don’t apply to the single product page. They only work in the shop pages. That’s why you can’t see it working.

    -Rui

    #311611
    lessormore
    Member
    Post count: 5

    Hi Rui,

    That’s very strange, especially because the option is clearly organised under Woocommerce Options -> Product options, not the Shop options.

    I think a mistake has been made in the development because under shop Options it has this option: WooCommerce Sidebar Config
    Choose the sidebar config for WooCommerce shop/category pages.

    And under the Product Options there’s this one: Default Product Sidebar Config
    Choose the sidebar config for WooCommerce shop/category pages.

    This means the option is either duplicate or a strange sort of option. Surely you can’t expect your customers to go through hundreds of products to manually set the sidebar for each product!?

    Could you please offer a solution.

    Thanks!

    Koen

    #311934
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Koen,

    Apologies, this was my mistake. They are for products, but the description was wrong – we’ve changed this for the next update. They do set the default for products, that are new products and products that are existing but not saved since changing to Cardinal.

    If you have old products that don’t have the sidebar set as matched in the theme options, when you edit the product do the sidebar settings match what is set there?

    – Ed

    #312143
    lessormore
    Member
    Post count: 5

    Hi Ed,

    Basically all my existing products (created while the Cardinal theme was active) do not have sidebars, only 1 test product in which we’ve set it manually has a sidebar (Napsack).

    Sidebar meta for all products (old and new) is automatically set to ‘No Sidebars’. Maybe this overrules the general sidebar setting in the theme options?

    I believe I have attached login details to this thread if you want to check out the CMS.

    Kind regards,

    Koen

    #312410
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Koen,

    The Theme Option global setting will set the default setting to be used within the Meta Options, so when you create a save a new product you will not need to set the product sidebar meta option.

    To override this, you would need to modify the meta-options located here within a child theme: /themes/cardinal/includes/meta-boxes.php.

    You can locate and set the options:

    	    /* PRODUCT SIDEBARS */
    	    $default_product_sidebar_config = $sf_options['default_product_sidebar_config'];
    	    $default_product_left_sidebar   = $sf_options['default_product_left_sidebar'];
    	    $default_product_right_sidebar  = $sf_options['default_product_right_sidebar'];
    	
    	    if ( $default_product_sidebar_config == "" ) {
    	        $default_product_sidebar_config = "no-sidebars";
    	    }
    	    if ( $default_product_left_sidebar == "" ) {
    	        $default_product_left_sidebar = "Sidebar-1";
    	    }
    	    if ( $default_product_right_sidebar == "" ) {
    	        $default_product_right_sidebar = "Sidebar-1";
    	    }
    #312470
    lessormore
    Member
    Post count: 5

    Hi David,

    Thanks for the explanation, I’ve got it working now but instead hard-coded the sidebar into the single products template only.

    I hope you don’t mind me being upfront but the way the global sidebar option works contradicts the behaviour of all other WP theme’s I have used so far.

    A global theme option should not alter a post’s meta on creation, but rather override all posts with a default meta value. Only if a post has a set meta value, the post’s value overrules the global value.

    Looking at the code in single-product.php this fix should be very easy for you to make and for a better user experience, I would suggest this featured to be altered as I suggested.

    Thanks again for the reply.

    Kind regards,

    Koen

    #312471
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Koen,

    I’ll pass this back to Ed for clarification and consideration. You could acheive this using a child theme and the above instructions as a starting point.

    Thanks.

    #312828
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Koen,

    The issue here is that when a post is saved, the value for the meta option is set for each option, and there is no blank default for those settings, so the default value is always saved.

    We are considering alternatives for this setup, I can understand your point on the setup, and if we added a blank option as default, then it would use the global default.

    – Ed

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register