Q:

Creating attribute of a breed and managing

I have two breeds, let's say sellersA and sellersB, and an item that I want to create for one seller chosen either from a sellersA or sellersB. 
Right now, therefore, I have
globals[
chosen?
]

breed [sellersA sellerA]
breed [sellersB sellerB]

sellersA[
catalogue
]

sellersB[
catalogue
]

and the item which has two attributes, attr1 and attr2. I initialised the catalogue in the setup: set catalogue [].
The following part of code should check if the catalogue is empty or not: if it is empty, a selected seller create a new item with some specific attributes (1 and 2):
 let selected_one nobody
  let customers nobody

set selected_one one-of turtles with [breed = sellersA or breed = sellersB]

  ifelse empty? [catalogue] of selected_one [
  create-items 1[ hide-turtle set new_item self set chosen? false]
  ifelse [breed = sellersA] of selected_one
    [ ask selected_one [
        set attr1 random-float 1
        set attr2 random-float
        set function1 (1 + attr2)
      ]
    ]
    [ ask selected_one [
        set attr1 random-float 1
        set attr2 random-float
        set function2 (1 - attr2)
      ]
    ]

Then the seller add the item to its catalogue and to the catalogue of the customers connected with.
    ask selected_one [
        set customers (turtle-set self in-link-neighbors with [breed = sellersA])
        ask customers [set catalogue fput new_item catalogue]
      ]
    ]
  ]

If the catalogue of a selected seller is not empty (i.e. the seller has items to sell), I would like to select one of the previous items created and track it (for example if one of sellers A created this new item and this item was added to its list and to its customers' list (neighbours), I would like to know how many customers from its neighbourhood selected its item). 
For your previous answers to my questions, I know that I should use the extension rnd:weighted-one-of and, in order to select the item with highest value of one of the two attributes, I should create a new list with only indices that point to the attributes of the object created. This should require to use who. However, as result, I am getting only empty lists when I run show catalogue in the observer.
I think the problem might be in the definition of the item and of its attribute. I tried to define it as a breed with attr1 and attr2, but it did not work when I put the function as sellersA-own. 
I would like to keep the code simple, but I do not know how.  
I hope you can help me. 

A:

You don't show it, so I will assume you have a breed of items which have attributes:
breed [ items item]
items-own [
attr1 
attr2
]

So sellers have catalogs, the catalogs list items, and the items have attributes.
It's not clear to me who "customers" are, or what attributes they have.  They seem to be simply other sellers who have links to a given seller. Is that right?
Anyway, you asked

I would like to know how many customers from its neighbourhood
  selected its item).

The phrase "its item" implies to me that items must have some additional attribute such as "creator".   In any case,  you don't describe what it means for a customer to have "selected" an item, or where you store such information, or where you store a history of who ever selected an item in the past -- so it's impossible to give advice on this question.
You also ask why this happens:

I am getting only empty lists when I run show catalogue in the
  observer.

Well,  "catalog" is not a global variable,  it is an attribute of the sellers. You need to inspect the sellers to see if they have catalogs with the correct item or items in them, or ask something like
ask sellersA [ show catalog ]

but more probably, you want to open an inspector window and leave it open so you can watch what's going on.
inspect one-of sellersA

But, however you do it, you may still find that no sellers have catalogs with any items in them.  You should look to see if any items have been created, as they are global and you should be able to see them in the observer, or inspect them, or simply count them.
Actually I don't understand how the code you listed above could possibly work.  Your code has
[ ask selected_one [
        set attr1 random-float 1
        set attr2 random-float
        set function1 (1 + attr2)
      ]

where selected_one is a seller, who does not own attributes or functions.  You're not in the context of an item so I would expect the command "set attr" to fail.  Maybe that code is failing silently which is why you have no items.
After you run your code, are there any items that have been created?

