Home Forums WoodMart support forum Mobile Popup Not Working

Mobile Popup Not Working

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #386669

    techmind
    Participant

    I trying add a popup in single product page with a Elementor button with shortcode. It is working well on desktop and chrome inspect with mobile dimensions but it button not working on mobile devices.

    If i add popup element woodmart i cant use shortcode for “Read More” text. How i can fix this?

    Attachments:
    You must be logged in to view attached files.
    #386687

    techmind
    Participant

    I changed global-button.php Line 39 for insert a shortcode.

    				'dynamic' => [
    					'active' => true,
    				],
    

    i added Line 39 this code and it is working well now.

    #386688

    techmind
    Participant

    And I changed class.popup.php for make it full width line 148

    		$this->add_control(
    			'width',
    			[
    				'label'   => esc_html__( 'Width', 'woodmart' ),
    				'type'    => Controls_Manager::SLIDER,
    				'default' => [
    					'size' => 800,
    				],
    				'range'   => [
    					'px' => [
    						'min'  => 150,
    						'max'  => 2000,
    						'step' => 10,
    					],
    				],
    			]
    		);

    changed to

    		$this->add_control(
    			'width',
    			[
    				'label'   => esc_html__( 'Width', 'woodmart' ),
    				'type'    => Controls_Manager::TEXT,
    				'default' => '800',
    			]
    		);

    And Line 206
    <div id="<?php echo esc_attr( $settings['popup_id'] ); ?>" class="mfp-with-anim wd-popup wd-popup-element mfp-hide<?php echo woodmart_get_old_classes( ' woodmart-content-popup' ); ?>" style="max-width:<?php echo esc_attr( $settings['width']['size'] ); ?>px;">

    changed to
    <div id="<?php echo esc_attr( $settings['popup_id'] ); ?>" class="mfp-with-anim wd-popup wd-popup-element mfp-hide<?php echo woodmart_get_old_classes( ' woodmart-content-popup' ); ?>" style="max-width:<?php echo esc_attr( $settings['width']['size'] ); ?>;">

    #386689

    techmind
    Participant

    I am sorry i shared wrong code.

    Change class.popup.php Line 206
    <div id="<?php echo esc_attr( $settings['popup_id'] ); ?>" class="mfp-with-anim wd-popup wd-popup-element mfp-hide<?php echo woodmart_get_old_classes( ' woodmart-content-popup' ); ?>" style="max-width:<?php echo esc_attr( $settings['width']['size'] ); ?>px;">
    Changed To
    <div id="<?php echo esc_attr( $settings['popup_id'] ); ?>" class="mfp-with-anim wd-popup wd-popup-element mfp-hide<?php echo woodmart_get_old_classes( ' woodmart-content-popup' ); ?>" style="max-width:<?php echo esc_attr( $settings['width'] ); ?>;">
    It is working well now.

    #386690

    techmind
    Participant

    For Change Default settings Class.popup.php Line 186

    	protected function render() {
    		$default_settings = [
    			'popup_id' => 'my_popup',
    			'content'  => '',
    			'link'     => array(),
    			'width'    => 800,
    		];

    To

    	protected function render() {
    		$default_settings = [
    			'popup_id' => 'my_popup',
    			'content'  => '',
    			'link'     => array(),
    			'width'    => 800px,
    		];
    
    #387033

    Hello,

    Please remove all your code modifications and deactivate all the plugins except these ones:

    Slider Revolution
    WPBakery Page Builder or Elementor
    Woodmart Core
    Contact Form 7
    MailChimp for WordPress
    WooCommerce
    Safe SVG
    Switch to the parent theme and check the issue.

    If the problem has gone, activate the plugins one by one, checking the issue to detect which one causes the problem.

    In case, the problem remains, even after all the plugins are deactivated, provide your site admin access (insert the site credentials into the Private content block under the message area) and confirm the permission for plugins deactivation, switching to the parent or default theme. As soon as we complete the testing we will enable all back, however, the site would be without plugins for 15-20 min. You would better make the full backup of your site.

    Best Regards

    #393051

    techmind
    Participant

    It is not working i can’t use shortcode for a link u know. My changes working perfect now with my codes.

    #393158

    Hello,

    We are glad you have solved the issue.

    If you have any questions please feel free to contact us.

    Best Regards

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