Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Free Product Label and Description
- This topic has 10 replies, 2 voices, and was last updated 4 years, 9 months ago by ML.
-
AuthorPosts
-
November 13, 2019 at 3:11 am #10889MLParticipant
Hi, I’m using WPML for translations and we’re able to translate most strings for WooCommerce Extended Coupon Features PRO except for the Free Product Placeholder “Please choose your free gift:” regardless if its the default placeholder text or if we edit it. Is there any way we can call up the translation strings for this part?
Also, the label “Free Products” only shows up on mobile devices , is this a bug or normal? Can we use a snippet to change the default text? Thanks.
November 13, 2019 at 9:36 pm #10924Soft79KeymasterDoes it work if you use a string translation? See https://wpml.org/documentation/getting-started-guide/string-translation/ . The text domain is
woocommerce-jos-autocoupon
November 14, 2019 at 1:16 am #10938MLParticipantI’ve tried but no strings show up for the placeholder description, and there also arent any admin text strings. By the way, funny thing is when i was using the free version the coupon description was translatable using strings. The pro version has no strings for the coupon description nor the free product placeholder description.
For the time being, ive used a gettext snippet to replace it first, but if theres another solution, please let me know, thanks.
November 14, 2019 at 7:45 am #10945MLParticipantWe also just noticed that the free product option shows up on the checkout page if no selection is added to cart however since the way to add free products is different on the cart and on the checkout page it seems confusing for our customers.
Scenario 1: input free product quantity and press update cart on cart page > adds to order
Scenario 2: input free product quantity on cart page and head to checkout without pressing update cart > doesnt add to order and also doesnt show the previous selection on checkout
Scenario 3: input free product on checkout page (nowhere to press update cart) > but product is still added to order when order is placedIs there any way to save and update the free product on the cart page immediately after customer inputs a quantity instead of having to press update cart, so that it functions the same way as on the checkout page?
November 14, 2019 at 5:21 pm #10966Soft79KeymasterPlease send url to the page + instructions to reproduce the issue.
November 15, 2019 at 1:16 am #10978MLParticipantFor the missing translation strings “Choose your free products” placeholder description and “Free Products” label, believe its all the same and you’ll help us check so i wont screen shot that part.
For the free products selection scenarios , please click the following link to add 2 of the required products to your cart and then the free product selection will show up : https://www.nourishme.com.hk/?add-to-cart=2880&quantity=2
If you do not choose a free product on the cart page , you will see the selection show up on the checkout page , but since the cart doesnt refresh by itself whereas the checkout page does not need to be updated with “update cart” , customers will not know there is a difference.
November 15, 2019 at 9:34 am #10993Soft79KeymasterFollowing that url, no coupon gets applied. What’s the coupon code?
November 15, 2019 at 10:18 am #10996Soft79KeymasterI tested the translation in combination with ‘WPML’ and it does work:
1) Go to WPML > String Translation
2) Temporarily enable ‘Auto register for translation’ for text-domain ‘woocommerce-jos-autocoupon’
3) Open the cart page where the ‘choose gift’ message is displayed and switch languages.
4) Now it appears in the string translations overviewNovember 18, 2019 at 2:35 am #11084MLParticipantAh I see, found the translation strings there now, thanks!
As for the coupon , it gets automatically applied when you login or register. I’ve created a sample coupon so you dont need to register and also cause our current promotion is ending soon.
Sample coupon code: TUBPHVZN (expires on the 20th)
Purchase anything worth $50 to get one free gift, with the gift multiplier on.What i noticed is that when “Allow multiplication of the free products” is not checked , the cart refreshes instantly when customer selects their gift and “update cart” is not necessary, which matches that of the checkout page, and works perfectly. However when this function is checked , and the radio button becomes a quantity selector , customer needs to refresh the cart by themselves which makes things confusing cause then customers wont know when they need to press “update cart” and when they dont.
November 18, 2019 at 9:30 pm #11135Soft79KeymasterYou can add this snippet to functions.php:
/** * Auto update cart after updating the quantity */ add_action( 'woocommerce_after_cart', function() { ?> <script> jQuery(function($) { var timeout; $('div.woocommerce').on('change textInput input', 'form.woocommerce-cart-form input', function(){ if(typeof timeout !== undefined) clearTimeout(timeout); //Not if empty if ($(this).val() == '') return; timeout = setTimeout(function() { $("[name='update_cart']").trigger("click"); }, 2000); }); }); </script> <?php } );
This will update the cart after 2 seconds after an input value has changed.
November 19, 2019 at 1:40 am #11141MLParticipantoh great! thanks for your help!
-
AuthorPosts
- You must be logged in to reply to this topic.