Adding another place for the final price on my products

Im trying to add another final price spot on my product pages. I want to have it moved to the top where we currently have “price starting at” and the the price below. here is a link
https://outdoordogsupply.com/product/garmin-alpha-tt15-combo-build-your-own-bundle/
i want the “Final total” at the bottom to stay and just be duplicated to the where price starting at is. heres the code

$799.99

I still want the price to adjust to the different option sets like it does on the one at the bottom too.
Thanks

Hi there,

Thanks for writing in.

That’s doable with this snippet, please add this code to your global custom javascript

jQuery ( function($) {

$('<p><div class="price_total_2 tm-extra-product-options-totals"></div></p>').insertAfter('.single-product .product_title');

setInterval( function() {

$('.price_total_2').html( $('.tm-custom-price-totals').html() );
$('.price_total_2 .tm-options-totals').remove()

}, 300 );

} );

Hope this helps.

Awesome! This worked great. Is there anyway to move it below the Short Description?

Hello There,

To move it right below the short description, you can make use of this code:

jQuery ( function($) {

  $('<p><div class="price_total_2 tm-extra-product-options-totals"></div></p>').insertAfter('.single-product .woocommerce-product-details__short-description');

  setInterval( function() {

    $('.price_total_2').html( $('.tm-custom-price-totals').html() );
    $('.price_total_2 .tm-options-totals').remove()

  }, 300 );
} );

Hope this helps. Please let us know how it goes.

How can I make the price show even when there are not options.

https://outdoordogsupply.com/product/dc50-collar-charger/

I had to add the Product Price but I don’t want to have that because when there are options the price shows 2.

https://outdoordogsupply.com/product/garmin-fenix-3-multi-sport-gps-watch/

Hi there,

Those total fields aren’t from native WooCommerce, and as such are not styled or controlled in any way through X. As this is related to a third party plugin we don’t integrate with, we would recommend contacting their support.

You guys provided me with the code to add the price to the top under the short code. I just need this to show all the time even if there are no option sets.

Hi there,

Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

Thanks for understanding. Take care!

I’m not sure I am explaining this correct. The code you gave me works great. I need that code/price to show always. Right now it only shows when there are option sets. If you look at this link https://outdoordogsupply.com/product/dc50-collar-charger/ you will see that the “Final Total” is not showing. If you look at this link you will see that there is a “Final Total” https://outdoordogsupply.com/product/garmin-fenix-3-multi-sport-gps-watch/

I need the “Final Total” to show on all products.

This is the code you gave me that works great. I just need it to show the “Final Price” all the time.

jQuery ( function($) {

$(’

’).insertAfter(’.single-product .woocommerce-product-details__short-description’);

setInterval( function() {

$('.price_total_2').html( $('.tm-custom-price-totals').html() );
$('.price_total_2 .tm-options-totals').remove()

}, 300 );
} );

Hi there,

That’s not possible, that code is based on existing structure and selectors, if the page doesn’t have that selector then there is nothing to select and manipulate. You may want to consult to a developer to enhance the snippet that I provided.

I only provided that snippet since it’s in its simplest form and easier to achieve, further enhancement with complexity is not something can cover. We initially don’t provide support to any custom code.

Thanks!

Hey so I figured it out. The code provided last was to put the final price below the short description. When the product did not have a short description the final price did not show. Is there away to edit the code to go above the option set instead of being linked to the short description? It will go in the same sport as the last code provided but not linked to the short description.

Hi there,

It’s not tied up to the short description, it’s only the location where it’s added. It is tied up to $('.price_total_2') which doesn’t exist on that page. Hence, you can’t move or clone something that isn’t there.

Thanks!

Hey ok so the first code works even if there is not a short description. I guess this one will have to work. Even tho I would like it to be below the short description.

jQuery ( function($) {

$(’

’).insertAfter(’.single-product .product_title’);

setInterval( function() {

$(’.price_total_2’).html( $(’.tm-custom-price-totals’).html() );
$(’.price_total_2 .tm-options-totals’).remove()

}, 300 );

} );

Hi there,

This insertAfter('.single-product .woocommerce-product-details__short-description'); only defines the location where you wish to display it, if you change it to this insertAfter('.single-product .product_title');, the location will of course will change.

I don’t see why you need to change that when you like it below the short description.

Again, even if you change the location over and over, it will not work on product pages that don’t have this $('.price_total_2') element. That element is created by your Woocommerce addon (extra options) and that isn’t applicable to your other pages such as https://outdoordogsupply.com/product/dc50-collar-charger/, making the above code not applicable too.

Thanks.