Skip to content

Commit cc2f977

Browse files
committed
v6.1: Patch for added eBay item SKUs
1 parent fe09f7d commit cc2f977

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

PrinterPiExtension/js/background.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
try { //Try eBay
2121
let address = document.querySelector("#shipToAddress").innerText;
22-
let shipping = document.querySelectorAll(".BuyerPurchaseDetails--1nhS6")[3].children[1].innerText;
22+
let shipping = document.querySelectorAll(".BuyerPurchaseDetails--1nhS6")[3].children[1].innerText;
2323
shipping = parseFloat(shipping.substring(shipping.indexOf("$")+1)); //Shipping as a float
2424
let grandTotal = document.querySelectorAll(".BuyerPurchaseDetails--1nhS6")[2].children[1].innerText; //Shipping+items+tax
2525
grandTotal = parseFloat(grandTotal.substring(grandTotal.indexOf("$")+1));
@@ -28,12 +28,13 @@
2828
let item_arr = [];
2929
for (let i=0; i<items.length; i++) { //Iterate through the items
3030
let itm = items[i].children[1];
31-
let price = itm.children[2].innerText;
32-
itemTotal += parseFloat(price.substring(price.indexOf("$")+1));
31+
let price = itm.children[3].innerText;
32+
price = parseFloat(price.substring(price.indexOf("$")+1));
33+
itemTotal += price;
3334
item_arr.push({
3435
desc: itm.children[0].innerText,
35-
sku: "I",
36-
qty: itm.children[1].innerText.slice(5),
36+
sku: itm.children[1].innerText.slice(5),
37+
qty: itm.children[2].innerText.slice(5),
3738
price: price
3839
});
3940
}

PrinterPiExtension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "PrinterPi",
4-
"version": "6.0",
4+
"version": "6.1",
55
"description": "Parse eBay Print Shipping Label or PayPal Activity pages and send the data to an application that controls a receipt printer",
66

77
"options_page": "options.html",

0 commit comments

Comments
 (0)