Updating Database

# Loading sellers prices

Seller's Price is a price of cards of a card for sale by a given provider. Magic Assistant supports two prices columns - seller price - on the magic database cards, and user price on owned instances of these cards. First one is for how much you can buy, and second one for how much your actually bought it.

## Selecting default price provider

Currently there are few supported providers (in US dollars). If you have preference between these you can go to Window->Preferences->Magic Preferences and select one in the "Card Prices Provider".

## Loading sellers prices from the web

- Step 1: Click on the preferences button which is the spreadsheet looking button that is second from the left in the line of buttons in the upper right hand corner.
- Step 2: Once that is open, scroll down and add a check to the "Seller Price" item (which represents a column in a view). After that click apply and then OK.
- Step 3: In the same upper right hand corner of the view, you'll see an upside down pyramid (icon is third from the right next to the minimize and maximize button.), click it.
- Step 4: In the menu that will appear, click "Load Extra Fields".
- Step 5: Add a check to the "Price" field and click OK. This will update the cards and adding the price to the "Seller Price" field.

## Custom price provider

You can define you own price provider and MA can load prices from it, as long as these prices in the format this software understands. Well technically you can write a code to extend MA do anything you want including parsing the providers' web site but we talking about non-programmatic extension. To do that you create a file, i.e My_Provider.xml which looks like this below and put it in WORKSPACE/magiccards/MagicDB/prices folder

    <cards>
      <property name="currency" value="USD"/>
      <property name="url" value="http://mysite.com/mypricelist.xml"/>
      <list>
        <mc>
          <id>243482</id>
          <dbprice>0.09</dbprice>
        </mc>
      </list>
    <cards>

That defines new provider called "My_Provider" and sets the price of a card with gatherer id 243482 to 9 cents in USD (US Dollars) currency. You can have multiple mc records there. URL can be specified if prices are published online in exact same format as this file, in this case when user selects update prices, it will re-load the file from this url, and store back to this xml file locally.

The second option is to import prices via db extension import. You can define prices in any import format with flexible columns that MA supports, and DBPRICE is the column name for the sellers price. I.e. in CSV format it will be

    NAME,SET,DBPRICE
    Breath of Darigaaz,Duel Decks: Knights vs. Dragons,0.09
    Captive Flame,Duel Decks: Knights vs. Dragons,0.04
    Dragonspeaker Shaman,Duel Decks: Knights vs. Dragons,3.08