How to use Button.OnClick.AddListener?

Hey guys, so I’ve been struggling with this one for hours and I can’t for the life of me figure it out.

The code is intended to populate the shops ‘offers’ area with the items it has in stock, deciding weather to make a new item or increase the quantity of the item if its already listed. Each item (which is instantiated from a prefab) has a button attached ‘add to cart’, however regardless of what i put in the listener, whether i use delegate or ()=> or just call a simple function like below, it doesnt work. It doesnt throw any errors either, it just simply does nothing. The buttons appear to be clicking, no raycast is blocked or anything as far as I can tell. Any suggestions?

    public GameObject inventory;
    public GameObject shop;
    public string storeName;
    public List<Item> stock;
    public GameObject offers;
    public GameObject cart;
    public int money;
    public GameObject itemPrefab;
    // Use this for initialization
    void Start () {
        offers = shop.transform.FindChild("Buy Window").FindChild("Offers Window").FindChild("Offers").gameObject;
        cart = shop.transform.FindChild("Buy Window").FindChild("Cart Window").FindChild("Cart").gameObject;
    void Clicked()
        Debug.Log("Clickety click");

    public void OpenShop(string shopKeeper)
        shop.transform.FindChild("Shop Name").FindChild("Text").GetComponent<Text>().text = storeName;
        shop.transform.FindChild("ShopKeeper").FindChild("Name Panel").FindChild("Text").GetComponent<Text>().text = shopKeeper;
        foreach (Item item in stock)
            bool newItem = true;
            int stackLocation = 0;
            int quantity = 1;
            int stackSize = 1;
            for (int i = 0; i < offers.transform.GetChildCount(); i++)
                if (offers.transform.GetChild(i).FindChild("Name").GetComponent<Text>().text == item.Title)
                    newItem = false;
                    stackLocation = i;
            //Check if stacking is possible
            if (newItem == true)
                GameObject newOffer = Instantiate(itemPrefab);
                newOffer.transform.FindChild("Name").GetComponent<Text>().text = item.Title;
                newOffer.transform.FindChild("Slot").FindChild("Item").GetComponent<Image>().sprite = item.Sprite;
                newOffer.transform.FindChild("Quantity").GetComponent<Text>().text = quantity + "x";
                newOffer.transform.FindChild("Value").GetComponent<Text>().text = "Price: " + item.Value.ToString();
                Button addToCart = newOffer.transform.FindChild("Add To Cart").GetComponent<Button>();
                addToCart.onClick.AddListener(delegate { Clicked(); });
                string newQuantity = offers.transform.GetChild(stackLocation).FindChild("Quantity").GetComponent<Text>().text;
                quantity = Int32.Parse(newQuantity.Substring(0, newQuantity.Length-1));
                offers.transform.GetChild(stackLocation).FindChild("Quantity").GetComponent<Text>().text = quantity+"x";


Deleting the button on the prefab and adding it again, then restarting unity seems to have solved the problem for me, at least for now. Hopefully that will be the end of it!