Home Forums WoodMart support forum Woodmart parallax options gone after update Woodmart to 3.5 and VC 5.7 Reply To: Woodmart parallax options gone after update Woodmart to 3.5 and VC 5.7

#108682

Artem Temos
Keymaster

Seems to be our mistake. Try to add the following PHP code snippet to the child theme functions.php file to do this

    function woodmart_parallax_scroll_map(){
        return array(
        	array(
        		'type' => 'woodmart_switch',
        		'heading' => esc_html__( 'Enable parallax on mouse scroll', 'woodmart' ),
        		'param_name' => 'parallax_scroll',
        		'group' => esc_html__( 'Woodmart Extras', 'woodmart' ),
        		'true_state' => 'yes',
				'false_state' => 'no',
				'default' => 'no',
				'edit_field_class' => 'vc_col-sm-6 vc_column',
        	),
        	array(
        		'group'            => esc_html__( 'Woodmart Extras', 'woodmart' ),
        		'heading'          => esc_html__( 'X axis translation', 'woodmart' ),
                'hint'      => esc_html__( 'Recommended -200 to 200', 'woodmart' ),
        		'type'             => 'textfield',
        		'param_name'       => 'scroll_x',
                'edit_field_class' => 'vc_col-sm-4 vc_column',
        		'value'            => 0,
        		'dependency'       => array(
        			'element' => 'parallax_scroll',
                    'value' => array( 'yes' ),
        		),
				'edit_field_class' => 'vc_col-sm-6 vc_column',
        	),
        	array(
        		'group'            => esc_html__( 'Woodmart Extras', 'woodmart' ),
        		'heading'          => esc_html__( 'Y axis translation', 'woodmart' ),
                'hint'      => esc_html__( 'Recommended -200 to 200', 'woodmart' ),
        		'type'             => 'textfield',
        		'param_name'       => 'scroll_y',
                'edit_field_class' => 'vc_col-sm-4 vc_column',
        		'value'            => -80,
        		'dependency'       => array(
        			'element' => 'parallax_scroll',
        			'value' => array( 'yes' ),
        		),
				'edit_field_class' => 'vc_col-sm-6 vc_column',
        	),
        	array(
        		'group'            => esc_html__( 'Woodmart Extras', 'woodmart' ),
        		'heading'          => esc_html__( 'Z axis translation', 'woodmart' ),
                'hint'      => esc_html__( 'Recommended -200 to 200', 'woodmart' ),
        		'type'             => 'textfield',
        		'param_name'       => 'scroll_z',
                'edit_field_class' => 'vc_col-sm-4 vc_column',
        		'value'            => 0,
        		'dependency'       => array(
        			'element' => 'parallax_scroll',
        			'value' => array( 'yes' ),
        		),
				'edit_field_class' => 'vc_col-sm-6 vc_column',
        	),
        	array(
        		'group'       => esc_html__( 'Woodmart Extras', 'woodmart' ),
        		'heading'     => esc_html__( 'Parallax speed', 'woodmart' ),
        		'hint' => esc_html__( 'Define the parallax speed on mouse scroll. By default - 30', 'woodmart' ),
        		'type'        => 'dropdown',
        		'param_name'  => 'scroll_smooth',
        		'value'       => array( '', 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ),
        		'dependency'  => array(
        			'element' => 'parallax_scroll',
        			'value' => array( 'yes' ),
        		),
				'edit_field_class' => 'vc_col-sm-6 vc_column',
        	),
        );
    }