afmedia
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Local Pickup Time Select] local pickup / deliveryThank you for your response ! Do you know when you will be able to release the next version ?
Forum: Plugins
In reply to: [WooCommerce Local Pickup Time Select] Hide if Shipping method isn’t PickupEdit to my previous post, the code doesn’t work when I first load the cart page, the local-pickup-time-select field isn’t displayed.
I’m on WP 5.4 and woocommerce 4.0.1
Any advice would be great !Forum: Plugins
In reply to: [WooCommerce Local Pickup Time Select] Hide if Shipping method isn’t PickupHello,
a minor improvement to @yward code in the case of having chosen a pickup time and then change the shipping to mailing : we have to empty the pickup time otherwise a date will be displayed in the backoffice.<?php //hide the local pickup thingy add_action( 'woocommerce_after_checkout_form', 'bbloomer_disable_shipping_local_pickup' ); function bbloomer_disable_shipping_local_pickup( $available_gateways ) { // Part 1: Hide time based on the static choice @ Cart $chosen_methods = WC()->session->get( 'chosen_shipping_methods' ); $chosen_shipping = $chosen_methods[0]; if ( 0 !== strpos( $chosen_shipping, 'local_pickup' ) ) { ?> <script type="text/javascript"> jQuery('#local-pickup-time-select').fadeOut(); </script> <?php } else { ?> <script type="text/javascript"> if(jQuery('#local_pickup_time_select').val()) {<?php wc_add_notice( __( 'Veuillez choisir un horaire de retrait.', 'woocommerce-local-pickup-time' ), 'error' ); ?>} </script> <?php } // Part 2: Hide time based on the dynamic choice @ Checkout ?> <script type="text/javascript"> jQuery('form.checkout').on('change','input[name^="shipping_method"]',function() { var val = jQuery( this ).val(); if (val.match("^local_pickup")) { jQuery('#local-pickup-time-select').fadeIn(); } else { jQuery('#local-pickup-time-select').fadeOut(); jQuery('#local_pickup_time_select').val("none"); } }); </script> <?php } add_action( 'woocommerce_after_checkout_validation', 'a4m_validate_pickup', 10, 2); function a4m_validate_pickup( $fields, $errors ){ $chosen_methods = WC()->session->get( 'chosen_shipping_methods' ); $chosen_shipping = $chosen_methods[0]; if ( 0 === strpos( $chosen_shipping, 'local_pickup' ) ) { if ( empty($_POST[ 'local_pickup_time_select' ] ) ){ $errors->add( 'validation', 'Veuillez choisir un horaire de retrait.' ); } } } //end of it ?>Forum: Plugins
In reply to: [WooCommerce Local Pickup Time Select] Hide if Shipping method isn’t PickupHello,
sorry to bring back the subject but I need this function too.
I have tried what @yward kindly wrote but I can’t get it to work.
Here is the code I have put in function.php in my child theme.
Even if I choose shipping by post , I can’t get rid of the local pick up time selection. I also found an error about json when I look in the browser console.
Any help is most welcome 🙂 Thank you in advanceadd_action( 'woocommerce_after_checkout_validation', 'a4m_validate_pickup', 10, 2); function a4m_validate_pickup( $fields, $errors ){ $chosen_methods = WC()->session->get( 'chosen_shipping_methods' ); $chosen_shipping = $chosen_methods[0]; if ( 0 === strpos( $chosen_shipping, 'local_pickup' ) ) { if ( empty($_POST[ 'local_pickup_time_select' ] ) ){ $errors->add( 'validation', 'Veuillez choisir un horaire de retrait.' ); } } ?> <script type="text/javascript"> jQuery('form.checkout').on('change','input[name="shipping_method"]',function() { var val = jQuery( this ).val(); if (val.match("local_pickup")) { jQuery('#local-pickup-time-select').fadeIn(); if(jQuery('#local_pickup_time_select').val()) {<?php wc_add_notice( __( 'Veuillez choisir un horaire de retrait.', 'woocommerce-local-pickup-time' ), 'error' ); ?>} } else { jQuery('#local-pickup-time-select').fadeOut(); } }); </script> <?php } //end of itForum: Themes and Templates
In reply to: [Sketch] Put a logo on the left of the headerThanks, it works perfectly !
Forum: Themes and Templates
In reply to: [Sketch] Put a logo on the left of the headerHi, thank you 🙂
Is there a way to make it responsive ?Thanks
Hi,
I’ve just installed the plugin and I have the same issue with the french translation.
But it works…
Best regards- This reply was modified 9 years ago by afmedia.
Forum: Plugins
In reply to: [Post Notif] Pb with custom permalinks and post notif pages (404 error)Hi devon, i won t have access to a computer this week, to send you screenshot but the permalink looks like
Mysite.com/%category%-st-malo/%postname%/%post_id%/And the htaccess is
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Thanks for your help,
Amandine
Hi,
I’ve just sent you an email via your contact form.
Thank you,
AF
Forum: Plugins
In reply to: [Imsanity] Imsanity with ImageMagick EngineThanks for the response.
I tried ShortPixel but it gives me an error :
Error downloading file (http://api.shortpixel.com/f/e1e35e447b9465285d7de7b1b2618ab7-lossy.jpg) Timeout was reachedForum: Plugins
In reply to: [Post Notif] Pb with custom permalinks and post notif pages (404 error)Hi Devon,
thank you for your response.
I tried with the Twenty Sixteen theme and unfortunatly it doesn’t work, I’ve the same issue with 404 errors.I also tried desactivating all the other plugins without any success.
It’s a nice and efficient plugin, that do exactly what I need so I would really like to make it work !
Thank you for the support,
Amandine
Forum: Plugins
In reply to: [Post Notif] Confirmation link is wrong (solved, LOL)Hi,
I’ve got the same problem : all post notif pages (confirmation and preferences) shows 404 errors.
– I use a genesis theme
– custom permalinks : /%category%-st-malo/%postname%/%post_id%/Any help will be appreciated ! 🙂
Thanks in advance,
AF