Discussion on Flatsome | Multi-Purpose Responsive WooCommerce Theme

Discussion on Flatsome | Multi-Purpose Responsive WooCommerce Theme

Cart 266,978 sales
Recently Updated
Well Documented

UX-themes supports this item

Supported

This author's response time can be up to 2 business days.

28318 comments found.

First it is a nice theme but i have some doubts,

In this template : http://flatsome3.uxthemes.com/shop/booking/weekend-in-san-fransico/?style=layout-explore

When i put add to car he go to another page, why? i don’t want that i want when the user press the button just add the product to the car.

And another thing do you guys have some page builder for custom post types? not just woocommerce?

because i will use a lot and have a plugin called event calendar that use that!

Is it possible to have a floating box or sidebar using this theme? Something which follows on scroll..?

How i can get track-order page?

Is there a way to make an animation repeat (infinite)? For example a Fade In Down on an image.

What is the response time when mailing the support email? I emailed 2 days ago but still no response….

No?

This support helpscout tab – to what email is it connected? support@uxthemes.com?

Re “Instagram has returned invalid data”. Try this alternative code (definitely works for me). Just replace the entire flatsome_scrape_instagram function in flatsome/inc/shortcodes/ux_instagram_feed.php with this:

function flatsome_scrape_instagram( $username ) {

    $username = trim( strtolower( $username ) );

    switch ( substr( $username, 0, 1 ) ) {
        case '#':
            $url              = 'https://instagram.com/explore/tags/' . str_replace( '#', '', $username );
            $transient_prefix = 'h';
            break;

        default:
            $url              = 'https://instagram.com/' . str_replace( '@', '', $username );
            $transient_prefix = 'u';
            break;
    }

    if ( false === ( $instagram = get_transient( 'insta-a10-' . $transient_prefix . '-' . sanitize_title_with_dashes( $username ) ) ) ) {

        $remote = wp_remote_get( $url );

        if ( is_wp_error( $remote ) ) {
            return new WP_Error( 'site_down', esc_html__( 'Unable to communicate with Instagram.', 'wp-instagram-widget' ) );
        }

        if ( 200 !== wp_remote_retrieve_response_code( $remote ) ) {
            return new WP_Error( 'invalid_response', esc_html__( 'Instagram did not return a 200.', 'wp-instagram-widget' ) );
        }

        $shards      = explode( 'window._sharedData = ', $remote['body'] );
        $insta_json  = explode( ';</script>', $shards[1] );
        $insta_array = json_decode( $insta_json[0], true );

        if ( ! $insta_array ) {
            return new WP_Error( 'bad_json', esc_html__( 'Instagram has returned invalid data.', 'wp-instagram-widget' ) );
        }

        if ( isset( $insta_array['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'] ) ) {
            $images = $insta_array['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'];
        } elseif ( isset( $insta_array['entry_data']['TagPage'][0]['graphql']['hashtag']['edge_hashtag_to_media']['edges'] ) ) {
            $images = $insta_array['entry_data']['TagPage'][0]['graphql']['hashtag']['edge_hashtag_to_media']['edges'];
        } else {
            return new WP_Error( 'bad_json_2', esc_html__( 'Instagram has returned invalid data.', 'wp-instagram-widget' ) );
        }

        if ( ! is_array( $images ) ) {
            return new WP_Error( 'bad_array', esc_html__( 'Instagram has returned invalid data.', 'wp-instagram-widget' ) );
        }

        $instagram = array();

        foreach ( $images as $image ) {
            if ( true === $image['node']['is_video'] ) {
                $type = 'video';
            } else {
                $type = 'image';
            }

            $caption = __( 'Instagram Image', 'wp-instagram-widget' );
            if ( ! empty( $image['node']['edge_media_to_caption']['edges'][0]['node']['text'] ) ) {
                $caption = wp_kses( $image['node']['edge_media_to_caption']['edges'][0]['node']['text'], array() );
            }

            $instagram[] = array(
                'description' => $caption,
                'link'        => trailingslashit( '//instagram.com/p/' . $image['node']['shortcode'] ),
                'time'        => $image['node']['taken_at_timestamp'],
                'comments'    => $image['node']['edge_media_to_comment']['count'],
                'likes'       => $image['node']['edge_liked_by']['count'],
                'thumbnail'   => preg_replace( '/^https?\:/i', '', $image['node']['thumbnail_resources'][0]['src'] ),
                'small'       => preg_replace( '/^https?\:/i', '', $image['node']['thumbnail_resources'][2]['src'] ),
                'large'       => preg_replace( '/^https?\:/i', '', $image['node']['thumbnail_resources'][4]['src'] ),
                'original'    => preg_replace( '/^https?\:/i', '', $image['node']['display_url'] ),
                'type'        => $type,
            );
        } // End foreach().

        // do not set an empty transient - should help catch private or empty accounts.
        if ( ! empty( $instagram ) ) {
            $instagram = base64_encode( serialize( $instagram ) );
            set_transient( 'insta-a10-' . $transient_prefix . '-' . sanitize_title_with_dashes( $username ), $instagram, apply_filters( 'null_instagram_cache_time', HOUR_IN_SECONDS * 2 ) );
        }
    }

    if ( ! empty( $instagram ) ) {

        return unserialize( base64_decode( $instagram ) );

    } else {

        return new WP_Error( 'no_images', esc_html__( 'Instagram did not return any images.', 'wp-instagram-widget' ) );

    }
}

