Okay
  Public Ticket #2656766
Suddenly plugin does not work
Closed

Comments

  •  2
    breisky started the conversation

    Hello, I´m sorry to bother you, but something suddenly happened and my Agenda does not show in a way it should. It is on the page http://262676.w76.wedos.ws/domains/projekty-vstupenky/

    I can see the list, but when I click on + is does not work. Can you hlep me, please, how to fix it?

    I´m sending the printscreen.

    Thank you very much indeed, Jarka Jones

    [email protected]

  •  877
    Zhivko replied

    Hi,

    Go to Dashboard -> WooCommere -> Settings -> Products tab and make sure "Enable AJAX add to cart buttons on archives" is turned on.


    Stachethemes Developer

  •  2
    breisky replied

    Hello Živko,

    thank you very very much, it works. Excellent support.

    Thanx again and all the best,

    Jarka

  •  877
    Zhivko replied

    Glad I could help.


    Stachethemes Developer

  •  2
    breisky replied

    Zhivko, sorry one more thing, then I hope will be able to leave you alone :-)

    Is there any chance to change also the dates into numbers in Events viewed like Posts? 

    Not 01. Duben 2021, but 01. 04. 2021? 

    I´m sending is attached and thank you with appologies, Jarka, Prague

    [email protected]


  •  877
    Zhivko replied

    Unfortunately only via filter.

    Place the code from the text file I've attached in your theme or child-theme functions.php file.


    Stachethemes Developer

  •  2
    breisky replied

    Hello Zhivko,

    thank you very much indeed.
    Unfortunately when I did what you said, created a new file functions.php in my theme child and pasteed in it your php code which you kindly sent me,
    my website says:
    Parse error: syntax error, unexpected '}', expecting end of file in /data/web/virtuals/262676/virtual/www/domains/wp-content/themes/oshin_child/functions.php on line 47

    Sorry to other you but can you help me with it?

    Thank you, Jarka 

  •  877
    Zhivko replied

    Could you send me your functions.php file and I'll insert the filter for you and send it back?


    Stachethemes Developer

  •  2
    breisky replied

    Hello Zhivko,

    Thank you. I´m sending you two files. The file functions is the original theme file.

    The file functions_child_theme is the one one for the child theme.

    I really appreciate your help, thank you, Jarka 

    [email protected]

  •  877
    Zhivko replied

    Make sure your child-theme functions.php file has PHP opening tag ( <?php ) like this:

    <?php
    // rest of the code below

    Stachethemes Developer

  •  2
    breisky replied

    Zhivko, thank you, it got better now, the date is in numbers, but unfortunately after the date in number it reads Invalid date.

    Everywhere :-(

    I´m sending you printscreen attached.

    Do you know how to fix it?

    Thank you, Jarka

  •  877
    Zhivko replied

    Replace the old code I've sent you earlier and try out this one:

    /**
     * STEC Modifies date to DD.MM.YYYY HH:mm
     */
    add_filter('stec_get_the_timespan', function($the_date, $event, $repeat_offset, $plaintext) {     $event->set_repeat_offset($repeat_offset);     if (1 === $event->get_all_day()) {
            return $event->get_start_date('d. m. Y');
        } else {
            return sprintf('%s - %s', $event->get_start_date('d. m. Y H:i'), $event->get_end_date('d. m. Y H:i'));
        }
    }, 10, 4); add_action('wp_footer', function() {
        
        if (false === \Stachethemes\Stec\Admin_Helper::post_has_shortcode('stachethemes_ec')) {
            return;
        }
        
        ?>
        <script type="text/javascript">
            (function ($) {             $(function () {
                    if (typeof $.stecExtend === 'undefined') {
                        return;
                    }                 $.stecExtend(function (m) {
                        m.$instance.on('stecBeforeReturnBeautifyTimespan', function (e, data) {                         var startDate = moment(data.startDate);
                            var endDate = data.endDate ? moment(data.endDate) : false;                         if (1 === data.allDay || !endDate) {
                                m.glob.temp.dateTimeString = startDate.format('DD. MM. YYYY');
                            } else {
                                m.glob.temp.dateTimeString = startDate.format('DD. MM. YYYY HH:mm') + ' - ' + endDate.format('DD. MM. YYYY HH:mm')
                            }
                        });
                    });
                });
            })(window.jQuery);
        </script>
        <?php
    });



    Stachethemes Developer

  •  2
    breisky replied

    Unfortunately:

    Fatal error: Uncaught Error: Class 'StachethemesStecAdmin_Helper' not found in /data/web/virtuals/262676/virtual/www/domains/wp-content/themes/oshin_child/functions.php:16 Stack trace: #0 /data/web/virtuals/262676/virtual/www/domains/wp-includes/class-wp-hook.php(287): {closure}('') #1 /data/web/virtuals/262676/virtual/www/domains/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #2 /data/web/virtuals/262676/virtual/www/domains/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #3 /data/web/virtuals/262676/virtual/www/domains/wp-includes/general-template.php(3021): do_action('wp_footer') #4 /data/web/virtuals/262676/virtual/www/domains/wp-content/themes/oshin/footer.php(135): wp_footer() #5 /data/web/virtuals/262676/virtual/www/domains/wp-includes/template.php(730): require_once('/data/web/virtu...') #6 /data/web/virtuals/262676/virtual/www/domains/wp-includes/template.php(676): load_template('/data/web/virtu...', true, Array) #7 /data/web/virtuals/262676/virtual/www/domains/wp-includes/general-t in /data/web/virtuals/262676/virtual/www/domains/wp-content/themes/oshin_child/functions.php on line 16

  •  877
    Zhivko replied

    I've attached the code in a text file because it seems ticksy is filtering some characters.


    Stachethemes Developer

  •  2
    breisky replied

    Sorry, my fault, I did it again, and it works, but there is a bud again, the time after the date disappeared, sending you printscreen. :-(

    Jarka


  •  877
    Zhivko replied

    Have you checked "Hide end date" checkbox in the event's settings (Add / Edit Event page in the admin panel). The checkbox is next to "All Day" below start and end date fields.


    Stachethemes Developer

  •  2
    breisky replied

    Hi Zhivko,

    yes "Hide end date" is checked in all events from the beginning. And it still does not show the time. :-(

    Sorry, thank you, Jarka

  •  877
    Zhivko replied

    I'll send you the new code to test in a moment.


    Stachethemes Developer

  •  877
    Zhivko replied

    I've attached the new code. Give it a try and let me know of the result.



    Stachethemes Developer

  •  2
    breisky replied

    Hi Zhivko,

    it looks ok now. You are a genius. I´d need you all the time :-)))

    Thank you very much for your great support!

    Take Care, Jarka