SteamDatabase / BrowserExtension

💻 SteamDB's extension for Steam websites
https://steamdb.info/extension/
BSD 3-Clause "New" or "Revised" License
749 stars 57 forks source link

Historical price for TBoI: Repentance is always given in USD #183

Open deviant opened 2 weeks ago

deviant commented 2 weeks ago

Describe the bug

This page lacks a priceCurrency meta tag, and thus falls back to USD. I'm not sure where else one would get this information from. The corresponding page for the base game has the tag as expected, so one could work around this by also requesting this.

There's also the numerical currency code of the user's cart, but I don't know how to map this into the textual representation, and maybe this has some other downsides I'm not aware of. This can be found as follows: JSON.parse(document.querySelector('#application_config').dataset.store_user_config).accountcart.cart.subtotal.currency_code.

I don't know why this page is special, it doesn't seem to be the fact that it's a DLC (other DLCs don't have this problem— even DLCs for the same game). Is it because the game can only be bought as part of a bundle? There's no individual purchase option here (perhaps since I already own all other items in the bundle?). Here's a screenshot:

image

Browser name and version

Firefox 127.0.2 (presumably irrelevant for this issue)

xPaw commented 2 weeks ago

The meta info is probably missing because of the bundles only yeah.

The currency id can be mapped to string with GetCurrencyCode( 3 ); but this function doesn't exist on store pages, and I'm not very keen to put the mapping into the extension code. Plus, the cart json is null if you're not logged in (and won't take into account ?cc param).