For people getting tired of waiting for an update and reaction of Flatsome Team here is a fix i have just finished to test, that is working 100%

Find the new WP error badjson2 line beginning by: “if ( isset….”

And replace by all of this code bellow till the end of foreach image section:

if ( isset( $insta_array['entry_data']['ProfilePage'][0]['user']['media']['nodes'] ) ) {
                $images = $insta_array['entry_data']['ProfilePage'][0]['user']['media']['nodes'];
            } elseif ( isset( $insta_array['entry_data']['TagPage'][0]['graphql']['hashtag']['edge_hashtag_to_media']['edges'] ) ) {
                $images = $insta_array['entry_data']['TagPage'][0]['graphql']['hashtag']['edge_hashtag_to_media']['edges'];
            } elseif ( isset( $insta_array['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'] ) ) {
                $images = $insta_array['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'];
            }
                else {
                return new WP_Error( 'bad_json_2', esc_html__( 'Instagram has returned invalid data.', 'flatsome-admin' ) );
            }

        if ( ! is_array( $images ) ) {
            return new WP_Error( 'bad_array', esc_html__( 'Instagram has returned invalid data.', 'flatsome-admin' ) );
        }

        $instagram = array();

        foreach ( $images as $image ) {
                        if ( true === $image['node']['is_video'] ) {
                            $type = 'video';
                        } else {
                            $type = 'image';
                        }

                        $caption = __( 'Instagram Image', 'wp-instagram-widget' );
                        if ( ! empty( $image['node']['edge_media_to_caption']['edges'][0]['node']['text'] ) ) {
                            $caption = $image['node']['edge_media_to_caption']['edges'][0]['node']['text'];
                        }

                        $instagram[] = array(
                            'description'   => $caption,
                            'link'              => trailingslashit( '//instagram.com/p/' . $image['node']['shortcode'] ),
                            'time'              => $image['node']['taken_at_timestamp'],
                            'comments'          => $image['node']['edge_media_to_comment']['count'],
                            'likes'             => $image['node']['edge_liked_by']['count'],
                            'thumbnail'         => preg_replace( '/^https?\:/i', '', $image['node']['thumbnail_resources'][0]['src'] ),
                            'small'            => preg_replace( '/^https?\:/i', '', $image['node']['thumbnail_resources'][2]['src'] ),
                            'large'            => preg_replace( '/^https?\:/i', '', $image['node']['thumbnail_resources'][4]['src'] ),
                            'original'        => preg_replace( '/^https?\:/i', '', $image['node']['display_url'] ),
                            'type'              => $type,
                        );
            }

Enjoy ;)

Come on guys the Instagram API changes were announced in late January. Switching to Graph API was not a suprise….

They said developpers should be prepared and that they also should implement an automatic update function to their plugin as this new Graph API will cause frequent changes of Instagram connected services.

This is not acceptable for people using your theme as BUSINESS theme to get their homepage broken for days each time Instagram will change something !

The team reactivity/support is becoming lower and slower these late monthes….

