Announcement

Collapse
No announcement yet.

Stock Management Program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Stock Management Program

    Hi,

    Here is a little info on what I have been doing..

    I have recently been working on a stock management program to simply read my suppliers XML feed to update stock levels, remove discontinued products and add new products.

    I have the program updating the stock nicely now, but have ran into a bit of an issue which is purely down to my inexperience of the structure of the sellerdeck database tables and how they work.

    I have got the program to find a new product and its main details and insert them into the Product Table, name, price, image, description etc.

    Then I have a lot of user defined properties that are used with the product, eg Size, Colour, etc.

    I worked out which ID represents each property and thought when I inserted them into the database, it would work with that product..

    It does populate the database with the correct data, but when I open sellerdeck, and look at the product, nothing appears in the size, colour fields.

    So, I had a little mess about, and tried to manually enter the user defined properties as I usually would, I entered colour, pressed apply, and checked back in the database. Suddenly, about 20 different user properties had generated in the database, along with the ones I have inserted with the program.



    So my questions are, at the moment, I only update two tables, Product, and user defined properties, Is there any other tables that I am missing out that need data populating which is vital ?

    Is there something in the database that initiates all the user defined properties to be populated with blank values? -- this way I could just update them rather than insert.


    Hopefully this makes some sense, and I would highly appreciate it if someone could shed some light on this!

    #2
    Originally posted by STSO-UK View Post
    So my questions are, at the moment, I only update two tables, Product, and user defined properties, Is there any other tables that I am missing out that need data populating which is vital ?

    Is there something in the database that initiates all the user defined properties to be populated with blank values? -- this way I could just update them rather than insert.


    Hopefully this makes some sense, and I would highly appreciate it if someone could shed some light on this!
    The UserDefinedProperties table does not contain a link back to the product only a link to the VariableID, which can be custom or built in, take a look in Variables to see which variable is associated with an ID.

    However you also need the ProductProperties table to see which data in the UserDefinedProperties is associated with a specific product, and update this table as required

    I did some work on on a similar system some time ago written in PHP

    Malcolm

    SellerDeck Accredited Partner,
    SellerDeck 2016 Extensions, and
    Custom Packages

    Comment


      #3
      There's some sample code regarding accessing user defined properties in the database on http://community.sellerdeck.com/arch...p/t-49736.html
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Originally posted by malbro View Post
        The UserDefinedProperties table does not contain a link back to the product only a link to the VariableID, which can be custom or built in, take a look in Variables to see which variable is associated with an ID.

        However you also need the ProductProperties table to see which data in the UserDefinedProperties is associated with a specific product, and update this table as required

        I did some work on on a similar system some time ago written in PHP

        Hi mate,

        I just checked my ProductProperties Table and it was empty! =/

        The only way at the moment that I can get the user defined properties to insert into the database is to update a product on the UI..

        Even when I put the values in manually, and look at the product, it doesn't seem to register.


        My understanding is that the software waits till you make an update to the product on the user interface then once you click apply, it does a command and inserts all available UserDefinedProperties with blank values into the database

        Comment


          #5
          Originally posted by STSO-UK View Post
          Hi mate,

          I just checked my ProductProperties Table and it was empty! =/

          The only way at the moment that I can get the user defined properties to insert into the database is to update a product on the UI..

          Even when I put the values in manually, and look at the product, it doesn't seem to register.


          My understanding is that the software waits till you make an update to the product on the user interface then once you click apply, it does a command and inserts all available UserDefinedProperties with blank values into the database
          Sellerdeck reads the database when the program starts and will only read from the database again if you update a product.

          Try updating the database with Sellerdeck stopped, then start Sellerdeck, it should then pick up any changes to the database.

          Malcolm

          SellerDeck Accredited Partner,
          SellerDeck 2016 Extensions, and
          Custom Packages

          Comment

          Working...
          X