Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Tim Kerremans

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 61 total)
  • Author
    Posts
  • in reply to: Display message if default title is assigned #138026
    Tim Kerremans
    Participant

    Hi,

    The code you gave is the exact same code as I gave in my first message.
    I understand that there must be a default title, I just want to obligate my vendors to change this default title.

    Kind regards,

    Tim Kerremans
    Participant

    Can you send me the hook so that I can look into it?

    Thanks!

    Tim Kerremans
    Participant

    Hi,

    Like I said in my previous message, this is not working. Replacing add-product with edit-product does not work on my end. Please look at my previous message

    Tim Kerremans
    Participant

    Hi, thanks for digging deeper into this. I have tried but unfortunately it’s not working on my end. The vendors are uploading the file on the edit-product page and not on the add-product page. Could that be the issue here? I already tried changing add-product to edit-product in the code but it’s not working.I guess because there is always the product id attached at the end of the url?

    I attached a screenshot of the error message I’m receiving

    Tim Kerremans
    Participant

    So you’re telling there is no way to exclude 2 urls from this function? We’re not trying to change the world here.. I mean I’m just trying to exclude 2 pages from a basic function. We should find a solution to this

    Tim Kerremans
    Participant

    Great, thank you!

    Tim Kerremans
    Participant

    Hi, thanks for getting back to me.

    -> Correct, but on top of that also not on the profile page

    These are the urls of the vendor shop page and profile page:
    https://www.myurl.com/dashboard/profile/
    https://www.myurl.com/dashboard/storefront/

    Tim Kerremans
    Participant

    Thanks for getting back to me.

    -> correct, but on top of that also not for the profile page if possible.

    These are the urls of the vendor shop page and profile page:
    https://myurl.com/dashboard/profile/
    https://myurl.com/dashboard/storefront/

    in reply to: Assign default commission value #137709
    Tim Kerremans
    Participant

    Some additional information about the custom flow:

    Once the vendor clicks on a product category when adding a product it will automatically create all attributes and variations. For each variation the vendor is able to set the commission which is calculated in a different way than default like I explained above. This is done by a custom created plugin which overrides default Woocommerce flow. The screenshot I attached in my previous messages are from that plugin

    in reply to: Assign default commission value #137707
    Tim Kerremans
    Participant

    Here is the third screenshot

    in reply to: Assign default commission value #137704
    Tim Kerremans
    Participant

    Hi,

    Thanks for getting back to me. I have a custom flow which allows the commission to be calculated based on the cost of the product for the vendor.

    For example:
    Cost of item = 50$
    Commission = 20% or 10$
    Will result in selling price of customer = 60$ (50 + (20%*50))

    I have attached multiple screenshots and highlighted the field in which I would like to display ’20’ as default value but leave editable for vendors.

    Kindly let me know if you need any additional help

    Tim Kerremans
    Participant

    Hi,

    Thanks for your response but I don’t want to modify the logo as the minimum resolution of the uploaded product files has to be 1080p, if I modify logo and banner picture to be 1080p on the shortest side it would make waaay to large files on my website. I just want to exlude the shopfront and profile page from the funtion so that they are not affected in any way

    Tim Kerremans
    Participant

    Hi,

    Thanks for helping me out, however I’m still not able to get it working. Can you include this function into the code I received earlier? Also, would it also be possible to prevent this code from working on the profile page as well? The vendors can upload their profile image so I don’t want to set the limitations over there. You would help me alot.

    Thanks in advance!

    Tim Kerremans
    Participant

    I figured that I could also check for page template to disable this funtion on shopfront page, however when I try following code it is still working on the shopfront page. Any idea what I’m doing wrong here?

    if ( !is_page_template( ‘shop-front’ ) ) { // name of template you don’t want to run it on
    function resize_image_resolution($file) {
    if(is_user_wcmp_vendor(get_current_user_id())){
    $image = getimagesize($file[‘tmp_name’]);
    $minimum = array(
    ‘width’ => ‘1080’, //set your minimum
    ‘height’ => ‘1080’
    );
    $maximum = array(
    ‘width’ => ‘12000’, //set your maximum
    ‘height’ => ‘12000’
    );
    $image_width = $image[0];
    $image_height = $image[1];

    $too_small = “Image dimensions are too small.”;
    $too_large = “Image dimensions are too large.”;

    if ( $image_width < $minimum[‘width’] || $image_height < $minimum[‘height’] ) {
    $file[‘error’] = $too_small;
    return $file;
    }
    elseif ( $image_width > $maximum[‘width’] || $image_height > $maximum[‘height’] ) {
    $file[‘error’] = $too_large;
    return $file;
    }
    else
    return $file;
    } else {
    return $file;
    }
    }

    add_filter(‘wp_handle_upload_prefilter’, ‘resize_image_resolution’);
    }

    Tim Kerremans
    Participant

    Yes thanks but where do I have to add this hook? Can you provide me the complete code with this hook already applied to it?

Viewing 15 posts - 31 through 45 (of 61 total)