ebaytotalprice-userscript

Add the total eBay auction price including postage in the auction listing

< Feedback on ebaytotalprice-userscript

Review: OK - script works, but has bugs

§
Posted: 14.02.2023

Thank you for this amazing script, it has saved me a ton of time when figuring out total prices.

However it gets difficult again when I am on an item page such as the one pictured in the attachment.
Total Price does not seem to work on specific item pages even after I tried adding some extra @include rules in the tampermonkey script, also visible in the second attached image.
I am not a coder but I kind of get a very few small things but not enough to make it work.
Also there are ESLint errors regarding the @include rules being potentially unsafe and becoming outdated in manifest V3 early 2023.

§
Posted: 14.02.2023

I am not a coder and don't know if this info will be useful at all but According to ChatGPT, this is what is possibly wrong with the script but I don't know how to fix it and don't know if that is correct, I really hope this info helps:



This code is a Tampermonkey userscript that is meant to add the total price of an item on the eBay auction listing pages, including the postage. The script uses a combination of JavaScript, Regular Expressions and the DOM to extract information from the webpage and to add new elements to the page.

It appears that the code is not working because it is not able to extract the correct elements from the page. The code uses the 'getNode' and 'qs' functions to extract elements from the page, but it is not able to find the correct elements to extract the information it needs. This could be because the structure of the eBay auction listing pages has changed since this code was written, or because the code is not written to handle the specific case of this particular webpage.

Additionally, there are some error messages and console warnings in the code that suggest that there may be some bugs or issues with the code. For example, the 'getNode' function can return a 'null' value if the selector it is passed is not found on the page, which could lead to unexpected behavior.

Based on the code you have provided, it looks like the script is trying to find elements on the eBay item listing page that match the selectors defined in the 'processItemListing' function. However, these selectors may no longer match the current structure of the eBay item listing page, which would prevent the script from working.

One potential fix would be to update the selectors in the 'processItemListing' function to match the current structure of the eBay item listing page. You could use a tool like the browser developer console to inspect the HTML of the page and determine which elements contain the relevant information (e.g. the item price and shipping cost). Then, you could update the selectors in the 'processItemListing' function to match those elements.

Additionally, the script is using the 'MutationObserver' API to observe changes in the item listing page and update the total price accordingly. However, the script doesn't seem to handle errors or timeouts when trying to observe changes. You could add error handling and timeouts to the 'MutationObserver' observer to make the script more robust.

SubZ390Author
§
Posted: 14.02.2023

Hi thanks for the ChatGPT report. Could you post a url to the page that doesn't work please? I'll take a look and see what's the problem and get back to you.

SubZ390Author
§
Posted: 15.02.2023

Thanks for the link. Allow me a day or two to look into the issue.

SubZ390Author
§
Posted: 15.02.2023

I've updated the script to account for the changes on the eBay site.

§
Posted: 16.02.2023

I've updated the script to account for the changes on the eBay site.

Awesome, thank you very much.
I have tested it out now and there only seems to be one very minor issue.
It is not correctly calculating the local price.
As can be seen in the screenshot I have attached, it only converts the overseas currency and does not convert the local "approx" currency.
I am testing by using the page I already gave you above and as you can see in the image, AU $530.71 + approx. AU $82.52 does not equal $421.87, which leads me to believe it is using the overseas US $ currency instead of my local AU $ currency.

SubZ390Author
§
Posted: 16.02.2023

Yes the script only calculates the main price. This is the first time I've seen a local currency conversion as I don't normally buy from international sellers. This would be a new feature and something I'd need to research. I would normally only add features that are useful to me because each feature is an ongoing responsibility.

§
Posted: 16.02.2023

Yes the script only calculates the main price. This is the first time I've seen a local currency conversion as I don't normally buy from international sellers. This would be a new feature and something I'd need to research. I would normally only add features that are useful to me because each feature is an ongoing responsibility.

Ok, no worries and thank you for understanding.
I hope you will be able to figure it out with research.
I might try asking ChatGPT if it can think of a way to get it converting from the local currency as well as the main currency.
If I find anything I think might be useful, I will post it here for you.
Thanks again and have a great day/afternoon/night.

Post reply

Sign in to post a reply.