diff --git a/interface/src/ui/overlays/ContextOverlayInterface.cpp b/interface/src/ui/overlays/ContextOverlayInterface.cpp index 46fb2df007..6704e81706 100644 --- a/interface/src/ui/overlays/ContextOverlayInterface.cpp +++ b/interface/src/ui/overlays/ContextOverlayInterface.cpp @@ -13,6 +13,7 @@ #include "Application.h" #include +#include static const float CONTEXT_OVERLAY_TABLET_OFFSET = 30.0f; // Degrees static const float CONTEXT_OVERLAY_TABLET_ORIENTATION = 210.0f; // Degrees @@ -242,7 +243,7 @@ void ContextOverlayInterface::contextOverlays_hoverLeaveEntity(const EntityItemI } } -static const QString MARKETPLACE_BASE_URL = "https://metaverse.highfidelity.com/marketplace/items/"; +static const QString MARKETPLACE_BASE_URL = NetworkingConstants::METAVERSE_SERVER_URL.toString() + "/marketplace/items/"; void ContextOverlayInterface::openMarketplace() { // lets open the tablet and go to the current item in diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 62a4dcf369..9c5439ec2f 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -127,9 +127,15 @@ $(this).attr('data-href', $(this).attr('href')); $(this).attr('href', '#'); cost = $(this).closest('.col-xs-3').find('.item-cost').text(); + + $(this).closest('.col-xs-3').prev().attr("class", 'col-xs-6'); + $(this).closest('.col-xs-3').attr("class", 'col-xs-6'); if (parseInt(cost) > 0) { - $(this).find('.price').text("BUY"); + var priceElement = $(this).find('.price') + priceElement.css({ "width": "auto", "padding": "3px 5px", "height": "26px" }); + priceElement.text(parseFloat(cost / 100).toFixed(2) + ' HFC'); + priceElement.css({ "min-width": priceElement.width() + 10 }); } }); @@ -160,7 +166,7 @@ // Try this here in case it works (it will if the user just pressed the "back" button, // since that doesn't trigger another AJAX request. - injectBuyButtonOnMainPage; + injectBuyButtonOnMainPage(); addPurchasesButton(); } } @@ -172,8 +178,8 @@ var cost = $('.item-cost').text(); - if (parseInt(cost) > 0) { - $('#side-info').find('.btn').html('Buy Item '); + if (parseInt(cost) > 0 && $('#side-info').find('#buyItemButton').size() === 0) { + $('#side-info').find('.btn').html('Buy Item: ' + (parseFloat(cost / 100).toFixed(2)) + ' HFC'); } $('#side-info').find('.btn').on('click', function () {