• I am trying to change my theme appearance for the “product catalog” page to disable the “view details” and “add to cart” buttons that overlay on top of the product photos. YITH documentation shows this is an option but in my environment those options are missing. Please let me know if anyone knows how to help!

    https://docs.yithemes.com/yith-proteo/shop-options/product-catalog/

    My customization options:

    Documented options from YITH:

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter tltoys1

    (@tltoys1)

    I attempted to troubleshoot this and found the code for these missing customizer options in "\inc\customizer\panels\woocommerce\product-catalog.php".

    I also checked my database for 'wp_options' -> 'theme_mods_yith-proteo-child' and it does not contain the values for the 4 missing options.

    I don’t see what is causing the issue.

    Missing options:

    • Add to cart style
      • yith_proteo_products_loop_add_to_cart_style
    • Add to cart font size
      • yith_proteo_product_catalog_add_to_cart_font_size
    • Add to cart position
      • yith_proteo_products_loop_add_to_cart_position
    • Show “View details” link
      • yith_proteo_product_loop_view_details_enable

    Source code for the 4 options in product-catalog.php:

    // Add to cart loop style.
    $wp_customize->add_setting(
    	'yith_proteo_products_loop_add_to_cart_style',
    	array(
    		'default'           => 'unstyled_button',
    		'sanitize_callback' => 'yith_proteo_sanitize_radio',
    		'transport'         => 'refresh',
    	)
    );
    $wp_customize->add_control(
    	'yith_proteo_products_loop_add_to_cart_style',
    	array(
    		'type'        => 'radio',
    		'label'       => esc_html_x( 'Add to cart style', 'Customizer option name', 'yith-proteo' ),
    		'section'     => 'woocommerce_product_catalog',
    		'description' => esc_html_x( 'Choose the style for the Add to cart button in product catalog pages', 'Customizer option description', 'yith-proteo' ),
    		'choices'     => array(
    			'unstyled_button' => esc_html_x( 'Textual link', 'Customizer option value', 'yith-proteo' ),
    			'button_style_1'  => esc_html_x( 'Button style 1', 'Customizer option value', 'yith-proteo' ),
    			'button_style_2'  => esc_html_x( 'Button style 2', 'Customizer option value', 'yith-proteo' ),
    		),
    		'priority'    => 20,
    	)
    );
    
    // Add to cart font size options.
    $wp_customize->add_setting(
    	'yith_proteo_product_catalog_add_to_cart_font_size',
    	array(
    		'sanitize_callback' => 'absint',
    		'default'           => 14,
    	)
    );
    $wp_customize->add_control(
    	'yith_proteo_product_catalog_add_to_cart_font_size',
    	array(
    		'label'    => esc_html_x( 'Add to cart font size', 'Customizer option name', 'yith-proteo' ),
    		'section'  => 'woocommerce_product_catalog',
    		'type'     => 'number',
    		'priority' => 20,
    	)
    );
    
    // Add to cart position.
    $wp_customize->add_setting(
    	'yith_proteo_products_loop_add_to_cart_position',
    	array(
    		'default'           => 'classic',
    		'sanitize_callback' => 'yith_proteo_sanitize_radio',
    		'transport'         => 'refresh',
    	)
    );
    $wp_customize->add_control(
    	'yith_proteo_products_loop_add_to_cart_position',
    	array(
    		'type'        => 'radio',
    		'label'       => esc_html_x( 'Add to cart position', 'Customizer option name', 'yith-proteo' ),
    		'section'     => 'woocommerce_product_catalog',
    		'description' => esc_html_x( 'Choose where the add to cart button is displayed in product catalog pages.', 'Customizer option description', 'yith-proteo' ),
    		'choices'     => array(
    			'classic'     => esc_html_x( 'Classic', 'Customizer option value', 'yith-proteo' ),
    			'hover'       => esc_html_x( 'On image hover (dark)', 'Customizer option value', 'yith-proteo' ),
    			'hover-light' => esc_html_x( 'On image hover (light)', 'Customizer option value', 'yith-proteo' ),
    		),
    		'priority'    => 20,
    	)
    );
    
    // View details enable.
    if ( class_exists( 'Customizer_Control_Yes_No' ) ) {
    	$wp_customize->add_setting(
    		'yith_proteo_product_loop_view_details_enable',
    		array(
    			'default'           => 'no',
    			'sanitize_callback' => 'yith_proteo_sanitize_yes_no',
    			'transport'         => 'refresh',
    		)
    	);
    
    	$wp_customize->add_control(
    		new Customizer_Control_Yes_No(
    			$wp_customize,
    			'yith_proteo_product_loop_view_details_enable',
    			array(
    				'label'       => esc_html_x( 'Show "View details" link', 'Customizer option name', 'yith-proteo' ),
    				'section'     => 'woocommerce_product_catalog',
    				'description' => esc_html_x( 'Choose whether to show a "view details" link in product catalog pages.', 'Customizer option value', 'yith-proteo' ),
    				'priority'    => 20,
    			)
    		)
    	);
    }

    Hi there,

    which version of theme are you using?

    Thread Starter tltoys1

    (@tltoys1)

    I am using the YITH Proteo theme, more specifically the “Desire” child.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing Customization Optionss’ is closed to new replies.