How to get weapon skins for the items in inventory - steam-web-api

I am able to get items in inventory by comparing the getschema defindex and the getplayeritems defined. But all of them are just the base weapon models. How can I get the appropriate skins?

Related

Display specific content for target audiences depending on Member Group Extending Umbraco

Is it possible to display specific content for target audiences depending on Member Group?
Current "Public Access" mechanism allows us to provide role based restrictions for the selected page. In this case we would be able to create number of different pages depending on the number of Member Groups and assign restrictions.
I was wondering if it is possible to show different page content depending on the Member Group (on the same URL) or can I do it with different Modules? Does Umbraco already have the logic if "Member Group A" is assinged to "Module A" he shows "Module A"? Or "Member Group B" is assigned to "Module B" he shows "Module B"?
Thanks In advance!
I believe this will have to be done through custom logic... You can however use Umbraco's services (see the link below):
Umbraco - MemberGroup Service
You can use this class to determine the group the current Member belongs to. Once you have determined this, you just simply need to alternate between the different bits of content you wish to show to each different group.
Example node:
FaqNode
RegisteredUserNotes
NonRegisteredUserNotes
OtherGroupNotes etc.
Hopefully this makes sense...
Regards
Craig

No Item quantity in /v1/loc/items and missing useful data in /v1/loc/inventory

I'm trying to have a google sheet sync inventory.
Importing https://connect.squareup.com/v1/(location)/items, it doesn't include the item's quantity, even though it includes almost everything else
If I import https://connect.squareup.com/v1/(location)/inventory it shows quantities but only for variation Ids, and no item names.
Does anyone know how to get an item library INCLUDING the product name?
PS -
I would ideally like to import the output of the item library export. The link for that is:
https://squareup.com/api/v3/items-bulk/export
I'm guessing this may be an option in API v3 later...
You would have to match up the inventory and parent items yourself. Square is working on updated inventory and item management endpoints for the v2 APIs, so be on the lookout for those!

Customize ATG promotions so "highest priced item" considers sale price if there is one

I need to customize ATG promotions applied to "highest priced item" but that it considers when there is a sale price and uses it rather than the default list price.
Based on what I read from atg.ui.commerce.pricing.DescriptionBuilder.java when configuring the "Condition and offer" in BCC to generate the PMDL rule when marking the option:
"Highest priced item first" under "Apply Discount To" it generates a PDML rule with this section:
<up-to-and-including number="1" sort-by="priceInfo.listPrice" sort-order="descending">
But as you can see ATG always uses priceInfo.listPrice hardcoded within the PDML rule.
How could I do so my promotion is intelligent enough to detect when an item has sale price so it uses it rather than the list price?
Sorry for my delay to reply your answer, It took long since I started digging into it and I want to share my findings:
In my company we implemented a sale list price based on ATG suggestion; it means on atg/commerce/pricing/ItemPriceInfo we'll populate listPrice from "List Price" list and salePrice from "Sale Price" list.
Across the site in order to display an item price we have to chose in between both lists by applying next logic to give priority to sale price:
isOnSale() && getSalePrice() < getListPrice ? getSalePrice() : getListPrice();
The problem comes when creating a new promotion on BCC and picked the option to apply the promotion to highest (or lowest) priced item since BCC by default will add in the PDML rules a XML tag like:
< up-to-and-including number="1" sort-by="priceInfo.listPrice" sort-order="descending" >
As you may notice, the trick the PDML does is to sort all items based on "priceInfo.listPrice" and then pick the first.
When the PDML is evaluated, ATG maps this XML tag by an instance of atg/commerce/pricing/definition/UpToAndIncludingElem; there the method "evaluate" will call the method "resolveCollectionList" living in atg/commerce/pricing.definition.CompoundPricingModelExpression which at the end ends up calling the method "sortList" of the same class.
This is a hacky approach worked for me but I already dropped:
5.a I decompiled UpToAndIncludingElem.class and added its own version of the method sortList, since this method receives a parameter "sortBy" I added a condition so if its value is "priceInfo.listPrice" I changed it to acustom new attribute "priceInfo.finalPrice"
5.b Since we had already extended atg/commerce/pricing/ItemPriceInfo class I added a new attribute called "finalPrice" with its setter and a custom getter which evaluates if there is a sale price to use as I explained in step #2
Now every time a promotion with that XML tag within the PDML rules to apply the promotion to highest (or lowest) priced item, my custom UpToAndIncludingElem's sortList method will replace the sortBy parameter to use "priceInfo.finalPrice" which getter method will consider sale price.
Why am I dropping this approach?
Because the way I overrode the class relies on order classes are added to the project within the class path and feels risky to me
I used a decompiling tool which I can't guarantee is the optimal JAVA code
If later with another ATG version this flow changes I may run into trouble
What am I going to do?
I'll keep the definition of "priceInfo.finalPrice" I added on our custom class from ItemPriceInfo class
I'll look how I can change the promotion template so hardcodes my custom attribute "priceInfo.finalPrice" rather than "priceInfo.listPrice"
Thanks to people who has taken the time to read and reply my question and I hope my discovery and approach could work to you.
Of course feel confident to ask or suggest things.

