Coffeelot / cw-prints

QB-core based script for making prints
51 stars 16 forks source link

Compatibility #8

Open TwistedNF opened 7 months ago

TwistedNF commented 7 months ago

Hello I was wondering if I was doing something wrong or if it's not compatible with ps-inventory. When i add the else if to my app.js it doesn't display the business name it just says "Business undefined"

else if (itemData.name == "coupon" || itemData.name == "business_card" || itemData.name == "flyer") {
            $(".item-info-title").html("<p>" + itemData.label + "</p>");
            $(".item-info-description").html("<p>Business: " + itemData.info.business + "</p>");
        }
Coffeelot commented 7 months ago

I would ask in the PS discord how they display metadata. Maybe they have a better way (like ox inventory). The QB way is complex and just plain bad.

If it's similar to how it's done in ox, you can find that code at the top of the client file.

TwistedNF commented 7 months ago

I would ask in the PS discord how they display metadata. Maybe they have a better way (like ox inventory). The QB way is complex and just plain bad.

If it's similar to how it's done in ox, you can find that code at the top of the client file.

Thanks man! I'll definitely look into this and ask.

TwistedNF commented 7 months ago

So I asked and was told it was how old qb-inventory does it. I'm not entirely sure how that does it as I've recently just got into this. Any sorta help? I'm lost rn lmao