Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter bramvanast

    (@bramvanast)

    Hi Alex,

    Thanks for your fast reply.

    I think we need some specific code.
    What I will do, not today but somewhere next week, is submit a ticket to https://algolplus.freshdesk.com/. With the required specific code.

    Next we can communicate about it.

    Thanks,
    Bram

    Hi Guido,

    I changed the Settings from local (Amsterdam) to UTC+1.
    (which results in the correct date-setting for us)

    Problem solved!

    Thanks for the advise!

    Kind regards,
    Bram

    Hi Guido,

    Thanks for the early reply.

    Yes, the dates are set correct.
    Yes, we are using DIVI.

    WP = 5.3.1–nl_NL
    Very Simple Event List = 10.9

    I hope you can resolve this issue.

    Regards
    Bram

    • This reply was modified 5 years, 3 months ago by bramvanast.

    Hi,

    I am experiecing the same issue on website https://vriesversplatform.nl/

    When saving the event, with the correct date, next the date is set 1 day earlier.
    (So march 12 2020 becomes march 11 2020)

    Very Simple Event List
    Versie: 10.9

    Wordpress
    versie 5.3.1

    Can you please help!

    Thanks
    Bram

    P.S. If required I can give you access to the back-end of the site)

    • This reply was modified 5 years, 3 months ago by bramvanast.
    Thread Starter bramvanast

    (@bramvanast)

    Hi,

    OK, thanks for your early reply.

    When would this approximately be available?

    Regards
    Bram

    Thread Starter bramvanast

    (@bramvanast)

    We are working on it, with custom development.

    (Which I definitely did not want to have)

    Hi Stan_Joco

    I used your code and got it working.
    HOWEVER it seems that the filtered/hidden shows up in the product-categories sidebar widget once you have visited a product.

    Can you please give me some advise how to solve this?

    Thanks
    Bram

    Minor change:
    Not “customer” but staffel_g_klanten”” , which is the customergroup (Role) I want to make the “specials” visible to.

    Minor change:
    Not “customer” but staffel_g_klanten”” , which is the customergroup (Role) I want to make the “specials” visible to.

    Hi,

    I used the code from: Stan_Joco(which is originally from SideKick Dan.

    Only changed the categoryname (specials) and User-role “wholesale-user” changed to “customer”.

    Unfortunately the specials-category (and it’s products) are still visible.

    Is there someone that can help me with this?
    Thanks?


    Code I have added to the functions.php of the theme.

    ——

    // Woocommerce – Redirect unauthorised users from accessing a specified product category when clicked or visited via direct url
    function woocommerce_hide_non_registered() {
    if( ( is_product_category(‘specials’) ) && ! ( current_user_can( ‘staffel_g_klanten’ ) || current_user_can( ‘administrator’ ) ) ) {

    wp_redirect( site_url( ‘/’ ) );

    exit();
    }
    }
    add_action( ‘template_redirect’,’woocommerce_hide_non_registered’ );
    // End – Woocommerce – redirect unauthorised users from accessing a specified product category
    // Woocommerce – Removes category link from woocommerce product category widgets so they are not seen
    add_filter( ‘get_terms’, ‘get_subcategory_terms’, 10, 3 );
    function get_subcategory_terms( $terms, $taxonomies, $args ) {
    $new_terms = array();
    // if a product category and on the shop page
    if ( in_array( ‘product_cat’, $taxonomies ) && ! ( current_user_can( ‘staffel_g_klanten’ ) || current_user_can( ‘administrator’ ) ) && is_shop() ) {
    foreach ( $terms as $key => $term ) {
    if ( ! in_array( $term->slug, array( ‘specials’ ) ) ) {
    $new_terms[] = $term;
    }
    }
    $terms = $new_terms;
    }
    return $terms;
    }
    // End – Woocommerce – Removes category link from woocommerce product category widgets so they are not seen
    // Woocommerce – Remove products from being displayed that belong to a category user is not authorised to visit. Products seem to still be accessible via direct url unfortunately.
    add_action( ‘pre_get_posts’, ‘custom_pre_get_posts’ );

    function custom_pre_get_posts( $q ) {

    if ( ! $q->is_main_query() ) return;

    if ( ! $q->is_post_type_archive() ) return;

    if ( ! ( current_user_can( ‘staffel_g_klanten’ ) || current_user_can( ‘administrator’ ) ) && is_shop() ) {

    $q->set( ‘tax_query’, array(array(

    ‘taxonomy’ => ‘product_cat’,

    ‘field’ => ‘slug’,

    ‘terms’ => array( ‘specials’), // Don’t display products in the private-clients category on the shop page

    ‘operator’ => ‘NOT IN’

    )));

    }

    remove_action( ‘pre_get_posts’, ‘custom_pre_get_posts_query’ );

    }
    // End – Woocommerce – Remove products from being displayed that belong to a category user is not authorised to visit. Products seem to still be accessible via direct url unfortunately.
    //to do figure out how to restrict a product located in an unauthorised category based on the url

Viewing 10 replies - 1 through 10 (of 10 total)