-
AuthorPosts
-
March 1, 2018 at 4:52 pm #32126March 1, 2018 at 5:23 pm #32127September 24, 2019 at 8:00 pm #35221
Hi all,
How did you get on with this? I am looking to change the word “License” to “Product”.I have installed a custom CSS & JS plugin however using the above code it doesn’t change it.
Thoughts?
September 24, 2019 at 9:32 pm #35222Richard,
I needed to make quite extensive changes to the single product page and I did this by adding an edited Woocommerce variable.php file to my child theme.
The original file is in: wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variable.php
I placed the copied and modified file as Woocommerce suggests: “This template can be overridden by copying it to yourtheme/woocommerce/single-product/add-to-cart/variable.php.”
Hope that helps.
GrahamSeptember 24, 2019 at 9:44 pm #35223Thanks Graham,
I have it resolved now, I modified Robin’s JS to accomplish what I need. You can see this here: Example
Here is the modified code:
jQuery(document).ready(function( $ ){ $("a.button.product_type_variable.add_to_cart_button.kad-btn.headerfont.kad_add_to_cart").text('Select Product'); if ($("td.product_label label").text() == 'Choose your License') $("td.product_label label").text('Choose your Product'); if ($("td.sse_product_license_licensetitle").text() == 'License') $("td.sse_product_license_licensetitle").text('Product'); if ($("td.sse_product_license_typetitle").text() == 'Type') $("td.sse_product_license_typetitle").text('License'); });
This is suffice for my needs and I should now be able to add prints to my “Product List”.
March 4, 2020 at 10:23 pm #36091Hi Robin,
I am attempting to rename “License” on the single product page as Graham did a while back. I have copied and pasted the javascript you provided –
jQuery(document).ready(function( $ ){
if ($(“form.variations_form.cart h4”).text() == ‘Choose your License’) $(“form.variations_form.cart h4”).text(‘My New Text’);
});
into my functions.php file however the script just appears at the top of the page and has no effect. Could you please help me get it right? Regards, PatrickAugust 18, 2020 at 8:18 pm #37426Hi all.
My little JS code above is no longer working, likely because I am not longer using the Sybiostock Pro template.Any guidance on what to modify to get the wording changed?
Ta.
August 18, 2020 at 8:56 pm #37427To provide an example, I simply want the Text “License” change to “Select Product” as seen on this page here:
https://wall2wall.photos/shop/motorcycles/rwmtnebobikes160820/_w2w8790-jpg/
Ta.
August 20, 2020 at 6:59 pm #37442 -
AuthorPosts
You must be logged in to reply to this topic.