How can I get a list of all CSGO items including skin name, quality and rarity?

I'm not looking for details of a specific player inventory, but a list of all items for CSGO. What I want is details of the weapons in particular, but including skin name information and rarity.
To make it easier to explain this site has the information I need, except rarity.
http://csgo.steamanalyst.com/list.php
By using the following api url I can get weapon model names but not skin names (ie. "Zirka")
http://api.steampowered.com/IEconItems_730/GetSchema/v0002/?key={YOUR_API_KEY}
I haven't found anything regarding skins in Steam Web Api.
Lists of all skins as well as rarity and corresponding weapons are in "paint_kits", "paint_kits_rarity" and "item_sets" sections of /csgo/scripts/items/items_game.txt file.
As for their correct names, those are in /csgo/resource/csgo_YOUR_LANGUAGE.txt. Looking like that
"PaintKit_so_red_Tag" "Candy Apple"
Won't be hard to make php or python script to get all of it and put it in a database for ease of use.
For skins images you could get weapon and skin name from the above, and do a foreach curl loop to get content from div with "market_listing_largeimage" class using for example simple_html_dom.php, from url http://steamcommunity.com/market/listings/730/{ITEM_NAME}%20%7C%20{SKIN_NAME}%20%28{USAGE_THINGY Ex. Well-Worn}%29
Just remember to replace all spaces going to the url with %20 but that depends on what you use to get the page. You could do a foreach on the usage thingy since some weapons don't have some variants on the market, curl could return wrong page. Nothing that a simple if+foreach couldn't fix.
Also do it only after skins update if overused you could get blocked from valve website for spamming. You could also use SteamWebApi and game news to check for new versions and update it automatically then. Just use your imagination and google.

Sitecore global url to specific url

Currently I am facing the following problem:
A website, which I have to make for a company, has different locations. But the content of a few pages is for all locations the same. Now I have created a global folder with the items for all the locations. But now I am facing the following problem: when accessing the global items from the website of a specific location I get the global url. But what I want is that the specific location url remains the same structure, for example:
Now it is www.url.com/global/subfolder/itemname
And what I want is www.url.com/location1/subfolder/itemname
Does anybody have any solution(s)/suggestion(s) for this problem?
Does anybody also have a solution for creating a menu to insert these global items but also to insert the location specific items?
Some more information about my Sitecore content structure
Global: contains the global items for alle locations
Corporate: the corporate website of the company
Location1: the website of location1
Location2: the website of location2
Adam Weber was right, cloning is your best solution:
Create your Global section, with all the child items you need
For each of your local sections, clone the global section and place it where you'd like it to appear within your local menu
If I understand you correctly, this is what I'd do. It might not be the prettiest solution. But it'll work.
You have your "data" items in /global/subfolder/itemname
then just create some templates, which are "dummy" pages, that only contain a link to the global item (and perhaps the few fields that could differ (perhaps contact email for the specifik location).
Then you make a sublayout that bascially jsut gets the referenced item and uses that instead of Sitecore.Context.Item.
Then create an instance of the "dummy" template in /location1/subfolder/itemname and reference it to /global/subfolder/itemname
That way you URLs will be correct and the data will be the same.
Another and probably smarter solution (if you have enabled proxies) is to create a proxy that takes
/global/subfolder/itemname as source and points to /location1/subfolder/ as target (or you could take /global/subfolder and check "include children".
Here is a Guide on how to use proxies in 5.3:
http://sdn.sitecore.net/Articles/Administration/Using%20Proxy%20Items%20in%205,-d-,3.aspx

Resources