Esempio n. 1
0
 public void SetItemDetails(string prodName)
 {
     itemName = prodName;
     ProductDetail.GetProductDetails(prodName);
     productName.text    = ProductDetail.name.ToString();
     prodPrice.text      = ProductDetail.price.ToString();
     quantityAmount.text = CartState.cartItems[prodName].ToString();
 }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        //The Parent GameObject name should = Product name in Product Details.cs
        productName = transform.parent.name;

        //Get the Product Details from The static class ProductDetail.cs
        ProductDetail.GetProductDetails(productName);
        productTitle.text = ProductDetail.name;
        productPrice.text = ProductDetail.price;

        cart.SetCartName(productName);
    }