Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #32126
    Profile photo of Robin
    Robin
    Keymaster

    Hi Graham – let me take a look – that is very odd behavior.

    #32127
    Profile photo of Robin
    Robin
    Keymaster

    Hi Graham – I can’t spot any issue with your account. Perhaps try moving the DNS and then testing as it may have something to do with the fact that the IP does not point to it properly. If it does not work once that is done then I can more readily diagnose it.

    #35221
    Profile photo of Richard
    Richard
    Participant

    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?

    #35222
    Profile photo of gc
    Graham
    Participant

    Richard,
    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.
    Graham

    #35223
    Profile photo of Richard
    Richard
    Participant

    Thanks 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”.

    #36091
    Profile photo of pat
    pat
    Participant

    Hi 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, Patrick

    #37426
    Profile photo of Richard
    Richard
    Participant

    Hi 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.

    #37427
    Profile photo of Richard
    Richard
    Participant

    To 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.

    #37442
    Profile photo of Robin
    Robin
    Keymaster

    You should be able to generate jQuery code that checks for any label that says “License” within the “variations_form cart” form and update that to whatever you want. Look up jQuery and you should be able to create something that works. Post it here if it doesn’t and we can help debug it for you.

Viewing 9 posts - 16 through 24 (of 24 total)

You must be logged in to reply to this topic.