P.S: @nuffstuff code is not working here too Majority of good instagram plugins were back on track in some hours :(

Hi, The ux instagram feed is not working. How could I fix “Instagram has returned invalid data.” The code @nuffstuff has provided is not working for me. Thanks

Mini Cart widget not showing in Checkout/Cart Pages??

Hi,

2 questions:

-Where do I find the enable/disable breadcrumb during checkout? So how to get rid of Cart – Checkout Detail – Order Finished.

- How do I remove the catrgory “Ungategorized” from the catrgories menu?

Regards, Arjan

The slider height is suddenly doubled…

I don’t know why but the slider height is suddenly doubled. If I made a simple slider as below, the actual slider is displayed with a doubled height (300px + 300px), as you can see at https://www.watchair.tv/sliders-2/ , where the top area is the one I intended, while I have no idea why the bottom area was created.

I disabled my plugins and changed my templates. But nothing works. Please help me!

[ux_slider bg_color=”#32b4b4”]

[ux_banner height=”300px”]

[text_box position_x=”50” position_y=”50”]

THIS IS A SIMPLE BANNER Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

[/text_box]

[/ux_banner]

[/ux_slider]

If I drop down the 4wd tab and click on one of the options…say Troopy Fit Outs – when the page opens its hard to scroll up or down from the point where the page opens. A real pain – can this be fixed?

https://www.drifta.com.au/

Feed stop working after update ‘Instagram has returned invalid data.’.

Please help.

i just updated my theme to latest version and now ux builder is everytime in stuck! I tried all steps at https://docs.uxthemes.com/article/202-missing-customizer-or-ux-builder. no problem found, still not working, what can I do? Please help!

Hello. I need to translate the ‘Total will be calcuated in Cart’ text in the minicart dropdown/widget (which has a spelling mistake by the way). Where do I do this please? I can’t find it in the theme po file.

Any help on this please?

Please!! Update and fix the Instagram issue!

@Vector_Maison

I managed to temporarily fix my Instagram feed by replacing the code in flatsome/inc/shortcodes/ux_instagram_feed.php. Replace the entire flatsome_scrape_instagram function with the following code:

function flatsome_scrape_instagram( $username ) {
    $username = strtolower( $username );
    $username = str_replace( '@', '', $username );
    $transient_name = 'instagram-a6-' . sanitize_title_with_dashes( $username );
    $instagram = get_transient( $transient_name );

    if ( false === $instagram ) {

        $remote = wp_remote_get( 'http://instagram.com/' . trim( $username ) );

        if ( is_wp_error( $remote ) ) {
            return new WP_Error( 'site_down', esc_html__( 'Unable to communicate with Instagram.', 'flatsome-admin' ) );
        }

        if ( 200 != wp_remote_retrieve_response_code( $remote ) ) {
            return new WP_Error( 'invalid_response', esc_html__( 'Instagram did not return a 200.', 'flatsome-admin' ) );
        }

        $shards      = explode( 'window._sharedData = ', $remote['body'] );
        $insta_json  = explode( ';</script>', $shards[1] );
        $insta_array = json_decode( $insta_json[0], true );

        if ( ! $insta_array ) {
            return new WP_Error( 'bad_json', esc_html__( 'Instagram has returned invalid data.', 'flatsome-admin' ) );
        }

        if ( isset( $insta_array['entry_data']['ProfilePage'][0]['user']['media']['nodes'] ) ) {
            $images = $insta_array['entry_data']['ProfilePage'][0]['user']['media']['nodes'];
        } else {
            return new WP_Error( 'bad_json_2', esc_html__( 'Instagram has returned invalid data.', 'flatsome-admin' ) );
        }

        if ( ! is_array( $images ) ) {
            return new WP_Error( 'bad_array', esc_html__( 'Instagram has returned invalid data.', 'flatsome-admin' ) );
        }

        $instagram = array();

        foreach ( $images as $image ) {
            $image['thumbnail_src'] = preg_replace( '/^https?\:/i', '', $image['thumbnail_src'] );
            $image['display_src']   = preg_replace( '/^https?\:/i', '', $image['display_src'] );

            if ( isset( $image['thumbnail_resources'] ) && is_array( $image['thumbnail_resources'] ) ) {
                $image['thumbnail'] = set_url_scheme( $image['thumbnail_resources'][0]['src'] ); // 150x150
//                $image['thumbnail'] = set_url_scheme( $image['thumbnail_resources'][1]['src'] ); // 240x240
                $image['small']     = set_url_scheme( $image['thumbnail_resources'][2]['src'] ); // 320x320
//                $image['thumbnail'] = set_url_scheme( $image['thumbnail_resources'][3]['src'] ); // 480x480
//                $image['thumbnail'] = set_url_scheme( $image['thumbnail_resources'][4]['src'] ); // 640x640
            } else {
                $image['thumbnail'] = $image['small'] = $image['thumbnail_src'];
            }

            $image['large'] = $image['thumbnail_src'];

            if ( $image['is_video'] == true ) {
                $type = 'video';
            } else {
                $type = 'image';
            }

            $caption = __( 'Instagram Image', 'flatsome-admin' );
            if ( ! empty( $image['caption'] ) ) {
                $caption = $image['caption'];
            }

            $instagram[] = array(
                'description' => $caption,
                'link'        => trailingslashit( '//instagram.com/p/' . $image['code'] ),
                'time'        => $image['date'],
                'comments'    => $image['comments']['count'],
                'likes'       => $image['likes']['count'],
                'thumbnail'   => $image['thumbnail'],
                'small'       => $image['small'],
                'large'       => $image['large'],
                'original'    => $image['display_src'],
                'type'        => $type,
            );
        }

        // Do not set an empty transient, helps catching private or empty accounts.
        if ( ! empty( $instagram ) ) {
            $instagram = base64_encode( serialize( $instagram ) ); //100% safe - ignore theme check nag
            set_transient( $transient_name, $instagram, apply_filters( 'null_instagram_cache_time', HOUR_IN_SECONDS * 2 ) );
        }
    }

    if ( ! empty( $instagram ) ) {
        return unserialize( base64_decode( $instagram ) );
    } else {
        return new WP_Error( 'no_images', esc_html__( 'Instagram did not return any images.', 'flatsome-admin' ) );
    }
}

This worked for me. It seems Instagram have been making some sneaky changes to their API.

I’m still waiting for a reply about if saving pages as templets is possible (import exporting them as an option). Not just WooCommerce product pages.

For everyone looking for support the Author wrote earlier in the thread the following method for receiving support.

Please go to WP-Admin > Flatsome > Help & Guides to send us a stupport ticket. That’s the correct way to get support :) Include a link to your site if possible.

is it possible to whitelabel this theme?

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve ThemeForest.

Sure, take me to the survey